{
  "id": 170710,
  "title": "A problem of GDCM about the pixel_array for patient with ID = ID00011637202177653955184",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/170710",
  "author_name": "",
  "post_date": "2020-07-28T17:11:18.309706200Z",
  "votes": 12,
  "comment_count": 26,
  "views": 0,
  "content": "<p>It is very strange that I cannot obtain the information of pixel_array of the <code>.dcm</code> files in the folders of patient with ID = ID00011637202177653955184. It always shows that <code>RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. )</code>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F854178d857a4ef7185bc47a80016fe80%2FWeChat%20Screenshot_20200728191048.png?generation=1595956274627040&amp;alt=media\" alt=\"\"></p>\n\n<p>Even I install the gdcm by <code>!conda install -c conda-forge gdcm -y</code>, the problem is still there.\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F6c3b6024d69ff05fc07a4edd50797271%2FWeChat%20Screenshot_20200728191144.png?generation=1595956321461082&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "949498",
      "postDate": "07/28/2020 17:11:18",
      "content": "<p>It is very strange that I cannot obtain the information of pixel_array of the <code>.dcm</code> files in the folders of patient with ID = ID00011637202177653955184. It always shows that <code>RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. )</code>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F854178d857a4ef7185bc47a80016fe80%2FWeChat%20Screenshot_20200728191048.png?generation=1595956274627040&amp;alt=media\" alt=\"\"></p>\n\n<p>Even I install the gdcm by <code>!conda install -c conda-forge gdcm -y</code>, the problem is still there.\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F6c3b6024d69ff05fc07a4edd50797271%2FWeChat%20Screenshot_20200728191144.png?generation=1595956321461082&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "It is very strange that I cannot obtain the information of pixel_array of the `.dcm` files in the folders of patient with ID = ID00011637202177653955184. It always shows that `RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. )`\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F854178d857a4ef7185bc47a80016fe80%2FWeChat%20Screenshot_20200728191048.png?generation=1595956274627040&amp;alt=media)\n\nEven I install the gdcm by `!conda install -c conda-forge gdcm -y`, the problem is still there.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F6c3b6024d69ff05fc07a4edd50797271%2FWeChat%20Screenshot_20200728191144.png?generation=1595956321461082&amp;alt=media)",
      "votes": null
    },
    {
      "id": "949561",
      "postDate": "07/28/2020 17:59:03",
      "content": "<p>From your error, I think GDCM has not been installed properly. check if <code>import gdcm</code> works.</p>",
      "rawMarkdown": "From your error, I think GDCM has not been installed properly. check if `import gdcm` works.",
      "votes": null
    },
    {
      "id": "949641",
      "postDate": "07/28/2020 19:06:12",
      "content": "<p>I have checked gdcm has been well imported. But it still does not work.</p>",
      "rawMarkdown": "I have checked gdcm has been well imported. But it still does not work.",
      "votes": null
    },
    {
      "id": "950424",
      "postDate": "07/29/2020 11:40:51",
      "content": "<p>try this:\n!conda install gdcm -c conda-forge -y\nand \nimport pydicom</p>\n\n<p><strong>Do not import gdcm</strong></p>\n\n<p>Use pydicom for reading using pydicom.dcmread('DICOM_PATH')</p>",
      "rawMarkdown": "try this:\n!conda install gdcm -c conda-forge -y\nand \nimport pydicom\n\n**Do not import gdcm**\n\nUse pydicom for reading using pydicom.dcmread('DICOM_PATH')",
      "votes": null
    },
    {
      "id": "950498",
      "postDate": "07/29/2020 12:41:17",
      "content": "<p>Yes, you should not import gdcm. I suggested it just as a debugging step to make sure it has been installed properly.</p>",
      "rawMarkdown": "Yes, you should not import gdcm. I suggested it just as a debugging step to make sure it has been installed properly.",
      "votes": null
    },
    {
      "id": "952223",
      "postDate": "07/30/2020 18:04:41",
      "content": "<p>Even I am facing the same error, even after trying the suggested fixes. Were you able to solve this problem? </p>",
      "rawMarkdown": "Even I am facing the same error, even after trying the suggested fixes. Were you able to solve this problem?",
      "votes": null
    },
    {
      "id": "952680",
      "postDate": "07/31/2020 06:27:12",
      "content": "<p>No, it is a very strange problem. Wish someone can solve this problem. 🖖 </p>",
      "rawMarkdown": "No, it is a very strange problem. Wish someone can solve this problem. 🖖",
      "votes": null
    },
    {
      "id": "953302",
      "postDate": "07/31/2020 17:09:52",
      "content": "<p>I have the same problem, on my laptop I had solved it with:\n. conda install -c conda-forge gdcm\n. pip install pylibjpeg pylibjpeg-libjpeg</p>\n\n<p>But in the cloud it doesn't work.</p>",
      "rawMarkdown": "I have the same problem, on my laptop I had solved it with:\n. conda install -c conda-forge gdcm\n. pip install pylibjpeg pylibjpeg-libjpeg\n\nBut in the cloud it doesn't work.",
      "votes": null
    },
    {
      "id": "953323",
      "postDate": "07/31/2020 17:39:51",
      "content": "<p>Usually, both of these packages are installed by executing <strong>!conda install gdcm -c conda-forge -y</strong></p>",
      "rawMarkdown": "Usually, both of these packages are installed by executing **!conda install gdcm -c conda-forge -y**",
      "votes": null
    },
    {
      "id": "953393",
      "postDate": "07/31/2020 18:45:35",
      "content": "<p>In case you still have problems.</p>\n\n<p>Installing these:\n! conda install -c conda-forge gdcm -y\n! pip install pylibjpeg pylibjpeg-libjpeg</p>\n\n<p>and configuring Environment (preferences):</p>\n\n<p>. Always use latest environment</p>\n\n<p>The kernel works</p>",
      "rawMarkdown": "In case you still have problems.\n\nInstalling these:\n! conda install -c conda-forge gdcm -y\n! pip install pylibjpeg pylibjpeg-libjpeg\n\nand configuring Environment (preferences):\n\n. Always use latest environment\n\nThe kernel works",
      "votes": null
    },
    {
      "id": "953395",
      "postDate": "07/31/2020 18:48:12",
      "content": "<p>I don't know Roland, on my laptop this worked until I did the second installation line\n. pip install pylibjpeg pylibjpeg-libjpeg</p>",
      "rawMarkdown": "I don't know Roland, on my laptop this worked until I did the second installation line\n. pip install pylibjpeg pylibjpeg-libjpeg",
      "votes": null
    },
    {
      "id": "953607",
      "postDate": "07/31/2020 23:08:21",
      "content": "<p>Maybe your load_scan function uses pydicom.read_file, in this case you only need to change to pydicom.dcmread and it works with import pydicom.\n<a href=\"https://github.com/pydicom/pydicom/issues/475\">https://github.com/pydicom/pydicom/issues/475</a></p>",
      "rawMarkdown": "Maybe your load_scan function uses pydicom.read_file, in this case you only need to change to pydicom.dcmread and it works with import pydicom.\nhttps://github.com/pydicom/pydicom/issues/475",
      "votes": null
    },
    {
      "id": "967886",
      "postDate": "08/12/2020 15:01:48",
      "content": "<p>Anyone knows how to solve this ?</p>",
      "rawMarkdown": "Anyone knows how to solve this ?",
      "votes": null
    },
    {
      "id": "970982",
      "postDate": "08/15/2020 04:20:41",
      "content": "<p>I have tried all the suggestions here i.e. executing below and using pydicom.readfile and still facing this issue. Please let me know if there is fix for this.</p>\n<p>!conda install -c conda-forge gdcm<br>\n!pip install pylibjpeg pylibjpeg-libjpeg</p>",
      "rawMarkdown": "I have tried all the suggestions here i.e. executing below and using pydicom.readfile and still facing this issue. Please let me know if there is fix for this.\n\n!conda install -c conda-forge gdcm\n!pip install pylibjpeg pylibjpeg-libjpeg",
      "votes": null
    },
    {
      "id": "970991",
      "postDate": "08/15/2020 04:34:26",
      "content": "<p>Using pydicom.dcmread and adding the below at the beginning of the kernel worked for me.</p>\n<p>!conda install -c conda-forge pillow -y<br>\n!conda install -c conda-forge pydicom -y<br>\n!conda install -c conda-forge gdcm -y<br>\n!pip install pylibjpeg pylibjpeg-libjpeg</p>\n<p>It is very important to <strong>restart the kernel</strong> once you had the error else you will continue to have the error even after performing the above.</p>",
      "rawMarkdown": "Using pydicom.dcmread and adding the below at the beginning of the kernel worked for me.\n\n!conda install -c conda-forge pillow -y\n!conda install -c conda-forge pydicom -y\n!conda install -c conda-forge gdcm -y\n!pip install pylibjpeg pylibjpeg-libjpeg\n\nIt is very important to **restart the kernel** once you had the error else you will continue to have the error even after performing the above.",
      "votes": null
    },
    {
      "id": "985060",
      "postDate": "08/25/2020 13:28:09",
      "content": "<p>Hi! <br>\nDid you find a solution?<br>\nFor me the problem is with the same folder :/</p>",
      "rawMarkdown": "Hi! \nDid you find a solution?\nFor me the problem is with the same folder :/",
      "votes": null
    },
    {
      "id": "1007742",
      "postDate": "09/12/2020 12:52:36",
      "content": "<p>I tried all solutions mentioned in this discussion but still it doesn't work for me. Anyone knows any other solution?</p>",
      "rawMarkdown": "I tried all solutions mentioned in this discussion but still it doesn't work for me. Anyone knows any other solution?",
      "votes": null
    },
    {
      "id": "1007855",
      "postDate": "09/12/2020 15:29:01",
      "content": "<p>I was getting this issue even after doing everything right from package perspective, then found it's happening for these 2 IDs:<br>\nBAD_ID = ['ID00011637202177653955184', 'ID00052637202186188008618']<br>\nYou would need to control for these 2 image reads and then it should be fine.</p>",
      "rawMarkdown": "I was getting this issue even after doing everything right from package perspective, then found it's happening for these 2 IDs:\nBAD_ID = ['ID00011637202177653955184', 'ID00052637202186188008618']\nYou would need to control for these 2 image reads and then it should be fine.",
      "votes": null
    },
    {
      "id": "1327424",
      "postDate": "05/29/2021 09:06:33",
      "content": "<p>Thanks a lot!! I solved this problem by your advise</p>",
      "rawMarkdown": "Thanks a lot!! I solved this problem by your advise",
      "votes": null
    },
    {
      "id": "1364599",
      "postDate": "06/25/2021 05:17:27",
      "content": "<p>Following lines solved the problem in my Kaggle notebook.</p>\n<p>!pip3 install python-gdcm<br>\nimport gdcm</p>\n<h1>if gdcm is imported that error does not occur</h1>",
      "rawMarkdown": "Following lines solved the problem in my Kaggle notebook.\n\n!pip3 install python-gdcm\nimport gdcm\n# if gdcm is imported that error does not occur",
      "votes": null
    },
    {
      "id": "1374229",
      "postDate": "07/03/2021 06:17:15",
      "content": "<p>Run the following command in a cell and then restart &amp; clear your cells.<br>\n!conda install -c conda-forge gdcm -y</p>\n<p>this worked for me.</p>",
      "rawMarkdown": "Run the following command in a cell and then restart & clear your cells.\n!conda install -c conda-forge gdcm -y\n\nthis worked for me.",
      "votes": null
    },
    {
      "id": "1374277",
      "postDate": "07/03/2021 07:11:08",
      "content": "<h1>Try:</h1>\n<p>!pip3 install python-gdcm<br>\nimport gdcm</p>\n<h1>for more details</h1>\n<p><a href=\"https://www.kaggle.com/dipuk0506/dicom-files-to-rgb-512x512\" target=\"_blank\">https://www.kaggle.com/dipuk0506/dicom-files-to-rgb-512x512</a></p>",
      "rawMarkdown": "# Try:\n!pip3 install python-gdcm\nimport gdcm\n\n# for more details\nhttps://www.kaggle.com/dipuk0506/dicom-files-to-rgb-512x512",
      "votes": null
    },
    {
      "id": "1405473",
      "postDate": "07/30/2021 22:28:18",
      "content": "<p>this can happen when there are mixed of pixel array format in the dcm file, such as png, jpeg, you can upgrade numpy to version 1.20.x above and this solves the issue with  instead of dcmread, also  use pydicom.dcmread to read the dcm and decode it.<br>\nsuch dicom = pydicom.dcmread(path) , dicom.pixel_array instead of dicom = dcmread(path) , dicom.pixel_array</p>",
      "rawMarkdown": "this can happen when there are mixed of pixel array format in the dcm file, such as png, jpeg, you can upgrade numpy to version 1.20.x above and this solves the issue with  instead of dcmread, also  use pydicom.dcmread to read the dcm and decode it.\nsuch dicom = pydicom.dcmread(path) , dicom.pixel_array instead of dicom = dcmread(path) , dicom.pixel_array",
      "votes": null
    },
    {
      "id": "1503152",
      "postDate": "09/05/2021 04:23:22",
      "content": "<p>Thanks for sharing, just found this case. Hope installing gdcm can solve this</p>",
      "rawMarkdown": "Thanks for sharing, just found this case. Hope installing gdcm can solve this",
      "votes": null
    },
    {
      "id": "1926201",
      "postDate": "09/04/2022 16:20:42",
      "content": "<p>This worked for me ,thanks👍</p>",
      "rawMarkdown": "This worked for me ,thanks👍",
      "votes": null
    },
    {
      "id": "2143652",
      "postDate": "02/14/2023 12:44:02",
      "content": "<p>be sure that internet is set on when installing, for this on right side click on K, where you have the data, scroll down and there you have setting and internet button</p>",
      "rawMarkdown": "be sure that internet is set on when installing, for this on right side click on K, where you have the data, scroll down and there you have setting and internet button",
      "votes": null
    },
    {
      "id": "2143749",
      "postDate": "02/14/2023 13:33:30",
      "content": "<p>here is more detailed:<br>\n<a href=\"https://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985\" target=\"_blank\">https://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985</a></p>",
      "rawMarkdown": "here is more detailed:\nhttps://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 967886,
      "author_name": "marcinczelej",
      "author_url": "",
      "post_date": "08/12/2020 15:01:48",
      "content": "<p>Anyone knows how to solve this ?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 970982,
      "author_name": "havinath",
      "author_url": "",
      "post_date": "08/15/2020 04:20:41",
      "content": "<p>I have tried all the suggestions here i.e. executing below and using pydicom.readfile and still facing this issue. Please let me know if there is fix for this.</p>\n<p>!conda install -c conda-forge gdcm<br>\n!pip install pylibjpeg pylibjpeg-libjpeg</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 970991,
      "author_name": "havinath",
      "author_url": "",
      "post_date": "08/15/2020 04:34:26",
      "content": "<p>Using pydicom.dcmread and adding the below at the beginning of the kernel worked for me.</p>\n<p>!conda install -c conda-forge pillow -y<br>\n!conda install -c conda-forge pydicom -y<br>\n!conda install -c conda-forge gdcm -y<br>\n!pip install pylibjpeg pylibjpeg-libjpeg</p>\n<p>It is very important to <strong>restart the kernel</strong> once you had the error else you will continue to have the error even after performing the above.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1926201,
          "author_name": "drrajkulkarni",
          "author_url": "",
          "post_date": "09/04/2022 16:20:42",
          "content": "<p>This worked for me ,thanks👍</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2143652,
          "author_name": "diaconumadalina",
          "author_url": "",
          "post_date": "02/14/2023 12:44:02",
          "content": "<p>be sure that internet is set on when installing, for this on right side click on K, where you have the data, scroll down and there you have setting and internet button</p>",
          "votes": null,
          "replies": [
            {
              "id": 2143749,
              "author_name": "diaconumadalina",
              "author_url": "",
              "post_date": "02/14/2023 13:33:30",
              "content": "<p>here is more detailed:<br>\n<a href=\"https://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985\" target=\"_blank\">https://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985</a></p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 985060,
      "author_name": "israfelsalazar",
      "author_url": "",
      "post_date": "08/25/2020 13:28:09",
      "content": "<p>Hi! <br>\nDid you find a solution?<br>\nFor me the problem is with the same folder :/</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1007742,
      "author_name": "anuragtr",
      "author_url": "",
      "post_date": "09/12/2020 12:52:36",
      "content": "<p>I tried all solutions mentioned in this discussion but still it doesn't work for me. Anyone knows any other solution?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1007855,
      "author_name": "anuragtr",
      "author_url": "",
      "post_date": "09/12/2020 15:29:01",
      "content": "<p>I was getting this issue even after doing everything right from package perspective, then found it's happening for these 2 IDs:<br>\nBAD_ID = ['ID00011637202177653955184', 'ID00052637202186188008618']<br>\nYou would need to control for these 2 image reads and then it should be fine.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1364599,
      "author_name": "dipuk0506",
      "author_url": "",
      "post_date": "06/25/2021 05:17:27",
      "content": "<p>Following lines solved the problem in my Kaggle notebook.</p>\n<p>!pip3 install python-gdcm<br>\nimport gdcm</p>\n<h1>if gdcm is imported that error does not occur</h1>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1374229,
      "author_name": "vijaykumar1799",
      "author_url": "",
      "post_date": "07/03/2021 06:17:15",
      "content": "<p>Run the following command in a cell and then restart &amp; clear your cells.<br>\n!conda install -c conda-forge gdcm -y</p>\n<p>this worked for me.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1374277,
      "author_name": "dipuk0506",
      "author_url": "",
      "post_date": "07/03/2021 07:11:08",
      "content": "<h1>Try:</h1>\n<p>!pip3 install python-gdcm<br>\nimport gdcm</p>\n<h1>for more details</h1>\n<p><a href=\"https://www.kaggle.com/dipuk0506/dicom-files-to-rgb-512x512\" target=\"_blank\">https://www.kaggle.com/dipuk0506/dicom-files-to-rgb-512x512</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1405473,
      "author_name": "jenia2021",
      "author_url": "",
      "post_date": "07/30/2021 22:28:18",
      "content": "<p>this can happen when there are mixed of pixel array format in the dcm file, such as png, jpeg, you can upgrade numpy to version 1.20.x above and this solves the issue with  instead of dcmread, also  use pydicom.dcmread to read the dcm and decode it.<br>\nsuch dicom = pydicom.dcmread(path) , dicom.pixel_array instead of dicom = dcmread(path) , dicom.pixel_array</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1503152,
      "author_name": "matdadi",
      "author_url": "",
      "post_date": "09/05/2021 04:23:22",
      "content": "<p>Thanks for sharing, just found this case. Hope installing gdcm can solve this</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 949561,
      "author_name": "ahmedhshahin",
      "author_url": "",
      "post_date": "07/28/2020 17:59:03",
      "content": "<p>From your error, I think GDCM has not been installed properly. check if <code>import gdcm</code> works.</p>",
      "votes": null,
      "replies": [
        {
          "id": 949641,
          "author_name": "jumpingmandt",
          "author_url": "",
          "post_date": "07/28/2020 19:06:12",
          "content": "<p>I have checked gdcm has been well imported. But it still does not work.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 953302,
          "author_name": "noryab",
          "author_url": "",
          "post_date": "07/31/2020 17:09:52",
          "content": "<p>I have the same problem, on my laptop I had solved it with:\n. conda install -c conda-forge gdcm\n. pip install pylibjpeg pylibjpeg-libjpeg</p>\n\n<p>But in the cloud it doesn't work.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 953323,
          "author_name": "rolandceaserpereira",
          "author_url": "",
          "post_date": "07/31/2020 17:39:51",
          "content": "<p>Usually, both of these packages are installed by executing <strong>!conda install gdcm -c conda-forge -y</strong></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 953393,
          "author_name": "noryab",
          "author_url": "",
          "post_date": "07/31/2020 18:45:35",
          "content": "<p>In case you still have problems.</p>\n\n<p>Installing these:\n! conda install -c conda-forge gdcm -y\n! pip install pylibjpeg pylibjpeg-libjpeg</p>\n\n<p>and configuring Environment (preferences):</p>\n\n<p>. Always use latest environment</p>\n\n<p>The kernel works</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 953395,
          "author_name": "noryab",
          "author_url": "",
          "post_date": "07/31/2020 18:48:12",
          "content": "<p>I don't know Roland, on my laptop this worked until I did the second installation line\n. pip install pylibjpeg pylibjpeg-libjpeg</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 950424,
      "author_name": "rolandceaserpereira",
      "author_url": "",
      "post_date": "07/29/2020 11:40:51",
      "content": "<p>try this:\n!conda install gdcm -c conda-forge -y\nand \nimport pydicom</p>\n\n<p><strong>Do not import gdcm</strong></p>\n\n<p>Use pydicom for reading using pydicom.dcmread('DICOM_PATH')</p>",
      "votes": null,
      "replies": [
        {
          "id": 950498,
          "author_name": "ahmedhshahin",
          "author_url": "",
          "post_date": "07/29/2020 12:41:17",
          "content": "<p>Yes, you should not import gdcm. I suggested it just as a debugging step to make sure it has been installed properly.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1327424,
          "author_name": "ttzzcc",
          "author_url": "",
          "post_date": "05/29/2021 09:06:33",
          "content": "<p>Thanks a lot!! I solved this problem by your advise</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 952223,
      "author_name": "rsreeram17",
      "author_url": "",
      "post_date": "07/30/2020 18:04:41",
      "content": "<p>Even I am facing the same error, even after trying the suggested fixes. Were you able to solve this problem? </p>",
      "votes": null,
      "replies": [
        {
          "id": 952680,
          "author_name": "jumpingmandt",
          "author_url": "",
          "post_date": "07/31/2020 06:27:12",
          "content": "<p>No, it is a very strange problem. Wish someone can solve this problem. 🖖 </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 953607,
      "author_name": "noryab",
      "author_url": "",
      "post_date": "07/31/2020 23:08:21",
      "content": "<p>Maybe your load_scan function uses pydicom.read_file, in this case you only need to change to pydicom.dcmread and it works with import pydicom.\n<a href=\"https://github.com/pydicom/pydicom/issues/475\">https://github.com/pydicom/pydicom/issues/475</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "949498": "It is very strange that I cannot obtain the information of pixel_array of the `.dcm` files in the folders of patient with ID = ID00011637202177653955184. It always shows that `RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. )`\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F854178d857a4ef7185bc47a80016fe80%2FWeChat%20Screenshot_20200728191048.png?generation=1595956274627040&amp;alt=media)\n\nEven I install the gdcm by `!conda install -c conda-forge gdcm -y`, the problem is still there.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F5287922%2F6c3b6024d69ff05fc07a4edd50797271%2FWeChat%20Screenshot_20200728191144.png?generation=1595956321461082&amp;alt=media)",
    "949561": "From your error, I think GDCM has not been installed properly. check if `import gdcm` works.",
    "949641": "I have checked gdcm has been well imported. But it still does not work.",
    "950424": "try this:\n!conda install gdcm -c conda-forge -y\nand \nimport pydicom\n\n**Do not import gdcm**\n\nUse pydicom for reading using pydicom.dcmread('DICOM_PATH')",
    "950498": "Yes, you should not import gdcm. I suggested it just as a debugging step to make sure it has been installed properly.",
    "952223": "Even I am facing the same error, even after trying the suggested fixes. Were you able to solve this problem?",
    "952680": "No, it is a very strange problem. Wish someone can solve this problem. 🖖",
    "953302": "I have the same problem, on my laptop I had solved it with:\n. conda install -c conda-forge gdcm\n. pip install pylibjpeg pylibjpeg-libjpeg\n\nBut in the cloud it doesn't work.",
    "953323": "Usually, both of these packages are installed by executing **!conda install gdcm -c conda-forge -y**",
    "953393": "In case you still have problems.\n\nInstalling these:\n! conda install -c conda-forge gdcm -y\n! pip install pylibjpeg pylibjpeg-libjpeg\n\nand configuring Environment (preferences):\n\n. Always use latest environment\n\nThe kernel works",
    "953395": "I don't know Roland, on my laptop this worked until I did the second installation line\n. pip install pylibjpeg pylibjpeg-libjpeg",
    "953607": "Maybe your load_scan function uses pydicom.read_file, in this case you only need to change to pydicom.dcmread and it works with import pydicom.\nhttps://github.com/pydicom/pydicom/issues/475",
    "967886": "Anyone knows how to solve this ?",
    "970982": "I have tried all the suggestions here i.e. executing below and using pydicom.readfile and still facing this issue. Please let me know if there is fix for this.\n\n!conda install -c conda-forge gdcm\n!pip install pylibjpeg pylibjpeg-libjpeg",
    "970991": "Using pydicom.dcmread and adding the below at the beginning of the kernel worked for me.\n\n!conda install -c conda-forge pillow -y\n!conda install -c conda-forge pydicom -y\n!conda install -c conda-forge gdcm -y\n!pip install pylibjpeg pylibjpeg-libjpeg\n\nIt is very important to **restart the kernel** once you had the error else you will continue to have the error even after performing the above.",
    "985060": "Hi! \nDid you find a solution?\nFor me the problem is with the same folder :/",
    "1007742": "I tried all solutions mentioned in this discussion but still it doesn't work for me. Anyone knows any other solution?",
    "1007855": "I was getting this issue even after doing everything right from package perspective, then found it's happening for these 2 IDs:\nBAD_ID = ['ID00011637202177653955184', 'ID00052637202186188008618']\nYou would need to control for these 2 image reads and then it should be fine.",
    "1327424": "Thanks a lot!! I solved this problem by your advise",
    "1364599": "Following lines solved the problem in my Kaggle notebook.\n\n!pip3 install python-gdcm\nimport gdcm\n# if gdcm is imported that error does not occur",
    "1374229": "Run the following command in a cell and then restart & clear your cells.\n!conda install -c conda-forge gdcm -y\n\nthis worked for me.",
    "1374277": "# Try:\n!pip3 install python-gdcm\nimport gdcm\n\n# for more details\nhttps://www.kaggle.com/dipuk0506/dicom-files-to-rgb-512x512",
    "1405473": "this can happen when there are mixed of pixel array format in the dcm file, such as png, jpeg, you can upgrade numpy to version 1.20.x above and this solves the issue with  instead of dcmread, also  use pydicom.dcmread to read the dcm and decode it.\nsuch dicom = pydicom.dcmread(path) , dicom.pixel_array instead of dicom = dcmread(path) , dicom.pixel_array",
    "1503152": "Thanks for sharing, just found this case. Hope installing gdcm can solve this",
    "1926201": "This worked for me ,thanks👍",
    "2143652": "be sure that internet is set on when installing, for this on right side click on K, where you have the data, scroll down and there you have setting and internet button",
    "2143749": "here is more detailed:\nhttps://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985"
  },
  "source": "meta"
}