{
  "id": 164958,
  "title": "dicom to jpg (full dataset)",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/164958",
  "author_name": "RB",
  "post_date": "2020-07-08T03:14:32.834000",
  "votes": 14,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I converted DICOM images to jpeg.   Unzipped size is ~2.72GB. I am hoping this will be easier to work with on Colab. </p>\n\n<p>Full Dataset - <a href=\"https://www.kaggle.com/rashmibanthia/osic-pulmonary-jpg\">https://www.kaggle.com/rashmibanthia/osic-pulmonary-jpg</a> \nKernel - <a href=\"https://www.kaggle.com/rashmibanthia/dicom-jpg/\">https://www.kaggle.com/rashmibanthia/dicom-jpg/</a></p>\n\n<p>Please let me know if I missed something. </p>",
  "messages": [
    {
      "id": 919646,
      "postDate": "2020-07-08T03:14:32.833Z",
      "content": "<p>I converted DICOM images to jpeg.   Unzipped size is ~2.72GB. I am hoping this will be easier to work with on Colab. </p>\n\n<p>Full Dataset - <a href=\"https://www.kaggle.com/rashmibanthia/osic-pulmonary-jpg\">https://www.kaggle.com/rashmibanthia/osic-pulmonary-jpg</a> \nKernel - <a href=\"https://www.kaggle.com/rashmibanthia/dicom-jpg/\">https://www.kaggle.com/rashmibanthia/dicom-jpg/</a></p>\n\n<p>Please let me know if I missed something. </p>",
      "rawMarkdown": "I converted DICOM images to jpeg.   Unzipped size is ~2.72GB. I am hoping this will be easier to work with on Colab. \n\nFull Dataset - https://www.kaggle.com/rashmibanthia/osic-pulmonary-jpg \nKernel - https://www.kaggle.com/rashmibanthia/dicom-jpg/\n\nPlease let me know if I missed something. \n",
      "votes": 13
    },
    {
      "id": 926888,
      "postDate": "2020-07-13T04:23:59.500Z",
      "content": "<p>Thanks a lot.\nSome images seem to be padded with gray pixels. For instance, ID00419637202311204720264, the first patient in test/.\nIs that normal?\nIs there any information in the dicom metadata to automate the cropping?</p>",
      "rawMarkdown": "Thanks a lot.\nSome images seem to be padded with gray pixels. For instance, ID00419637202311204720264, the first patient in test/.\nIs that normal?\nIs there any information in the dicom metadata to automate the cropping?",
      "replies": [
        {
          "id": 927264,
          "postDate": "2020-07-13T09:48:18.983Z",
          "content": "<p>Hi, I think one easy way to find detect those images is to inspect its size. If the image is non-square (img.shape[0] != img.shape[1]), then it is padded. You can easily remove padding by taking a central 512x512 crop. Hope this helps.</p>",
          "rawMarkdown": "Hi, I think one easy way to find detect those images is to inspect its size. If the image is non-square (img.shape[0] != img.shape[1]), then it is padded. You can easily remove padding by taking a central 512x512 crop. Hope this helps.",
          "votes": 5
        }
      ]
    },
    {
      "id": 919679,
      "postDate": "2020-07-08T03:57:23.953Z",
      "content": "<p>Did you have any problems with some of the files? I am getting an error for some of them when calling pixel_array:</p>\n\n<p>ValueError: The length of the pixel data in the dataset (304318 bytes) doesn't match the expected length (524288 bytes). The dataset may be corrupted or there may be an issue with the pixel data handler.</p>",
      "rawMarkdown": "Did you have any problems with some of the files? I am getting an error for some of them when calling pixel_array:\n\nValueError: The length of the pixel data in the dataset (304318 bytes) doesn't match the expected length (524288 bytes). The dataset may be corrupted or there may be an issue with the pixel data handler.",
      "replies": [
        {
          "id": 919684,
          "postDate": "2020-07-08T03:59:45.503Z",
          "content": "<p>Yes some files are corrupt - I posted the list here - <a href=\"https://www.kaggle.com/rashmibanthia/corrupt-files\">https://www.kaggle.com/rashmibanthia/corrupt-files</a> </p>",
          "rawMarkdown": "Yes some files are corrupt - I posted the list here - https://www.kaggle.com/rashmibanthia/corrupt-files "
        }
      ]
    },
    {
      "id": 919881,
      "postDate": "2020-07-08T06:53:23.050Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 926888,
      "author_name": "RickestRick",
      "author_url": "",
      "post_date": "2020-07-13T04:23:59.500000",
      "content": "<p>Thanks a lot.\nSome images seem to be padded with gray pixels. For instance, ID00419637202311204720264, the first patient in test/.\nIs that normal?\nIs there any information in the dicom metadata to automate the cropping?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 927264,
          "author_name": "Ahmed Shahin",
          "author_url": "",
          "post_date": "2020-07-13T09:48:18.983000",
          "content": "<p>Hi, I think one easy way to find detect those images is to inspect its size. If the image is non-square (img.shape[0] != img.shape[1]), then it is padded. You can easily remove padding by taking a central 512x512 crop. Hope this helps.</p>",
          "votes": 5,
          "replies": []
        }
      ]
    },
    {
      "id": 919679,
      "author_name": "WillEvo1",
      "author_url": "",
      "post_date": "2020-07-08T03:57:23.953000",
      "content": "<p>Did you have any problems with some of the files? I am getting an error for some of them when calling pixel_array:</p>\n\n<p>ValueError: The length of the pixel data in the dataset (304318 bytes) doesn't match the expected length (524288 bytes). The dataset may be corrupted or there may be an issue with the pixel data handler.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 919684,
          "author_name": "RB",
          "author_url": "",
          "post_date": "2020-07-08T03:59:45.503000",
          "content": "<p>Yes some files are corrupt - I posted the list here - <a href=\"https://www.kaggle.com/rashmibanthia/corrupt-files\">https://www.kaggle.com/rashmibanthia/corrupt-files</a> </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 919881,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-07-08T06:53:23.050000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "919646": "I converted DICOM images to jpeg.   Unzipped size is ~2.72GB. I am hoping this will be easier to work with on Colab. \n\nFull Dataset - https://www.kaggle.com/rashmibanthia/osic-pulmonary-jpg \nKernel - https://www.kaggle.com/rashmibanthia/dicom-jpg/\n\nPlease let me know if I missed something. \n",
    "926888": "Thanks a lot.\nSome images seem to be padded with gray pixels. For instance, ID00419637202311204720264, the first patient in test/.\nIs that normal?\nIs there any information in the dicom metadata to automate the cropping?",
    "919679": "Did you have any problems with some of the files? I am getting an error for some of them when calling pixel_array:\n\nValueError: The length of the pixel data in the dataset (304318 bytes) doesn't match the expected length (524288 bytes). The dataset may be corrupted or there may be an issue with the pixel data handler.",
    "919881": ""
  }
}