{
  "id": 607396,
  "title": "Relationship between NIfTI files and DICOM files",
  "url": "/competitions/rsna-intracranial-aneurysm-detection/discussion/607396",
  "author_name": "shiba-inu",
  "post_date": "2025-09-13T20:04:29.684000",
  "votes": 0,
  "comment_count": 3,
  "views": 0,
  "content": "<p><a href=\"https://www.kaggle.com/evancalabrese\" target=\"_blank\">@evancalabrese</a> <br>\nI am comparing the NIfTI file of the DICOM segmentation mask with the original DICOM file, and I noticed that rotations and other transformations have been applied.<br>\nIs there a way to know  the spatial relationship with the original DICOM files?</p>",
  "messages": [
    {
      "id": 3288840,
      "postDate": "2025-09-15T00:06:05.883Z",
      "content": "<p>There is no straightforward way to do this. The NIfTIs were created from DICOMS using dcm2niix, so you would have to reverse engineer that code to see how the NIfTIs were made.</p>\n<p>Can I ask why you want to do this? The reason we provided the NIfTI images and segmentations was to avoid the complexities of converting between DICOM and NIfTI.</p>",
      "rawMarkdown": "There is no straightforward way to do this. The NIfTIs were created from DICOMS using dcm2niix, so you would have to reverse engineer that code to see how the NIfTIs were made.\n\nCan I ask why you want to do this? The reason we provided the NIfTI images and segmentations was to avoid the complexities of converting between DICOM and NIfTI.",
      "votes": 2,
      "replies": [
        {
          "id": 3289214,
          "postDate": "2025-09-15T16:44:55.613Z",
          "content": "<p>The reason is that most of the training data consists of DICOM files, and the test data also uses DICOM files. <br>\nTherefore, I think it would be appropriate for the training and inference pipeline to use DICOM files as input rather than NIFTI files converted from Dicom. <br>\nThat's why I needed to understand the methods related to these formats.</p>\n<p>I just realized that this issue has already been discussed here. <br>\nNIFTI files are stored in a special YXZ format… This should solve the problem. <br>\nThank you.<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-intracranial-aneurysm-detection/discussion/600540#3273852\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-intracranial-aneurysm-detection/discussion/600540#3273852</a></p>",
          "rawMarkdown": "The reason is that most of the training data consists of DICOM files, and the test data also uses DICOM files. \nTherefore, I think it would be appropriate for the training and inference pipeline to use DICOM files as input rather than NIFTI files converted from Dicom. \nThat's why I needed to understand the methods related to these formats.\n\nI just realized that this issue has already been discussed here. \nNIFTI files are stored in a special YXZ format... This should solve the problem. \nThank you.\nhttps://www.kaggle.com/competitions/rsna-intracranial-aneurysm-detection/discussion/600540#3273852",
          "votes": 1,
          "replies": [
            {
              "id": 3290379,
              "postDate": "2025-09-17T17:50:23.607Z",
              "content": "<p>Ok that makes sense. Glad you found a solution!</p>",
              "rawMarkdown": "Ok that makes sense. Glad you found a solution!",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 3288414,
      "postDate": "2025-09-13T20:04:29.683Z",
      "content": "<p><a href=\"https://www.kaggle.com/evancalabrese\" target=\"_blank\">@evancalabrese</a> <br>\nI am comparing the NIfTI file of the DICOM segmentation mask with the original DICOM file, and I noticed that rotations and other transformations have been applied.<br>\nIs there a way to know  the spatial relationship with the original DICOM files?</p>",
      "rawMarkdown": "@evancalabrese \nI am comparing the NIfTI file of the DICOM segmentation mask with the original DICOM file, and I noticed that rotations and other transformations have been applied.\nIs there a way to know  the spatial relationship with the original DICOM files?\n"
    }
  ],
  "comments": [
    {
      "id": 3288840,
      "author_name": "Evan Calabrese",
      "author_url": "",
      "post_date": "2025-09-15T00:06:05.883000",
      "content": "<p>There is no straightforward way to do this. The NIfTIs were created from DICOMS using dcm2niix, so you would have to reverse engineer that code to see how the NIfTIs were made.</p>\n<p>Can I ask why you want to do this? The reason we provided the NIfTI images and segmentations was to avoid the complexities of converting between DICOM and NIfTI.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 3289214,
          "author_name": "shiba-inu",
          "author_url": "",
          "post_date": "2025-09-15T16:44:55.613000",
          "content": "<p>The reason is that most of the training data consists of DICOM files, and the test data also uses DICOM files. <br>\nTherefore, I think it would be appropriate for the training and inference pipeline to use DICOM files as input rather than NIFTI files converted from Dicom. <br>\nThat's why I needed to understand the methods related to these formats.</p>\n<p>I just realized that this issue has already been discussed here. <br>\nNIFTI files are stored in a special YXZ format… This should solve the problem. <br>\nThank you.<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-intracranial-aneurysm-detection/discussion/600540#3273852\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-intracranial-aneurysm-detection/discussion/600540#3273852</a></p>",
          "votes": 1,
          "replies": [
            {
              "id": 3290379,
              "author_name": "Evan Calabrese",
              "author_url": "",
              "post_date": "2025-09-17T17:50:23.607000",
              "content": "<p>Ok that makes sense. Glad you found a solution!</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3288840": "There is no straightforward way to do this. The NIfTIs were created from DICOMS using dcm2niix, so you would have to reverse engineer that code to see how the NIfTIs were made.\n\nCan I ask why you want to do this? The reason we provided the NIfTI images and segmentations was to avoid the complexities of converting between DICOM and NIfTI.",
    "3288414": "@evancalabrese \nI am comparing the NIfTI file of the DICOM segmentation mask with the original DICOM file, and I noticed that rotations and other transformations have been applied.\nIs there a way to know  the spatial relationship with the original DICOM files?\n"
  }
}