{
  "id": 430590,
  "title": "Questions about the given data",
  "url": "/competitions/rsna-2023-abdominal-trauma-detection/discussion/430590",
  "author_name": "Chau YH",
  "post_date": "2023-08-10T11:27:27.093000",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I have never worked with radiological images before, and I want to check if my understanding is correct.</p>\n<h1>Data</h1>\n<h2>Structure of images</h2>\n<p>The images are structured as [patient_id]/[series_id]/[image_instance_number].dcm. Is the following interpretation correct?<br>\n| series_id | A single CT scan of the patient with a particular CT machine |<br>\n| image_instance_number | Within the same CT scan, the depth of the 3D CT image, corresponding to a 2D slice.  |<br>\n| .dcm files | A 2D image representing a single slice of the 3D CT image |</p>\n<h2>Different series of same patient</h2>\n<p>As a series represents a single CT scan, must it be that different CT scans of the same patient (by patient_id) are on the same day? Otherwise, different CT scans may be inconsistent, as the patient may be injured some time between the two CT scans.</p>\n<h2>Labels</h2>\n<p>We are given study level labels and image level labels, which represent what injuries are present on the patient and the 2D slice of the CT image respectively. </p>\n<p>The image_level_labels.csv gives us information about whether bowel/extravasation can be found in specific 2D slices. Can we safely assume that these are exactly (or with high confidence) all the slices with the corresponding injuries? That is to say, given (patient_id, series_id, instance_number), if I cannot find a row with those IDs and injury \"Bowel\", I can safely conclude that the 2D slice has no bowel injury.</p>\n<h2>Test examples</h2>\n<p>We are required to give predictions for each patient in the test_images folder.</p>\n<ul>\n<li>Will there only be one series_id for each patient in the actual test data, just like the 3 examples?</li>\n<li>There seems to only be 30.dcm in each CT scan in the 3 examples. Does this mean that we can only work with a single 2D slice of the CT scan in the test set? If so, why are we not given the 3D images just like the training set?</li>\n</ul>\n<p>Any help and clarification on the data is appreciated 🙏. </p>",
  "messages": [
    {
      "id": 2383666,
      "postDate": "2023-08-10T14:02:08.563Z",
      "content": "<p>Hi,</p>\n<p>You can get the date and time of each dicom from the metadata, for example with pydicom:</p>\n<pre><code>dicom.ContentDate\ndicom.ContentTime\n</code></pre>\n<p>You can format it by concatenating both outputs and passing it to pandas, example:</p>\n<pre><code>out = (dicom.ContentDate) + (dicom.ContentTime)\npd.to_datetime(out, =)}\n</code></pre>\n<p>The output will look like this: 2023-07-21 23:25:31.265856</p>\n<p>Hope this help you answer your question about the different series of each patient.</p>",
      "rawMarkdown": "Hi,\n\nYou can get the date and time of each dicom from the metadata, for example with pydicom:\n\n```python\ndicom.ContentDate\ndicom.ContentTime\n```\n\nYou can format it by concatenating both outputs and passing it to pandas, example:\n\n```python\nout = str(dicom.ContentDate) + str(dicom.ContentTime)\npd.to_datetime(out, format='%Y%m%d%H%M%S.%f')}\n```\n\nThe output will look like this: 2023-07-21 23:25:31.265856\n\nHope this help you answer your question about the different series of each patient.\n",
      "votes": 1,
      "replies": [
        {
          "id": 2391290,
          "postDate": "2023-08-15T05:15:54.193Z",
          "content": "<p>Thanks for the information, this clears up a lot about the date and time. By probing the test data, I found out that some dcm files are stored as 2D arrays, a slice for each .dcm, but some .dcm files are 3D arrays. In particular, the series folders with only one .dcm file are stored as a 3D array. This depends on the SOPClassUID, whether it is 1.2.840.10008.5.1.4.1.1.2 (CT Image Storage) or 1.2.840.10008.5.1.4.1.1.2.1 (Enhanced CT Image Storage). reference: <a href=\"https://dicom.nema.org/dicom/2013/output/chtml/part04/sect_B.5.html\" target=\"_blank\">https://dicom.nema.org/dicom/2013/output/chtml/part04/sect_B.5.html</a></p>",
          "rawMarkdown": "Thanks for the information, this clears up a lot about the date and time. By probing the test data, I found out that some dcm files are stored as 2D arrays, a slice for each .dcm, but some .dcm files are 3D arrays. In particular, the series folders with only one .dcm file are stored as a 3D array. This depends on the SOPClassUID, whether it is 1.2.840.10008.5.1.4.1.1.2 (CT Image Storage) or 1.2.840.10008.5.1.4.1.1.2.1 (Enhanced CT Image Storage). reference: https://dicom.nema.org/dicom/2013/output/chtml/part04/sect_B.5.html"
        }
      ]
    },
    {
      "id": 2383466,
      "postDate": "2023-08-10T11:27:27.093Z",
      "content": "<p>I have never worked with radiological images before, and I want to check if my understanding is correct.</p>\n<h1>Data</h1>\n<h2>Structure of images</h2>\n<p>The images are structured as [patient_id]/[series_id]/[image_instance_number].dcm. Is the following interpretation correct?<br>\n| series_id | A single CT scan of the patient with a particular CT machine |<br>\n| image_instance_number | Within the same CT scan, the depth of the 3D CT image, corresponding to a 2D slice.  |<br>\n| .dcm files | A 2D image representing a single slice of the 3D CT image |</p>\n<h2>Different series of same patient</h2>\n<p>As a series represents a single CT scan, must it be that different CT scans of the same patient (by patient_id) are on the same day? Otherwise, different CT scans may be inconsistent, as the patient may be injured some time between the two CT scans.</p>\n<h2>Labels</h2>\n<p>We are given study level labels and image level labels, which represent what injuries are present on the patient and the 2D slice of the CT image respectively. </p>\n<p>The image_level_labels.csv gives us information about whether bowel/extravasation can be found in specific 2D slices. Can we safely assume that these are exactly (or with high confidence) all the slices with the corresponding injuries? That is to say, given (patient_id, series_id, instance_number), if I cannot find a row with those IDs and injury \"Bowel\", I can safely conclude that the 2D slice has no bowel injury.</p>\n<h2>Test examples</h2>\n<p>We are required to give predictions for each patient in the test_images folder.</p>\n<ul>\n<li>Will there only be one series_id for each patient in the actual test data, just like the 3 examples?</li>\n<li>There seems to only be 30.dcm in each CT scan in the 3 examples. Does this mean that we can only work with a single 2D slice of the CT scan in the test set? If so, why are we not given the 3D images just like the training set?</li>\n</ul>\n<p>Any help and clarification on the data is appreciated 🙏. </p>",
      "rawMarkdown": "I have never worked with radiological images before, and I want to check if my understanding is correct.\n\n# Data\n## Structure of images\nThe images are structured as [patient_id]/[series_id]/[image_instance_number].dcm. Is the following interpretation correct?\n| series_id | A single CT scan of the patient with a particular CT machine |\n| image_instance_number | Within the same CT scan, the depth of the 3D CT image, corresponding to a 2D slice.  |\n| .dcm files | A 2D image representing a single slice of the 3D CT image |\n\n## Different series of same patient\nAs a series represents a single CT scan, must it be that different CT scans of the same patient (by patient_id) are on the same day? Otherwise, different CT scans may be inconsistent, as the patient may be injured some time between the two CT scans.\n\n## Labels\nWe are given study level labels and image level labels, which represent what injuries are present on the patient and the 2D slice of the CT image respectively. \n\nThe image_level_labels.csv gives us information about whether bowel/extravasation can be found in specific 2D slices. Can we safely assume that these are exactly (or with high confidence) all the slices with the corresponding injuries? That is to say, given (patient_id, series_id, instance_number), if I cannot find a row with those IDs and injury \"Bowel\", I can safely conclude that the 2D slice has no bowel injury.\n\n## Test examples\nWe are required to give predictions for each patient in the test_images folder.\n- Will there only be one series_id for each patient in the actual test data, just like the 3 examples?\n- There seems to only be 30.dcm in each CT scan in the 3 examples. Does this mean that we can only work with a single 2D slice of the CT scan in the test set? If so, why are we not given the 3D images just like the training set?\n\nAny help and clarification on the data is appreciated 🙏. ",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 2383666,
      "author_name": "Antonio Félix",
      "author_url": "",
      "post_date": "2023-08-10T14:02:08.563000",
      "content": "<p>Hi,</p>\n<p>You can get the date and time of each dicom from the metadata, for example with pydicom:</p>\n<pre><code>dicom.ContentDate\ndicom.ContentTime\n</code></pre>\n<p>You can format it by concatenating both outputs and passing it to pandas, example:</p>\n<pre><code>out = (dicom.ContentDate) + (dicom.ContentTime)\npd.to_datetime(out, =)}\n</code></pre>\n<p>The output will look like this: 2023-07-21 23:25:31.265856</p>\n<p>Hope this help you answer your question about the different series of each patient.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2391290,
          "author_name": "Chau YH",
          "author_url": "",
          "post_date": "2023-08-15T05:15:54.193000",
          "content": "<p>Thanks for the information, this clears up a lot about the date and time. By probing the test data, I found out that some dcm files are stored as 2D arrays, a slice for each .dcm, but some .dcm files are 3D arrays. In particular, the series folders with only one .dcm file are stored as a 3D array. This depends on the SOPClassUID, whether it is 1.2.840.10008.5.1.4.1.1.2 (CT Image Storage) or 1.2.840.10008.5.1.4.1.1.2.1 (Enhanced CT Image Storage). reference: <a href=\"https://dicom.nema.org/dicom/2013/output/chtml/part04/sect_B.5.html\" target=\"_blank\">https://dicom.nema.org/dicom/2013/output/chtml/part04/sect_B.5.html</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2383666": "Hi,\n\nYou can get the date and time of each dicom from the metadata, for example with pydicom:\n\n```python\ndicom.ContentDate\ndicom.ContentTime\n```\n\nYou can format it by concatenating both outputs and passing it to pandas, example:\n\n```python\nout = str(dicom.ContentDate) + str(dicom.ContentTime)\npd.to_datetime(out, format='%Y%m%d%H%M%S.%f')}\n```\n\nThe output will look like this: 2023-07-21 23:25:31.265856\n\nHope this help you answer your question about the different series of each patient.\n",
    "2383466": "I have never worked with radiological images before, and I want to check if my understanding is correct.\n\n# Data\n## Structure of images\nThe images are structured as [patient_id]/[series_id]/[image_instance_number].dcm. Is the following interpretation correct?\n| series_id | A single CT scan of the patient with a particular CT machine |\n| image_instance_number | Within the same CT scan, the depth of the 3D CT image, corresponding to a 2D slice.  |\n| .dcm files | A 2D image representing a single slice of the 3D CT image |\n\n## Different series of same patient\nAs a series represents a single CT scan, must it be that different CT scans of the same patient (by patient_id) are on the same day? Otherwise, different CT scans may be inconsistent, as the patient may be injured some time between the two CT scans.\n\n## Labels\nWe are given study level labels and image level labels, which represent what injuries are present on the patient and the 2D slice of the CT image respectively. \n\nThe image_level_labels.csv gives us information about whether bowel/extravasation can be found in specific 2D slices. Can we safely assume that these are exactly (or with high confidence) all the slices with the corresponding injuries? That is to say, given (patient_id, series_id, instance_number), if I cannot find a row with those IDs and injury \"Bowel\", I can safely conclude that the 2D slice has no bowel injury.\n\n## Test examples\nWe are required to give predictions for each patient in the test_images folder.\n- Will there only be one series_id for each patient in the actual test data, just like the 3 examples?\n- There seems to only be 30.dcm in each CT scan in the 3 examples. Does this mean that we can only work with a single 2D slice of the CT scan in the test set? If so, why are we not given the 3D images just like the training set?\n\nAny help and clarification on the data is appreciated 🙏. "
  }
}