{
  "id": 242500,
  "title": "how do i read dcm-file",
  "url": "/competitions/siim-covid19-detection/discussion/242500",
  "author_name": "",
  "post_date": "2021-05-29T09:49:35.306629600Z",
  "votes": 4,
  "comment_count": 16,
  "views": 0,
  "content": "<p>i can't this file. if you have a idea.please let me know. \"7bc56e205e08.dcm\"</p>\n<p>%matplotlib inline<br>\nimport matplotlib.pyplot as plt<br>\nimport pydicom</p>\n<p>path ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'<br>\nds = pydicom.dcmread(path)<br>\nplt.imshow(ds.pixel_array)</p>\n<hr>\n<p>RuntimeError                              Traceback (most recent call last)<br>\n in <br>\n      5 path ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'<br>\n      6 ds = pydicom.dcmread(path)<br>\n----&gt; 7 plt.imshow(ds.pixel_array)<br>\n      8 <br>\n      9 #img = dicom2array(path=path)</p>\n<p>/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in pixel_array(self)</p>\n<p>/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in convert_pixel_data(self, handler_name)</p>\n<p>/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in _convert_pixel_data_without_handler(self)</p>\n<p>RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), pylibjpeg (req. )</p>",
  "messages": [
    {
      "id": "1327453",
      "postDate": "05/29/2021 09:49:35",
      "content": "<p>i can't this file. if you have a idea.please let me know. \"7bc56e205e08.dcm\"</p>\n<p>%matplotlib inline<br>\nimport matplotlib.pyplot as plt<br>\nimport pydicom</p>\n<p>path ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'<br>\nds = pydicom.dcmread(path)<br>\nplt.imshow(ds.pixel_array)</p>\n<hr>\n<p>RuntimeError                              Traceback (most recent call last)<br>\n in <br>\n      5 path ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'<br>\n      6 ds = pydicom.dcmread(path)<br>\n----&gt; 7 plt.imshow(ds.pixel_array)<br>\n      8 <br>\n      9 #img = dicom2array(path=path)</p>\n<p>/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in pixel_array(self)</p>\n<p>/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in convert_pixel_data(self, handler_name)</p>\n<p>/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in _convert_pixel_data_without_handler(self)</p>\n<p>RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), pylibjpeg (req. )</p>",
      "rawMarkdown": "i can't this file. if you have a idea.please let me know. \"7bc56e205e08.dcm\"\n\n%matplotlib inline\nimport matplotlib.pyplot as plt\nimport pydicom\n\npath ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'\nds = pydicom.dcmread(path)\nplt.imshow(ds.pixel_array)\n\n---------------------------------------------------------------------------\nRuntimeError                              Traceback (most recent call last)\n<ipython-input-15-af481814de85> in <module>\n      5 path ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'\n      6 ds = pydicom.dcmread(path)\n----> 7 plt.imshow(ds.pixel_array)\n      8 \n      9 #img = dicom2array(path=path)\n\n/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in pixel_array(self)\n\n/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in convert_pixel_data(self, handler_name)\n\n/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in _convert_pixel_data_without_handler(self)\n\nRuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), pylibjpeg (req. )",
      "votes": null
    },
    {
      "id": "1327812",
      "postDate": "05/29/2021 16:31:24",
      "content": "<p>It means you need to install more python packages, see last message </p>",
      "rawMarkdown": "It means you need to install more python packages, see last message",
      "votes": null
    },
    {
      "id": "1328141",
      "postDate": "05/30/2021 00:18:38",
      "content": "<p>thank you. but i tnstalled  2 packages.i cound't understand.</p>",
      "rawMarkdown": "thank you. but i tnstalled  2 packages.i cound't understand.",
      "votes": null
    },
    {
      "id": "1328145",
      "postDate": "05/30/2021 00:35:33",
      "content": "<p>i decided to avoid this image. (becase im bigginer)</p>",
      "rawMarkdown": "i decided to avoid this image. (becase im bigginer)",
      "votes": null
    },
    {
      "id": "1328196",
      "postDate": "05/30/2021 03:10:37",
      "content": "<p>suddnly,i can read it. i think runtime was broken. sorry about that.</p>",
      "rawMarkdown": "suddnly,i can read it. i think runtime was broken. sorry about that.",
      "votes": null
    },
    {
      "id": "1328205",
      "postDate": "05/30/2021 03:33:34",
      "content": "<p>The message was saying to install GDCM and pylibjpeg , during your first run you had no such modules.</p>",
      "rawMarkdown": "The message was saying to install GDCM and pylibjpeg , during your first run you had no such modules.",
      "votes": null
    },
    {
      "id": "1328428",
      "postDate": "05/30/2021 08:48:03",
      "content": "<p>thanks you</p>",
      "rawMarkdown": "thanks you",
      "votes": null
    },
    {
      "id": "1329109",
      "postDate": "05/30/2021 21:19:05",
      "content": "<p>There are many images in this dataset that produce that error. It's because they use a Transfer Syntax (JPEG Lossless: 1.2.840.10008.1.2.4.70) that specifies compressed pixel data that pydicom does not support.</p>\n<p>The only options are to install pylibjpeg and GDCM, or export the files manually into a deflated transfer syntax with something like DCMTK.</p>",
      "rawMarkdown": "There are many images in this dataset that produce that error. It's because they use a Transfer Syntax (JPEG Lossless: 1.2.840.10008.1.2.4.70) that specifies compressed pixel data that pydicom does not support.\n\nThe only options are to install pylibjpeg and GDCM, or export the files manually into a deflated transfer syntax with something like DCMTK.",
      "votes": null
    },
    {
      "id": "1329292",
      "postDate": "05/31/2021 03:24:46",
      "content": "<p>Same issue. If you resolved this issue, can you give me your solution?</p>",
      "rawMarkdown": "Same issue. If you resolved this issue, can you give me your solution?",
      "votes": null
    },
    {
      "id": "1329583",
      "postDate": "05/31/2021 08:22:40",
      "content": "<p>The solution is in the comments - install missing modules.</p>",
      "rawMarkdown": "The solution is in the comments - install missing modules.",
      "votes": null
    },
    {
      "id": "1330506",
      "postDate": "05/31/2021 22:09:34",
      "content": "<p>I just added this line to install GDCM and I had no error:<br>\n<strong>!conda install -c conda-forge gdcm -y</strong></p>",
      "rawMarkdown": "I just added this line to install GDCM and I had no error:\n**!conda install -c conda-forge gdcm -y**",
      "votes": null
    },
    {
      "id": "1330584",
      "postDate": "06/01/2021 01:40:59",
      "content": "<p>Thank you. I resolved it by the <a href=\"https://www.kaggle.com/agentili\" target=\"_blank\">@agentili</a> 's comment</p>",
      "rawMarkdown": "Thank you. I resolved it by the @agentili 's comment",
      "votes": null
    },
    {
      "id": "1331246",
      "postDate": "06/01/2021 11:12:04",
      "content": "<p>thank you. its worked.</p>",
      "rawMarkdown": "thank you. its worked.",
      "votes": null
    },
    {
      "id": "1334355",
      "postDate": "06/03/2021 12:49:26",
      "content": "<p><a href=\"https://www.kaggle.com/ensorchoko\" target=\"_blank\">@ensorchoko</a></p>\n<p><a href=\"https://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/dicom.ipynb\" target=\"_blank\">https://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/dicom.ipynb</a></p>",
      "rawMarkdown": "ensorchoko\n\nhttps://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/dicom.ipynb",
      "votes": null
    },
    {
      "id": "1334929",
      "postDate": "06/03/2021 22:27:31",
      "content": "<p>i tried. but same error again.there is my solution.</p>\n<p>!conda install '../input/notebook66a8aacbe7/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y</p>\n<p>!conda install '../input/notebook66a8aacbe7/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y</p>\n<p>if you wat this. dont hesitated used it.(notebook66a8aacbe7)</p>",
      "rawMarkdown": "i tried. but same error again.there is my solution.\n\n!conda install '../input/notebook66a8aacbe7/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y\n\n!conda install '../input/notebook66a8aacbe7/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y\n\nif you wat this. dont hesitated used it.(notebook66a8aacbe7)",
      "votes": null
    },
    {
      "id": "1347092",
      "postDate": "06/13/2021 00:03:50",
      "content": "<p>really? i have a still problem if i that use it.</p>",
      "rawMarkdown": "really? i have a still problem if i that use it.",
      "votes": null
    },
    {
      "id": "1347095",
      "postDate": "06/13/2021 00:05:47",
      "content": "<p>thank you. i cheked url link. it is value to look.</p>",
      "rawMarkdown": "thank you. i cheked url link. it is value to look.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1327812,
      "author_name": "jacekpoplawski",
      "author_url": "",
      "post_date": "05/29/2021 16:31:24",
      "content": "<p>It means you need to install more python packages, see last message </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1328141,
      "author_name": "tensorchoko",
      "author_url": "",
      "post_date": "05/30/2021 00:18:38",
      "content": "<p>thank you. but i tnstalled  2 packages.i cound't understand.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1328145,
      "author_name": "tensorchoko",
      "author_url": "",
      "post_date": "05/30/2021 00:35:33",
      "content": "<p>i decided to avoid this image. (becase im bigginer)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1328196,
      "author_name": "tensorchoko",
      "author_url": "",
      "post_date": "05/30/2021 03:10:37",
      "content": "<p>suddnly,i can read it. i think runtime was broken. sorry about that.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1328205,
          "author_name": "jacekpoplawski",
          "author_url": "",
          "post_date": "05/30/2021 03:33:34",
          "content": "<p>The message was saying to install GDCM and pylibjpeg , during your first run you had no such modules.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1328428,
      "author_name": "tensorchoko",
      "author_url": "",
      "post_date": "05/30/2021 08:48:03",
      "content": "<p>thanks you</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1329109,
      "author_name": "davidbroberts",
      "author_url": "",
      "post_date": "05/30/2021 21:19:05",
      "content": "<p>There are many images in this dataset that produce that error. It's because they use a Transfer Syntax (JPEG Lossless: 1.2.840.10008.1.2.4.70) that specifies compressed pixel data that pydicom does not support.</p>\n<p>The only options are to install pylibjpeg and GDCM, or export the files manually into a deflated transfer syntax with something like DCMTK.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1329292,
      "author_name": "conghunghoang",
      "author_url": "",
      "post_date": "05/31/2021 03:24:46",
      "content": "<p>Same issue. If you resolved this issue, can you give me your solution?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1329583,
          "author_name": "jacekpoplawski",
          "author_url": "",
          "post_date": "05/31/2021 08:22:40",
          "content": "<p>The solution is in the comments - install missing modules.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1330584,
          "author_name": "conghunghoang",
          "author_url": "",
          "post_date": "06/01/2021 01:40:59",
          "content": "<p>Thank you. I resolved it by the <a href=\"https://www.kaggle.com/agentili\" target=\"_blank\">@agentili</a> 's comment</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1330506,
      "author_name": "agentili",
      "author_url": "",
      "post_date": "05/31/2021 22:09:34",
      "content": "<p>I just added this line to install GDCM and I had no error:<br>\n<strong>!conda install -c conda-forge gdcm -y</strong></p>",
      "votes": null,
      "replies": [
        {
          "id": 1347092,
          "author_name": "tensorchoko",
          "author_url": "",
          "post_date": "06/13/2021 00:03:50",
          "content": "<p>really? i have a still problem if i that use it.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1331246,
      "author_name": "tensorchoko",
      "author_url": "",
      "post_date": "06/01/2021 11:12:04",
      "content": "<p>thank you. its worked.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1334355,
      "author_name": "faisalalsrheed",
      "author_url": "",
      "post_date": "06/03/2021 12:49:26",
      "content": "<p><a href=\"https://www.kaggle.com/ensorchoko\" target=\"_blank\">@ensorchoko</a></p>\n<p><a href=\"https://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/dicom.ipynb\" target=\"_blank\">https://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/dicom.ipynb</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1347095,
          "author_name": "tensorchoko",
          "author_url": "",
          "post_date": "06/13/2021 00:05:47",
          "content": "<p>thank you. i cheked url link. it is value to look.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1334929,
      "author_name": "tensorchoko",
      "author_url": "",
      "post_date": "06/03/2021 22:27:31",
      "content": "<p>i tried. but same error again.there is my solution.</p>\n<p>!conda install '../input/notebook66a8aacbe7/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y</p>\n<p>!conda install '../input/notebook66a8aacbe7/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y<br>\n!conda install '../input/notebook66a8aacbe7/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y</p>\n<p>if you wat this. dont hesitated used it.(notebook66a8aacbe7)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1327453": "i can't this file. if you have a idea.please let me know. \"7bc56e205e08.dcm\"\n\n%matplotlib inline\nimport matplotlib.pyplot as plt\nimport pydicom\n\npath ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'\nds = pydicom.dcmread(path)\nplt.imshow(ds.pixel_array)\n\n---------------------------------------------------------------------------\nRuntimeError                              Traceback (most recent call last)\n<ipython-input-15-af481814de85> in <module>\n      5 path ='../input/siim-covid19-detection/train/8f668881cb15/84baf9c3b2be/7bc56e205e08.dcm'\n      6 ds = pydicom.dcmread(path)\n----> 7 plt.imshow(ds.pixel_array)\n      8 \n      9 #img = dicom2array(path=path)\n\n/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in pixel_array(self)\n\n/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in convert_pixel_data(self, handler_name)\n\n/opt/conda/lib/python3.7/site-packages/pydicom/dataset.py in _convert_pixel_data_without_handler(self)\n\nRuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), pylibjpeg (req. )",
    "1327812": "It means you need to install more python packages, see last message",
    "1328141": "thank you. but i tnstalled  2 packages.i cound't understand.",
    "1328145": "i decided to avoid this image. (becase im bigginer)",
    "1328196": "suddnly,i can read it. i think runtime was broken. sorry about that.",
    "1328205": "The message was saying to install GDCM and pylibjpeg , during your first run you had no such modules.",
    "1328428": "thanks you",
    "1329109": "There are many images in this dataset that produce that error. It's because they use a Transfer Syntax (JPEG Lossless: 1.2.840.10008.1.2.4.70) that specifies compressed pixel data that pydicom does not support.\n\nThe only options are to install pylibjpeg and GDCM, or export the files manually into a deflated transfer syntax with something like DCMTK.",
    "1329292": "Same issue. If you resolved this issue, can you give me your solution?",
    "1329583": "The solution is in the comments - install missing modules.",
    "1330506": "I just added this line to install GDCM and I had no error:\n**!conda install -c conda-forge gdcm -y**",
    "1330584": "Thank you. I resolved it by the @agentili 's comment",
    "1331246": "thank you. its worked.",
    "1334355": "ensorchoko\n\nhttps://colab.research.google.com/github/tensorflow/io/blob/master/docs/tutorials/dicom.ipynb",
    "1334929": "i tried. but same error again.there is my solution.\n\n!conda install '../input/notebook66a8aacbe7/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y\n\n!conda install '../input/notebook66a8aacbe7/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y\n!conda install '../input/notebook66a8aacbe7/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y\n\nif you wat this. dont hesitated used it.(notebook66a8aacbe7)",
    "1347092": "really? i have a still problem if i that use it.",
    "1347095": "thank you. i cheked url link. it is value to look."
  },
  "source": "meta"
}