{
  "id": 375868,
  "title": "I am trying to convert the images to jpeg using pydicom but my script keeps crashing at this file",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/375868",
  "author_name": "ArnoldRosielle",
  "post_date": "2023-01-03T21:42:29.870000",
  "votes": 0,
  "comment_count": 4,
  "views": 0,
  "content": "<p>../input/rsna-breast-cancer-detection/train_images/34867/1816992952.dcm<br>\nwhen I  use ds = pydicom.dicom.dcmread(above file)<br>\nit works through the preceding files in my for loop without a problem<br>\nThe error message is RuntimeError: Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not installed<br>\nit is installed but I've obviously got something wrong!<br>\nIt runs fine after downloading the image files to my macbook pro and running the script on a jupyter notebook.<br>\nAny ideas?  Thanks!</p>",
  "messages": [
    {
      "id": 2085352,
      "postDate": "2023-01-04T05:03:29.783Z",
      "content": "<p>Check if the following works:</p>\n<p>!pip install pylibjpeg pylibjpeg-libjpeg pydicom</p>\n<p>Also try installing gdcm:</p>\n<p>!pip install python-gdcm</p>",
      "rawMarkdown": "Check if the following works:\n\n!pip install pylibjpeg pylibjpeg-libjpeg pydicom\n\nAlso try installing gdcm:\n\n!pip install python-gdcm",
      "replies": [
        {
          "id": 2086394,
          "postDate": "2023-01-04T18:34:23.577Z",
          "content": "<p>Thanks.  I've been doing the first install.  I'll try the second.  After that do I say import gdcm?</p>",
          "rawMarkdown": "Thanks.  I've been doing the first install.  I'll try the second.  After that do I say import gdcm?",
          "replies": [
            {
              "id": 2086405,
              "postDate": "2023-01-04T18:43:22.907Z",
              "content": "<p>No need to import. They are dependencies to handle certain types of compressions. Just import pydicom as you would do usually after installing these. gdcm alone might do the trick for u.</p>",
              "rawMarkdown": "No need to import. They are dependencies to handle certain types of compressions. Just import pydicom as you would do usually after installing these. gdcm alone might do the trick for u."
            },
            {
              "id": 2086642,
              "postDate": "2023-01-04T22:26:08.403Z",
              "content": "<p>Figured it out - after the !pip installs I needed to restart the kernel ! (Duh).  Thanks for your help!</p>",
              "rawMarkdown": "Figured it out - after the !pip installs I needed to restart the kernel ! (Duh).  Thanks for your help!"
            }
          ]
        }
      ]
    },
    {
      "id": 2084987,
      "postDate": "2023-01-03T21:42:29.870Z",
      "content": "<p>../input/rsna-breast-cancer-detection/train_images/34867/1816992952.dcm<br>\nwhen I  use ds = pydicom.dicom.dcmread(above file)<br>\nit works through the preceding files in my for loop without a problem<br>\nThe error message is RuntimeError: Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not installed<br>\nit is installed but I've obviously got something wrong!<br>\nIt runs fine after downloading the image files to my macbook pro and running the script on a jupyter notebook.<br>\nAny ideas?  Thanks!</p>",
      "rawMarkdown": " ../input/rsna-breast-cancer-detection/train_images/34867/1816992952.dcm\n\nwhen I  use ds = pydicom.dicom.dcmread(above file)\n\nit works through the preceding files in my for loop without a problem\n\nThe error message is RuntimeError: Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not installed\n\nit is installed but I've obviously got something wrong!\n\nIt runs fine after downloading the image files to my macbook pro and running the script on a jupyter notebook.\n\nAny ideas?  Thanks!\n"
    }
  ],
  "comments": [
    {
      "id": 2085352,
      "author_name": "Sandy",
      "author_url": "",
      "post_date": "2023-01-04T05:03:29.783000",
      "content": "<p>Check if the following works:</p>\n<p>!pip install pylibjpeg pylibjpeg-libjpeg pydicom</p>\n<p>Also try installing gdcm:</p>\n<p>!pip install python-gdcm</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2086394,
          "author_name": "ArnoldRosielle",
          "author_url": "",
          "post_date": "2023-01-04T18:34:23.577000",
          "content": "<p>Thanks.  I've been doing the first install.  I'll try the second.  After that do I say import gdcm?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2086405,
              "author_name": "Sandy",
              "author_url": "",
              "post_date": "2023-01-04T18:43:22.907000",
              "content": "<p>No need to import. They are dependencies to handle certain types of compressions. Just import pydicom as you would do usually after installing these. gdcm alone might do the trick for u.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2086642,
              "author_name": "ArnoldRosielle",
              "author_url": "",
              "post_date": "2023-01-04T22:26:08.403000",
              "content": "<p>Figured it out - after the !pip installs I needed to restart the kernel ! (Duh).  Thanks for your help!</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2085352": "Check if the following works:\n\n!pip install pylibjpeg pylibjpeg-libjpeg pydicom\n\nAlso try installing gdcm:\n\n!pip install python-gdcm",
    "2084987": " ../input/rsna-breast-cancer-detection/train_images/34867/1816992952.dcm\n\nwhen I  use ds = pydicom.dicom.dcmread(above file)\n\nit works through the preceding files in my for loop without a problem\n\nThe error message is RuntimeError: Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not installed\n\nit is installed but I've obviously got something wrong!\n\nIt runs fine after downloading the image files to my macbook pro and running the script on a jupyter notebook.\n\nAny ideas?  Thanks!\n"
  }
}