{
  "id": 340473,
  "title": "How to deal jpeg image?",
  "url": "/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/340473",
  "author_name": "tongshu zhang",
  "post_date": "2022-07-29T08:05:06.934000",
  "votes": 3,
  "comment_count": 3,
  "views": 0,
  "content": "<p>When I use <br>\n<code>dc = pydicom.read_file(path)\ntype = dc.file_meta.TransferSyntaxUID.name\n</code></p>\n<p>and found 3 types existed, one of the 3 types: 'JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])' always required related dependency like gcdm and pylibjpeg. even I pip installed and imported them, it was still the same. Any one know how to read those files?</p>",
  "messages": [
    {
      "id": 1875693,
      "postDate": "2022-07-29T08:05:06.933Z",
      "content": "<p>When I use <br>\n<code>dc = pydicom.read_file(path)\ntype = dc.file_meta.TransferSyntaxUID.name\n</code></p>\n<p>and found 3 types existed, one of the 3 types: 'JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])' always required related dependency like gcdm and pylibjpeg. even I pip installed and imported them, it was still the same. Any one know how to read those files?</p>",
      "rawMarkdown": "When I use \n`dc = pydicom.read_file(path)\ntype = dc.file_meta.TransferSyntaxUID.name\n`\n\n and found 3 types existed, one of the 3 types: 'JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])' always required related dependency like gcdm and pylibjpeg. even I pip installed and imported them, it was still the same. Any one know how to read those files?",
      "votes": 3
    },
    {
      "id": 1875905,
      "postDate": "2022-07-29T12:17:34.173Z",
      "content": "<p>I installed python-gdcm and was able to open the JPEG compressed images with pydicom.</p>\n<p><code>!pip install python-gdcm</code></p>",
      "rawMarkdown": "I installed python-gdcm and was able to open the JPEG compressed images with pydicom.\n\n`!pip install python-gdcm`",
      "votes": 4
    },
    {
      "id": 1876034,
      "postDate": "2022-07-29T14:39:10.257Z",
      "content": "<p><a href=\"https://www.kaggle.com/davidbroberts\" target=\"_blank\">@davidbroberts</a> thanks for your comment, you used 'dcmread' or 'pydicom.read_file'?  I download the 'gcdm' and 'import gcdm' then I read it, and once I applied 'dc.pixel_array', it will notify the dependency missing errors.</p>",
      "rawMarkdown": "@davidbroberts thanks for your comment, you used 'dcmread' or 'pydicom.read_file'?  I download the 'gcdm' and 'import gcdm' then I read it, and once I applied 'dc.pixel_array', it will notify the dependency missing errors.",
      "replies": [
        {
          "id": 1876091,
          "postDate": "2022-07-29T15:15:35.253Z",
          "content": "<p>I used dcmread.</p>",
          "rawMarkdown": "I used dcmread."
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1875905,
      "author_name": "David Roberts",
      "author_url": "",
      "post_date": "2022-07-29T12:17:34.173000",
      "content": "<p>I installed python-gdcm and was able to open the JPEG compressed images with pydicom.</p>\n<p><code>!pip install python-gdcm</code></p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 1876034,
      "author_name": "tongshu zhang",
      "author_url": "",
      "post_date": "2022-07-29T14:39:10.257000",
      "content": "<p><a href=\"https://www.kaggle.com/davidbroberts\" target=\"_blank\">@davidbroberts</a> thanks for your comment, you used 'dcmread' or 'pydicom.read_file'?  I download the 'gcdm' and 'import gcdm' then I read it, and once I applied 'dc.pixel_array', it will notify the dependency missing errors.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1876091,
          "author_name": "David Roberts",
          "author_url": "",
          "post_date": "2022-07-29T15:15:35.253000",
          "content": "<p>I used dcmread.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1875693": "When I use \n`dc = pydicom.read_file(path)\ntype = dc.file_meta.TransferSyntaxUID.name\n`\n\n and found 3 types existed, one of the 3 types: 'JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])' always required related dependency like gcdm and pylibjpeg. even I pip installed and imported them, it was still the same. Any one know how to read those files?",
    "1875905": "I installed python-gdcm and was able to open the JPEG compressed images with pydicom.\n\n`!pip install python-gdcm`",
    "1876034": "@davidbroberts thanks for your comment, you used 'dcmread' or 'pydicom.read_file'?  I download the 'gcdm' and 'import gcdm' then I read it, and once I applied 'dc.pixel_array', it will notify the dependency missing errors."
  }
}