{
  "id": 252968,
  "title": "Empty images on DICOM files 🤔",
  "url": "/competitions/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252968",
  "author_name": "",
  "post_date": "2021-07-14T12:58:31.537287200Z",
  "votes": 17,
  "comment_count": 4,
  "views": 0,
  "content": "<p>For your information, there are multiple DICOM files with empty images (composed of only zeros).</p>\n<p><strong>Examples</strong></p>\n<ul>\n<li><code>test/00393/FLAIR/Image-4.dcm</code>.</li>\n</ul>\n<p><strong>Note also that there are entire folders composed of empty images only</strong>, for instance  <code>train/00109/FLAIR/</code>.</p>\n<p><strong>Script for checking</strong></p>\n<p>You can use this code to check for empty images:</p>\n<pre><code>&gt;&gt;&gt; import pydicom\n&gt;&gt;&gt; dicom = pydicom.read_file(\"../input/rsna-miccai-brain-tumor-radiogenomic-classification/test/00393/FLAIR/Image-4.dcm\")\n&gt;&gt;&gt; dicom.pixel_array.sum()\n0\n</code></pre>\n<p><strong>Reasons</strong></p>\n<p>As <a href=\"https://www.kaggle.com/davidbroberts\" target=\"_blank\">@davidbroberts</a> pointed out also <a href=\"https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884\" target=\"_blank\">here</a>, it's normal that some images are empty (as this would correspond to the top and bottom images of a 3D reconstruction I guess). Not sure though why some folders are completely empty. I will update this post once we have a clearer view of the issue.</p>\n<p>Happy kaggling to all!!</p>",
  "messages": [
    {
      "id": "1387826",
      "postDate": "07/14/2021 12:58:31",
      "content": "<p>For your information, there are multiple DICOM files with empty images (composed of only zeros).</p>\n<p><strong>Examples</strong></p>\n<ul>\n<li><code>test/00393/FLAIR/Image-4.dcm</code>.</li>\n</ul>\n<p><strong>Note also that there are entire folders composed of empty images only</strong>, for instance  <code>train/00109/FLAIR/</code>.</p>\n<p><strong>Script for checking</strong></p>\n<p>You can use this code to check for empty images:</p>\n<pre><code>&gt;&gt;&gt; import pydicom\n&gt;&gt;&gt; dicom = pydicom.read_file(\"../input/rsna-miccai-brain-tumor-radiogenomic-classification/test/00393/FLAIR/Image-4.dcm\")\n&gt;&gt;&gt; dicom.pixel_array.sum()\n0\n</code></pre>\n<p><strong>Reasons</strong></p>\n<p>As <a href=\"https://www.kaggle.com/davidbroberts\" target=\"_blank\">@davidbroberts</a> pointed out also <a href=\"https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884\" target=\"_blank\">here</a>, it's normal that some images are empty (as this would correspond to the top and bottom images of a 3D reconstruction I guess). Not sure though why some folders are completely empty. I will update this post once we have a clearer view of the issue.</p>\n<p>Happy kaggling to all!!</p>",
      "rawMarkdown": "For your information, there are multiple DICOM files with empty images (composed of only zeros).\n\n**Examples**\n\n - `test/00393/FLAIR/Image-4.dcm`.\n\n\n**Note also that there are entire folders composed of empty images only**, for instance  `train/00109/FLAIR/`.\n\n**Script for checking**\n\nYou can use this code to check for empty images:\n\n```\n>>> import pydicom\n>>> dicom = pydicom.read_file(\"../input/rsna-miccai-brain-tumor-radiogenomic-classification/test/00393/FLAIR/Image-4.dcm\")\n>>> dicom.pixel_array.sum()\n0\n```\n**Reasons**\n\nAs @davidbroberts pointed out also [here](https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884), it's normal that some images are empty (as this would correspond to the top and bottom images of a 3D reconstruction I guess). Not sure though why some folders are completely empty. I will update this post once we have a clearer view of the issue.\n\nHappy kaggling to all!!",
      "votes": null
    },
    {
      "id": "1387835",
      "postDate": "07/14/2021 13:03:46",
      "content": "<p>That's normal. Here's another thread about it -&gt; <a href=\"https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884\" target=\"_blank\">https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884</a></p>",
      "rawMarkdown": "That's normal. Here's another thread about it -> https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884",
      "votes": null
    },
    {
      "id": "1387940",
      "postDate": "07/14/2021 14:29:57",
      "content": "<p>Thanks David! All clear!</p>",
      "rawMarkdown": "Thanks David! All clear!",
      "votes": null
    },
    {
      "id": "1389413",
      "postDate": "07/15/2021 17:22:57",
      "content": "<p>Great job! Upvoted!👍 Do take a look at my notebooks and give your valuable feedback <a href=\"https://www.kaggle.com/jonathanbesomi\" target=\"_blank\">@jonathanbesomi</a> </p>",
      "rawMarkdown": "Great job! Upvoted!👍 Do take a look at my notebooks and give your valuable feedback @jonathanbesomi",
      "votes": null
    },
    {
      "id": "1485585",
      "postDate": "08/22/2021 08:39:15",
      "content": "<p>Wow! Very useful, thank you for the script</p>",
      "rawMarkdown": "Wow! Very useful, thank you for the script",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1387835,
      "author_name": "davidbroberts",
      "author_url": "",
      "post_date": "07/14/2021 13:03:46",
      "content": "<p>That's normal. Here's another thread about it -&gt; <a href=\"https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884\" target=\"_blank\">https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1387940,
          "author_name": "jonathanbesomi",
          "author_url": "",
          "post_date": "07/14/2021 14:29:57",
          "content": "<p>Thanks David! All clear!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1389413,
      "author_name": "tahir1413",
      "author_url": "",
      "post_date": "07/15/2021 17:22:57",
      "content": "<p>Great job! Upvoted!👍 Do take a look at my notebooks and give your valuable feedback <a href=\"https://www.kaggle.com/jonathanbesomi\" target=\"_blank\">@jonathanbesomi</a> </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1485585,
      "author_name": "georgiisirotenko",
      "author_url": "",
      "post_date": "08/22/2021 08:39:15",
      "content": "<p>Wow! Very useful, thank you for the script</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1387826": "For your information, there are multiple DICOM files with empty images (composed of only zeros).\n\n**Examples**\n\n - `test/00393/FLAIR/Image-4.dcm`.\n\n\n**Note also that there are entire folders composed of empty images only**, for instance  `train/00109/FLAIR/`.\n\n**Script for checking**\n\nYou can use this code to check for empty images:\n\n```\n>>> import pydicom\n>>> dicom = pydicom.read_file(\"../input/rsna-miccai-brain-tumor-radiogenomic-classification/test/00393/FLAIR/Image-4.dcm\")\n>>> dicom.pixel_array.sum()\n0\n```\n**Reasons**\n\nAs @davidbroberts pointed out also [here](https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884), it's normal that some images are empty (as this would correspond to the top and bottom images of a 3D reconstruction I guess). Not sure though why some folders are completely empty. I will update this post once we have a clearer view of the issue.\n\nHappy kaggling to all!!",
    "1387835": "That's normal. Here's another thread about it -> https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/252884",
    "1387940": "Thanks David! All clear!",
    "1389413": "Great job! Upvoted!👍 Do take a look at my notebooks and give your valuable feedback @jonathanbesomi",
    "1485585": "Wow! Very useful, thank you for the script"
  },
  "source": "meta"
}