{
  "id": 254809,
  "title": "T1wCE Sometimes Weird Orientation/Dimensions",
  "url": "/competitions/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/254809",
  "author_name": "",
  "post_date": "2021-07-23T17:48:57.990601Z",
  "votes": 10,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hi there, I noticed that sometimes the <strong><code>T1wCE</code></strong> dicoms have an odd shape that seems too consistent to be a coincidence.</p>\n<p>Most folders of dicom images can be interpreted as a 3d array with the given dimensions:</p>\n<ul>\n<li>Width = dicom property <strong><code>COLS</code></strong></li>\n<li>Height = dicom property <strong><code>ROWS</code></strong></li>\n<li>Depth = number of dicom files</li>\n</ul>\n<p>This will usually yield a shape of <strong><code>(X, X, Z)</code></strong> where <strong><code>X</code></strong> is a single dimension (i.e. square images) and <strong><code>Z</code></strong> is the depth. This pattern is observable in almost all of the examples… with some exceptions.</p>\n<p>The most common exception is when we get a shape of <strong><code>(X, Y, Z)</code></strong> where <strong><code>X</code></strong> and <strong><code>Y</code></strong> are different dimensions (i.e. rectangle images) and <strong><code>Z</code></strong> is the depth. This seems acceptable.</p>\n<p>However, there is sometimes another exception to this pattern found within <strong><code>T1wCE</code></strong> scans. In these scans, the pattern is <strong><code>(X, Z, Z)</code></strong> where <strong><code>X</code></strong> is a single dimension (width) and <strong><code>Z</code></strong> is both the depth and the height. I thought at first this was a coincidence and the images were just rectangular with the height coincidentally being equal to the depth…. but it happens quite frequently with <strong><code>T1wCE</code></strong> scans and seems to almost never happen for any other types of scans.</p>\n<p><br></p>\n<p><strong><em>Are these scans rotated?</em></strong></p>\n<p><br></p>\n<p>I tried visualizing … but I'm not the best at understanding 3-dimensional structures intuitively and couldn't figure it out.</p>",
  "messages": [
    {
      "id": "1398059",
      "postDate": "07/23/2021 17:48:57",
      "content": "<p>Hi there, I noticed that sometimes the <strong><code>T1wCE</code></strong> dicoms have an odd shape that seems too consistent to be a coincidence.</p>\n<p>Most folders of dicom images can be interpreted as a 3d array with the given dimensions:</p>\n<ul>\n<li>Width = dicom property <strong><code>COLS</code></strong></li>\n<li>Height = dicom property <strong><code>ROWS</code></strong></li>\n<li>Depth = number of dicom files</li>\n</ul>\n<p>This will usually yield a shape of <strong><code>(X, X, Z)</code></strong> where <strong><code>X</code></strong> is a single dimension (i.e. square images) and <strong><code>Z</code></strong> is the depth. This pattern is observable in almost all of the examples… with some exceptions.</p>\n<p>The most common exception is when we get a shape of <strong><code>(X, Y, Z)</code></strong> where <strong><code>X</code></strong> and <strong><code>Y</code></strong> are different dimensions (i.e. rectangle images) and <strong><code>Z</code></strong> is the depth. This seems acceptable.</p>\n<p>However, there is sometimes another exception to this pattern found within <strong><code>T1wCE</code></strong> scans. In these scans, the pattern is <strong><code>(X, Z, Z)</code></strong> where <strong><code>X</code></strong> is a single dimension (width) and <strong><code>Z</code></strong> is both the depth and the height. I thought at first this was a coincidence and the images were just rectangular with the height coincidentally being equal to the depth…. but it happens quite frequently with <strong><code>T1wCE</code></strong> scans and seems to almost never happen for any other types of scans.</p>\n<p><br></p>\n<p><strong><em>Are these scans rotated?</em></strong></p>\n<p><br></p>\n<p>I tried visualizing … but I'm not the best at understanding 3-dimensional structures intuitively and couldn't figure it out.</p>",
      "rawMarkdown": "Hi there, I noticed that sometimes the **`T1wCE`** dicoms have an odd shape that seems too consistent to be a coincidence.\n\nMost folders of dicom images can be interpreted as a 3d array with the given dimensions:\n- Width = dicom property **`COLS`**\n- Height = dicom property **`ROWS`**\n- Depth = number of dicom files\n\nThis will usually yield a shape of **`(X, X, Z)`** where **`X`** is a single dimension (i.e. square images) and **`Z`** is the depth. This pattern is observable in almost all of the examples... with some exceptions.\n\nThe most common exception is when we get a shape of **`(X, Y, Z)`** where **`X`** and **`Y`** are different dimensions (i.e. rectangle images) and **`Z`** is the depth. This seems acceptable.\n\nHowever, there is sometimes another exception to this pattern found within **`T1wCE`** scans. In these scans, the pattern is **`(X, Z, Z)`** where **`X`** is a single dimension (width) and **`Z`** is both the depth and the height. I thought at first this was a coincidence and the images were just rectangular with the height coincidentally being equal to the depth.... but it happens quite frequently with **`T1wCE`** scans and seems to almost never happen for any other types of scans.\n\n<br>\n\n***Are these scans rotated?***\n\n<br>\n\n I tried visualizing ... but I'm not the best at understanding 3-dimensional structures intuitively and couldn't figure it out.",
      "votes": null
    },
    {
      "id": "1398211",
      "postDate": "07/23/2021 21:15:43",
      "content": "<p>It's kind of a coincidence. Some of the acquisition matrices MR images are scanned as are smaller than you would expect. A lot of them are 256x192 (or smaller), with a pixel spacing of 1 .. or really close to it (~0.9). That means one pixel is equal to 1mm in the real world. So, If I wanted to do a multiplanar reconstruction at 1mm thickness, with no space between slices, I would need to export 256 images .. which coincidently is the width of the matrix (depending on which plane is being reconstructed).</p>",
      "rawMarkdown": "It's kind of a coincidence. Some of the acquisition matrices MR images are scanned as are smaller than you would expect. A lot of them are 256x192 (or smaller), with a pixel spacing of 1 .. or really close to it (~0.9). That means one pixel is equal to 1mm in the real world. So, If I wanted to do a multiplanar reconstruction at 1mm thickness, with no space between slices, I would need to export 256 images .. which coincidently is the width of the matrix (depending on which plane is being reconstructed).",
      "votes": null
    },
    {
      "id": "1398258",
      "postDate": "07/23/2021 23:29:55",
      "content": "<p>The interesting thing about this is that when the image count matches the dimensions .. (256, 512), you can stack them into a 3D array and reformat into other 2D planes (coronal to sagittal etc), or 3D, and get a reasonably accurate reformation without calculating slice position from DICOM tags. </p>\n<p>In fact, it's the only time you can simply stack jpegs to reformat them properly.</p>",
      "rawMarkdown": "The interesting thing about this is that when the image count matches the dimensions .. (256, 512), you can stack them into a 3D array and reformat into other 2D planes (coronal to sagittal etc), or 3D, and get a reasonably accurate reformation without calculating slice position from DICOM tags. \n\nIn fact, it's the only time you can simply stack jpegs to reformat them properly.",
      "votes": null
    },
    {
      "id": "1400052",
      "postDate": "07/26/2021 01:51:16",
      "content": "<p>Fascinating, thanks David. Many high yield contributions to this comp so far.</p>",
      "rawMarkdown": "Fascinating, thanks David. Many high yield contributions to this comp so far.",
      "votes": null
    },
    {
      "id": "1401400",
      "postDate": "07/27/2021 09:40:39",
      "content": "<p>Check <a href=\"https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes\" target=\"_blank\">https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes</a> for the visualization of MRIs, it's my favorite </p>",
      "rawMarkdown": "Check https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes for the visualization of MRIs, it's my favorite",
      "votes": null
    },
    {
      "id": "1401661",
      "postDate": "07/27/2021 13:26:57",
      "content": "<p>If you want to visualise images in video format, <a href=\"https://www.kaggle.com/abhijeetptl5/rsna-miccai-video\" target=\"_blank\">this</a> would be helpful.</p>",
      "rawMarkdown": "If you want to visualise images in video format, [this](https://www.kaggle.com/abhijeetptl5/rsna-miccai-video) would be helpful.",
      "votes": null
    },
    {
      "id": "1406033",
      "postDate": "07/31/2021 12:26:07",
      "content": "<p>Agree with this statement for <a href=\"https://www.kaggle.com/davidbroberts\" target=\"_blank\">@davidbroberts</a> !</p>",
      "rawMarkdown": "Agree with this statement for @davidbroberts !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1398211,
      "author_name": "davidbroberts",
      "author_url": "",
      "post_date": "07/23/2021 21:15:43",
      "content": "<p>It's kind of a coincidence. Some of the acquisition matrices MR images are scanned as are smaller than you would expect. A lot of them are 256x192 (or smaller), with a pixel spacing of 1 .. or really close to it (~0.9). That means one pixel is equal to 1mm in the real world. So, If I wanted to do a multiplanar reconstruction at 1mm thickness, with no space between slices, I would need to export 256 images .. which coincidently is the width of the matrix (depending on which plane is being reconstructed).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1398258,
      "author_name": "davidbroberts",
      "author_url": "",
      "post_date": "07/23/2021 23:29:55",
      "content": "<p>The interesting thing about this is that when the image count matches the dimensions .. (256, 512), you can stack them into a 3D array and reformat into other 2D planes (coronal to sagittal etc), or 3D, and get a reasonably accurate reformation without calculating slice position from DICOM tags. </p>\n<p>In fact, it's the only time you can simply stack jpegs to reformat them properly.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1400052,
          "author_name": "reubenschmidt",
          "author_url": "",
          "post_date": "07/26/2021 01:51:16",
          "content": "<p>Fascinating, thanks David. Many high yield contributions to this comp so far.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1406033,
          "author_name": "elenaeb",
          "author_url": "",
          "post_date": "07/31/2021 12:26:07",
          "content": "<p>Agree with this statement for <a href=\"https://www.kaggle.com/davidbroberts\" target=\"_blank\">@davidbroberts</a> !</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1401400,
      "author_name": "ranafago",
      "author_url": "",
      "post_date": "07/27/2021 09:40:39",
      "content": "<p>Check <a href=\"https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes\" target=\"_blank\">https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes</a> for the visualization of MRIs, it's my favorite </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1401661,
      "author_name": "abhijeetptl5",
      "author_url": "",
      "post_date": "07/27/2021 13:26:57",
      "content": "<p>If you want to visualise images in video format, <a href=\"https://www.kaggle.com/abhijeetptl5/rsna-miccai-video\" target=\"_blank\">this</a> would be helpful.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1398059": "Hi there, I noticed that sometimes the **`T1wCE`** dicoms have an odd shape that seems too consistent to be a coincidence.\n\nMost folders of dicom images can be interpreted as a 3d array with the given dimensions:\n- Width = dicom property **`COLS`**\n- Height = dicom property **`ROWS`**\n- Depth = number of dicom files\n\nThis will usually yield a shape of **`(X, X, Z)`** where **`X`** is a single dimension (i.e. square images) and **`Z`** is the depth. This pattern is observable in almost all of the examples... with some exceptions.\n\nThe most common exception is when we get a shape of **`(X, Y, Z)`** where **`X`** and **`Y`** are different dimensions (i.e. rectangle images) and **`Z`** is the depth. This seems acceptable.\n\nHowever, there is sometimes another exception to this pattern found within **`T1wCE`** scans. In these scans, the pattern is **`(X, Z, Z)`** where **`X`** is a single dimension (width) and **`Z`** is both the depth and the height. I thought at first this was a coincidence and the images were just rectangular with the height coincidentally being equal to the depth.... but it happens quite frequently with **`T1wCE`** scans and seems to almost never happen for any other types of scans.\n\n<br>\n\n***Are these scans rotated?***\n\n<br>\n\n I tried visualizing ... but I'm not the best at understanding 3-dimensional structures intuitively and couldn't figure it out.",
    "1398211": "It's kind of a coincidence. Some of the acquisition matrices MR images are scanned as are smaller than you would expect. A lot of them are 256x192 (or smaller), with a pixel spacing of 1 .. or really close to it (~0.9). That means one pixel is equal to 1mm in the real world. So, If I wanted to do a multiplanar reconstruction at 1mm thickness, with no space between slices, I would need to export 256 images .. which coincidently is the width of the matrix (depending on which plane is being reconstructed).",
    "1398258": "The interesting thing about this is that when the image count matches the dimensions .. (256, 512), you can stack them into a 3D array and reformat into other 2D planes (coronal to sagittal etc), or 3D, and get a reasonably accurate reformation without calculating slice position from DICOM tags. \n\nIn fact, it's the only time you can simply stack jpegs to reformat them properly.",
    "1400052": "Fascinating, thanks David. Many high yield contributions to this comp so far.",
    "1401400": "Check https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes for the visualization of MRIs, it's my favorite",
    "1401661": "If you want to visualise images in video format, [this](https://www.kaggle.com/abhijeetptl5/rsna-miccai-video) would be helpful.",
    "1406033": "Agree with this statement for @davidbroberts !"
  },
  "source": "meta"
}