{
  "id": 374767,
  "title": "I cannot convert this image from dcm to png/jped, why?",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/374767",
  "author_name": "Mohammad Zahrawi",
  "post_date": "2022-12-28T17:35:03.966000",
  "votes": 0,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I managed to convert all dcm images, however, one image i coud not convert it to np.array. please share the code that used for conversion.<br>\n'/kaggle/input/rsna-breast-cancer-detection/train_images/10038/1967300488.dcm' <br>\nthis is the image.</p>",
  "messages": [
    {
      "id": 2081725,
      "postDate": "2022-12-31T14:46:25.670Z",
      "content": "<p>!pip install -qU pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom python-gdcm</p>\n<p>I used this and it worked to open all the dcms, you could then convert to whatever you want and script it.</p>\n<p>You could also use this though:<br>\n<a href=\"https://www.kaggle.com/datasets/radek1/rsna-mammography-images-as-pngs\" target=\"_blank\">https://www.kaggle.com/datasets/radek1/rsna-mammography-images-as-pngs</a></p>\n<p>Someone took the time to convert all the images to pngs and make the dataset, this might be easier.</p>",
      "rawMarkdown": "!pip install -qU pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom python-gdcm\n\nI used this and it worked to open all the dcms, you could then convert to whatever you want and script it.\n\nYou could also use this though:\nhttps://www.kaggle.com/datasets/radek1/rsna-mammography-images-as-pngs\n\nSomeone took the time to convert all the images to pngs and make the dataset, this might be easier.\n",
      "votes": 1
    },
    {
      "id": 2078849,
      "postDate": "2022-12-28T17:49:19.893Z",
      "content": "<p>Same here. Some images suck. I decided to work on it later. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13074696%2Faaf90e001d44fd5369fb8c1c806c42d9%2Fnhhnncncnc.JPG?generation=1672249195705627&amp;alt=media\" alt=\"\"></p>\n<p>let's wait for keggle experts 💪</p>",
      "rawMarkdown": "Same here. Some images suck. I decided to work on it later. \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13074696%2Faaf90e001d44fd5369fb8c1c806c42d9%2Fnhhnncncnc.JPG?generation=1672249195705627&alt=media)\n\nlet's wait for keggle experts 💪",
      "replies": [
        {
          "id": 2078961,
          "postDate": "2022-12-28T19:50:57.807Z",
          "content": "<p><code>!pip install -qU python-gdcm pydicom pylibjpeg</code><br>\nShould solve your problem</p>",
          "rawMarkdown": "`!pip install -qU python-gdcm pydicom pylibjpeg`\nShould solve your problem",
          "votes": 4,
          "replies": [
            {
              "id": 2081517,
              "postDate": "2022-12-31T09:25:59.920Z",
              "content": "<p>Hello Rasoul, I want to ask how we can submit png converted images with the internet-disabled notebook. Can you share any content from which I get help?</p>",
              "rawMarkdown": "Hello Rasoul, I want to ask how we can submit png converted images with the internet-disabled notebook. Can you share any content from which I get help?"
            },
            {
              "id": 2081560,
              "postDate": "2022-12-31T11:05:44.313Z",
              "content": "<p>There is a good notebook that you can use it,<br>\n<a href=\"https://www.kaggle.com/code/theoviel/dicom-resized-png-jpg\" target=\"_blank\">https://www.kaggle.com/code/theoviel/dicom-resized-png-jpg</a></p>",
              "rawMarkdown": "There is a good notebook that you can use it,\nhttps://www.kaggle.com/code/theoviel/dicom-resized-png-jpg"
            }
          ]
        }
      ]
    },
    {
      "id": 2078840,
      "postDate": "2022-12-28T17:35:03.967Z",
      "content": "<p>I managed to convert all dcm images, however, one image i coud not convert it to np.array. please share the code that used for conversion.<br>\n'/kaggle/input/rsna-breast-cancer-detection/train_images/10038/1967300488.dcm' <br>\nthis is the image.</p>",
      "rawMarkdown": "\nI managed to convert all dcm images, however, one image i coud not convert it to np.array. please share the code that used for conversion.\n\n'/kaggle/input/rsna-breast-cancer-detection/train_images/10038/1967300488.dcm' \n\nthis is the image."
    }
  ],
  "comments": [
    {
      "id": 2081725,
      "author_name": "Peter Warren",
      "author_url": "",
      "post_date": "2022-12-31T14:46:25.670000",
      "content": "<p>!pip install -qU pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom python-gdcm</p>\n<p>I used this and it worked to open all the dcms, you could then convert to whatever you want and script it.</p>\n<p>You could also use this though:<br>\n<a href=\"https://www.kaggle.com/datasets/radek1/rsna-mammography-images-as-pngs\" target=\"_blank\">https://www.kaggle.com/datasets/radek1/rsna-mammography-images-as-pngs</a></p>\n<p>Someone took the time to convert all the images to pngs and make the dataset, this might be easier.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2078849,
      "author_name": "Alaa Madi",
      "author_url": "",
      "post_date": "2022-12-28T17:49:19.893000",
      "content": "<p>Same here. Some images suck. I decided to work on it later. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13074696%2Faaf90e001d44fd5369fb8c1c806c42d9%2Fnhhnncncnc.JPG?generation=1672249195705627&amp;alt=media\" alt=\"\"></p>\n<p>let's wait for keggle experts 💪</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2078961,
          "author_name": "Rasoul Mojtahedzadeh",
          "author_url": "",
          "post_date": "2022-12-28T19:50:57.807000",
          "content": "<p><code>!pip install -qU python-gdcm pydicom pylibjpeg</code><br>\nShould solve your problem</p>",
          "votes": 4,
          "replies": [
            {
              "id": 2081517,
              "author_name": "Wajid Hassan Moosa",
              "author_url": "",
              "post_date": "2022-12-31T09:25:59.920000",
              "content": "<p>Hello Rasoul, I want to ask how we can submit png converted images with the internet-disabled notebook. Can you share any content from which I get help?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2081560,
              "author_name": "Rasoul Mojtahedzadeh",
              "author_url": "",
              "post_date": "2022-12-31T11:05:44.313000",
              "content": "<p>There is a good notebook that you can use it,<br>\n<a href=\"https://www.kaggle.com/code/theoviel/dicom-resized-png-jpg\" target=\"_blank\">https://www.kaggle.com/code/theoviel/dicom-resized-png-jpg</a></p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2081725": "!pip install -qU pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom python-gdcm\n\nI used this and it worked to open all the dcms, you could then convert to whatever you want and script it.\n\nYou could also use this though:\nhttps://www.kaggle.com/datasets/radek1/rsna-mammography-images-as-pngs\n\nSomeone took the time to convert all the images to pngs and make the dataset, this might be easier.\n",
    "2078849": "Same here. Some images suck. I decided to work on it later. \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13074696%2Faaf90e001d44fd5369fb8c1c806c42d9%2Fnhhnncncnc.JPG?generation=1672249195705627&alt=media)\n\nlet's wait for keggle experts 💪",
    "2078840": "\nI managed to convert all dcm images, however, one image i coud not convert it to np.array. please share the code that used for conversion.\n\n'/kaggle/input/rsna-breast-cancer-detection/train_images/10038/1967300488.dcm' \n\nthis is the image."
  }
}