{
  "id": 369259,
  "title": "Error decoding pixel data",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/369259",
  "author_name": "moth",
  "post_date": "2022-11-29T13:48:14.671000",
  "votes": 4,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Has anyone encountered a problem when reading pixel data?</p>\n<pre><code>dicom_file = pydicom.read_file(path_to_dicom_image)\ndata = dicom_file.pixel_array\n</code></pre>\n<p>This error rises for some images:</p>\n<pre><code>The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )\n</code></pre>",
  "messages": [
    {
      "id": 2048510,
      "postDate": "2022-11-29T14:00:17.257Z",
      "content": "<p>Install These libraries :<br>\n<code>!pip install python-gdcm -q</code><br>\n<code>!pip install pylibjpeg -q</code></p>",
      "rawMarkdown": "Install These libraries :\n`!pip install python-gdcm -q`\n`!pip install pylibjpeg -q`",
      "votes": 6
    },
    {
      "id": 2048502,
      "postDate": "2022-11-29T13:51:40.170Z",
      "content": "<p>you have to install these libraries … Here is example of installing them without internet (for doing proper submission) (top cells of notebook)<br>\n<a href=\"https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier\" target=\"_blank\">https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier</a></p>",
      "rawMarkdown": "you have to install these libraries ... Here is example of installing them without internet (for doing proper submission) (top cells of notebook)\nhttps://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier",
      "votes": 4
    },
    {
      "id": 2048499,
      "postDate": "2022-11-29T13:48:14.673Z",
      "content": "<p>Has anyone encountered a problem when reading pixel data?</p>\n<pre><code>dicom_file = pydicom.read_file(path_to_dicom_image)\ndata = dicom_file.pixel_array\n</code></pre>\n<p>This error rises for some images:</p>\n<pre><code>The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )\n</code></pre>",
      "rawMarkdown": "Has anyone encountered a problem when reading pixel data?\n\n```\ndicom_file = pydicom.read_file(path_to_dicom_image)\ndata = dicom_file.pixel_array\n```\n\nThis error rises for some images:\n```\nThe following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )\n```",
      "votes": 4
    },
    {
      "id": 2059615,
      "postDate": "2022-12-09T04:37:40.917Z",
      "content": "<p>Thanks! the -q made all the difference….not sure why the Kaggle environment isn't setup/modified to handle this situation???</p>",
      "rawMarkdown": "Thanks! the -q made all the difference....not sure why the Kaggle environment isn't setup/modified to handle this situation???",
      "votes": -1
    },
    {
      "id": 2143646,
      "postDate": "2023-02-14T12:41:41.957Z",
      "content": "<ol>\n<li>install this : !pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom (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).</li>\n<li>restart kernell (click right on screen) and rerun all.<br>\nGood luck, this helped me (took me some time to get this :D )</li>\n</ol>",
      "rawMarkdown": " 1. install this : !pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom (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).\n 2. restart kernell (click right on screen) and rerun all.\n\nGood luck, this helped me (took me some time to get this :D )",
      "replies": [
        {
          "id": 2143739,
          "postDate": "2023-02-14T13:28:34.800Z",
          "content": "<p><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": "https://www.kaggle.com/code/diaconumadalina/they-are-missing-required-dependencies-gdcm-req?scriptVersionId=119148985"
        }
      ]
    },
    {
      "id": 2061212,
      "postDate": "2022-12-10T20:12:57.933Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2057000,
      "postDate": "2022-12-06T16:47:16.557Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2048510,
      "author_name": "IMvision12",
      "author_url": "",
      "post_date": "2022-11-29T14:00:17.257000",
      "content": "<p>Install These libraries :<br>\n<code>!pip install python-gdcm -q</code><br>\n<code>!pip install pylibjpeg -q</code></p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 2048502,
      "author_name": "DrHB",
      "author_url": "",
      "post_date": "2022-11-29T13:51:40.170000",
      "content": "<p>you have to install these libraries … Here is example of installing them without internet (for doing proper submission) (top cells of notebook)<br>\n<a href=\"https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier\" target=\"_blank\">https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier</a></p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 2059615,
      "author_name": "Geoff",
      "author_url": "",
      "post_date": "2022-12-09T04:37:40.917000",
      "content": "<p>Thanks! the -q made all the difference….not sure why the Kaggle environment isn't setup/modified to handle this situation???</p>",
      "votes": -1,
      "replies": []
    },
    {
      "id": 2143646,
      "author_name": "Diaconu Madalina",
      "author_url": "",
      "post_date": "2023-02-14T12:41:41.957000",
      "content": "<ol>\n<li>install this : !pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom (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).</li>\n<li>restart kernell (click right on screen) and rerun all.<br>\nGood luck, this helped me (took me some time to get this :D )</li>\n</ol>",
      "votes": 0,
      "replies": [
        {
          "id": 2143739,
          "author_name": "Diaconu Madalina",
          "author_url": "",
          "post_date": "2023-02-14T13:28:34.800000",
          "content": "<p><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": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2061212,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-12-10T20:12:57.933000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2057000,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-12-06T16:47:16.557000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2048510": "Install These libraries :\n`!pip install python-gdcm -q`\n`!pip install pylibjpeg -q`",
    "2048502": "you have to install these libraries ... Here is example of installing them without internet (for doing proper submission) (top cells of notebook)\nhttps://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier",
    "2048499": "Has anyone encountered a problem when reading pixel data?\n\n```\ndicom_file = pydicom.read_file(path_to_dicom_image)\ndata = dicom_file.pixel_array\n```\n\nThis error rises for some images:\n```\nThe following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )\n```",
    "2059615": "Thanks! the -q made all the difference....not sure why the Kaggle environment isn't setup/modified to handle this situation???",
    "2143646": " 1. install this : !pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom (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).\n 2. restart kernell (click right on screen) and rerun all.\n\nGood luck, this helped me (took me some time to get this :D )",
    "2061212": "",
    "2057000": ""
  }
}