{
  "id": 192168,
  "title": "Script to Read DICOM metadata",
  "url": "/competitions/rsna-str-pulmonary-embolism-detection/discussion/192168",
  "author_name": "FelipeKitamura, MD, PhD",
  "post_date": "2020-10-20T12:27:23.092000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>This is a simple script to read DICOM metadata and generate a Pandas DataFrame.</p>\n<p><a href=\"https://github.com/kitamura-felipe/dcmtag2table\" target=\"_blank\">https://github.com/kitamura-felipe/dcmtag2table</a></p>\n<p><code># Import dcmtag2table</code><br>\n<code>from dcmtag2table import dcmtag2table</code></p>\n<p><code># Define the DICOM tags you want to read</code><br>\n<code>list_of_tags = [ \"PatientID\", \"StudyInstanceUID\", \"SeriesInstanceUID\", \"SOPInstanceUID\" ]</code></p>\n<p><code># Define the folder where the DICOM files are. They can be in nested subfolders</code><br>\n<code>folder = \"/media/felipe/easystore/Datasets/RSNA2019/mdai/epm/\"</code></p>\n<p><code># Generate the DataFrame</code><br>\n<code>df = dcmtag2table(folder, list_of_tags)</code></p>",
  "messages": [
    {
      "id": 1055031,
      "postDate": "2020-10-20T12:27:23.093Z",
      "content": "<p>This is a simple script to read DICOM metadata and generate a Pandas DataFrame.</p>\n<p><a href=\"https://github.com/kitamura-felipe/dcmtag2table\" target=\"_blank\">https://github.com/kitamura-felipe/dcmtag2table</a></p>\n<p><code># Import dcmtag2table</code><br>\n<code>from dcmtag2table import dcmtag2table</code></p>\n<p><code># Define the DICOM tags you want to read</code><br>\n<code>list_of_tags = [ \"PatientID\", \"StudyInstanceUID\", \"SeriesInstanceUID\", \"SOPInstanceUID\" ]</code></p>\n<p><code># Define the folder where the DICOM files are. They can be in nested subfolders</code><br>\n<code>folder = \"/media/felipe/easystore/Datasets/RSNA2019/mdai/epm/\"</code></p>\n<p><code># Generate the DataFrame</code><br>\n<code>df = dcmtag2table(folder, list_of_tags)</code></p>",
      "rawMarkdown": "This is a simple script to read DICOM metadata and generate a Pandas DataFrame.\n\nhttps://github.com/kitamura-felipe/dcmtag2table\n\n\n`# Import dcmtag2table`\n`from dcmtag2table import dcmtag2table`\n\n`# Define the DICOM tags you want to read`\n`list_of_tags = [ \"PatientID\", \"StudyInstanceUID\", \"SeriesInstanceUID\", \"SOPInstanceUID\" ]`\n\n`# Define the folder where the DICOM files are. They can be in nested subfolders`\n`folder = \"/media/felipe/easystore/Datasets/RSNA2019/mdai/epm/\"`\n\n`# Generate the DataFrame`\n`df = dcmtag2table(folder, list_of_tags)`\n\n",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1055031": "This is a simple script to read DICOM metadata and generate a Pandas DataFrame.\n\nhttps://github.com/kitamura-felipe/dcmtag2table\n\n\n`# Import dcmtag2table`\n`from dcmtag2table import dcmtag2table`\n\n`# Define the DICOM tags you want to read`\n`list_of_tags = [ \"PatientID\", \"StudyInstanceUID\", \"SeriesInstanceUID\", \"SOPInstanceUID\" ]`\n\n`# Define the folder where the DICOM files are. They can be in nested subfolders`\n`folder = \"/media/felipe/easystore/Datasets/RSNA2019/mdai/epm/\"`\n\n`# Generate the DataFrame`\n`df = dcmtag2table(folder, list_of_tags)`\n\n"
  }
}