{
  "id": 110359,
  "title": "Usage of ImageOrientation (0020,0037)",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/110359",
  "author_name": "Shubhang",
  "post_date": "2019-09-27T04:15:20.549000",
  "votes": 2,
  "comment_count": 3,
  "views": 0,
  "content": "<p>How can I use the orientations to rotate and standardise the 3d reconstructions?</p>",
  "messages": [
    {
      "id": 635353,
      "postDate": "2019-09-27T12:17:41.793Z",
      "content": "<p>Hi,</p>\n\n<p>there is this thread where 3D volumes have been created <a href=\"https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316\">https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316</a>. So creating 3D reconstructions is definitely possible. \nThe image orientation and rotation, just describe the position of the image in the scanner.</p>\n\n<p>In fMRI (I hope I am describing it correctly), you typically have an affine matrix, which describes the voxel's position in space. It is basically a way to transform your voxel space to real \"space\" coordinates (e.g. mm). \nI think the way an affine matrix could be created from the information is described here <a href=\"https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037\">https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037</a>. </p>\n\n<p>Using this kind of information you can try to align your 3D image to the same space of a template or other Patient, for example resample the voxel sizes to a common space. \nHowever, to find the correct overlap you would need some more advanced matching algorithms, shifting and rotating the slices. \nAnd finally, to actually spatially normalize the images, you will need non-linear approaches to stretch and morph the image. </p>\n\n<p>I hope that helps. </p>",
      "rawMarkdown": "Hi,\n\nthere is this thread where 3D volumes have been created [https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316](https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316). So creating 3D reconstructions is definitely possible. \nThe image orientation and rotation, just describe the position of the image in the scanner.\n\nIn fMRI (I hope I am describing it correctly), you typically have an affine matrix, which describes the voxel's position in space. It is basically a way to transform your voxel space to real \"space\" coordinates (e.g. mm). \nI think the way an affine matrix could be created from the information is described here [https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037](https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037). \n\nUsing this kind of information you can try to align your 3D image to the same space of a template or other Patient, for example resample the voxel sizes to a common space. \nHowever, to find the correct overlap you would need some more advanced matching algorithms, shifting and rotating the slices. \nAnd finally, to actually spatially normalize the images, you will need non-linear approaches to stretch and morph the image. \n\nI hope that helps. ",
      "votes": 2,
      "replies": [
        {
          "id": 635393,
          "postDate": "2019-09-27T13:23:13.320Z",
          "content": "<p>Thanks for the info. It would be really helpful if you knew how to rotate the images with the given direction cosines. From what I gather the indices 1,2,3 can be omitted. And the direction cosines of all the slices in the same study are same. So we will need to apply the transformations on the 3d array generated (which I have done already). I tried rotation based on the direction cosines but thats where I hit a dead end.</p>",
          "rawMarkdown": "Thanks for the info. It would be really helpful if you knew how to rotate the images with the given direction cosines. From what I gather the indices 1,2,3 can be omitted. And the direction cosines of all the slices in the same study are same. So we will need to apply the transformations on the 3d array generated (which I have done already). I tried rotation based on the direction cosines but thats where I hit a dead end."
        }
      ]
    },
    {
      "id": 635015,
      "postDate": "2019-09-27T04:15:20.550Z",
      "content": "<p>How can I use the orientations to rotate and standardise the 3d reconstructions?</p>",
      "rawMarkdown": "How can I use the orientations to rotate and standardise the 3d reconstructions?",
      "votes": 2
    },
    {
      "id": 647644,
      "postDate": "2019-10-13T03:11:45.497Z",
      "content": "<p>I think this is a great question! I would like to standardize the orientation in my preprocessing stage but i do not know how to interperate the orientation vector.</p>\n\n<p>I created <a href=\"https://www.kaggle.com/nikperi/image-orientation?scriptVersionId=21878745\">this notebook</a> which identifies anomalous orientations...but i still couldn't figure out the vector </p>\n\n<p>I am considering a traditional approach where i find the principal axis of the brain and standardize that...if i cannot do that I will just randomize orientation with some augmentation so my model wont over fit</p>",
      "rawMarkdown": "I think this is a great question! I would like to standardize the orientation in my preprocessing stage but i do not know how to interperate the orientation vector.\n\nI created [this notebook](https://www.kaggle.com/nikperi/image-orientation?scriptVersionId=21878745) which identifies anomalous orientations...but i still couldn't figure out the vector \n\nI am considering a traditional approach where i find the principal axis of the brain and standardize that...if i cannot do that I will just randomize orientation with some augmentation so my model wont over fit"
    }
  ],
  "comments": [
    {
      "id": 635353,
      "author_name": "srs",
      "author_url": "",
      "post_date": "2019-09-27T12:17:41.793000",
      "content": "<p>Hi,</p>\n\n<p>there is this thread where 3D volumes have been created <a href=\"https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316\">https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316</a>. So creating 3D reconstructions is definitely possible. \nThe image orientation and rotation, just describe the position of the image in the scanner.</p>\n\n<p>In fMRI (I hope I am describing it correctly), you typically have an affine matrix, which describes the voxel's position in space. It is basically a way to transform your voxel space to real \"space\" coordinates (e.g. mm). \nI think the way an affine matrix could be created from the information is described here <a href=\"https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037\">https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037</a>. </p>\n\n<p>Using this kind of information you can try to align your 3D image to the same space of a template or other Patient, for example resample the voxel sizes to a common space. \nHowever, to find the correct overlap you would need some more advanced matching algorithms, shifting and rotating the slices. \nAnd finally, to actually spatially normalize the images, you will need non-linear approaches to stretch and morph the image. </p>\n\n<p>I hope that helps. </p>",
      "votes": 2,
      "replies": [
        {
          "id": 635393,
          "author_name": "Shubhang",
          "author_url": "",
          "post_date": "2019-09-27T13:23:13.320000",
          "content": "<p>Thanks for the info. It would be really helpful if you knew how to rotate the images with the given direction cosines. From what I gather the indices 1,2,3 can be omitted. And the direction cosines of all the slices in the same study are same. So we will need to apply the transformations on the 3d array generated (which I have done already). I tried rotation based on the direction cosines but thats where I hit a dead end.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 647644,
      "author_name": "Nikhil Peri",
      "author_url": "",
      "post_date": "2019-10-13T03:11:45.497000",
      "content": "<p>I think this is a great question! I would like to standardize the orientation in my preprocessing stage but i do not know how to interperate the orientation vector.</p>\n\n<p>I created <a href=\"https://www.kaggle.com/nikperi/image-orientation?scriptVersionId=21878745\">this notebook</a> which identifies anomalous orientations...but i still couldn't figure out the vector </p>\n\n<p>I am considering a traditional approach where i find the principal axis of the brain and standardize that...if i cannot do that I will just randomize orientation with some augmentation so my model wont over fit</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "635353": "Hi,\n\nthere is this thread where 3D volumes have been created [https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316](https://www.kaggle.com/c/rsna-intracranial-hemorrhage-detection/discussion/109552#latest-631316). So creating 3D reconstructions is definitely possible. \nThe image orientation and rotation, just describe the position of the image in the scanner.\n\nIn fMRI (I hope I am describing it correctly), you typically have an affine matrix, which describes the voxel's position in space. It is basically a way to transform your voxel space to real \"space\" coordinates (e.g. mm). \nI think the way an affine matrix could be created from the information is described here [https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037](https://dicom.innolitics.com/ciods/ct-image/image-plane/00200037). \n\nUsing this kind of information you can try to align your 3D image to the same space of a template or other Patient, for example resample the voxel sizes to a common space. \nHowever, to find the correct overlap you would need some more advanced matching algorithms, shifting and rotating the slices. \nAnd finally, to actually spatially normalize the images, you will need non-linear approaches to stretch and morph the image. \n\nI hope that helps. ",
    "635015": "How can I use the orientations to rotate and standardise the 3d reconstructions?",
    "647644": "I think this is a great question! I would like to standardize the orientation in my preprocessing stage but i do not know how to interperate the orientation vector.\n\nI created [this notebook](https://www.kaggle.com/nikperi/image-orientation?scriptVersionId=21878745) which identifies anomalous orientations...but i still couldn't figure out the vector \n\nI am considering a traditional approach where i find the principal axis of the brain and standardize that...if i cannot do that I will just randomize orientation with some augmentation so my model wont over fit"
  }
}