{
  "id": 64573,
  "title": "Extracting pixel data from dicom(.dcm) images",
  "url": "/competitions/rsna-pneumonia-detection-challenge/discussion/64573",
  "author_name": "Chandan Verma",
  "post_date": "2018-08-30T12:10:21.186000",
  "votes": 2,
  "comment_count": 3,
  "views": 0,
  "content": "<p>This article might help you to get some information to work with dicom images:</p>\n\n<p><a href=\"https://medium.com/@verma.chandan/building-neural-network-for-medical-imaging-using-deep-learning-in-tensorflow-part-1-ab993b7fb04f\">https://medium.com/@verma.chandan/building-neural-network-for-medical-imaging-using-deep-learning-in-tensorflow-part-1-ab993b7fb04f</a></p>",
  "messages": [
    {
      "id": 378937,
      "postDate": "2018-08-30T17:17:44.903Z",
      "content": "<p>tl;dr:</p>\n\n<pre><code>import pydicom\nfilename = \"all/stage_1_train_images/00a85be6-6eb0-421d-8acf-ff2dc0007e8a.dcm\"\nds = pydicom.dcmread(filename) \nprint(ds.pixel_array[512][512]) # [x][y]\n</code></pre>",
      "rawMarkdown": "tl;dr:\n\n    import pydicom\n    filename = \"all/stage_1_train_images/00a85be6-6eb0-421d-8acf-ff2dc0007e8a.dcm\"\n    ds = pydicom.dcmread(filename) \n    print(ds.pixel_array[512][512]) # [x][y]\n\n\n\n",
      "votes": 5
    },
    {
      "id": 378610,
      "postDate": "2018-08-30T12:10:21.187Z",
      "content": "<p>This article might help you to get some information to work with dicom images:</p>\n\n<p><a href=\"https://medium.com/@verma.chandan/building-neural-network-for-medical-imaging-using-deep-learning-in-tensorflow-part-1-ab993b7fb04f\">https://medium.com/@verma.chandan/building-neural-network-for-medical-imaging-using-deep-learning-in-tensorflow-part-1-ab993b7fb04f</a></p>",
      "rawMarkdown": "This article might help you to get some information to work with dicom images:\n\nhttps://medium.com/@verma.chandan/building-neural-network-for-medical-imaging-using-deep-learning-in-tensorflow-part-1-ab993b7fb04f",
      "votes": 2
    },
    {
      "id": 379878,
      "postDate": "2018-09-01T05:57:59.247Z",
      "content": "<p>I got an issue reading pixel array from the dcm image, same method as the notebook presented :</p>\n\n<p><code>dcm_file = folder_images + '%s.dcm' % patientId</code></p>\n\n<p><code>dcm_data = pydicom.dcmread(dcm_file)</code></p>",
      "rawMarkdown": "I got an issue reading pixel array from the dcm image, same method as the notebook presented :\n\n` dcm_file = folder_images + '%s.dcm' % patientId`\n\n` dcm_data = pydicom.dcmread(dcm_file)`"
    },
    {
      "id": 379877,
      "postDate": "2018-09-01T05:56:00.660Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 378937,
      "author_name": "n17r",
      "author_url": "",
      "post_date": "2018-08-30T17:17:44.903000",
      "content": "<p>tl;dr:</p>\n\n<pre><code>import pydicom\nfilename = \"all/stage_1_train_images/00a85be6-6eb0-421d-8acf-ff2dc0007e8a.dcm\"\nds = pydicom.dcmread(filename) \nprint(ds.pixel_array[512][512]) # [x][y]\n</code></pre>",
      "votes": 5,
      "replies": []
    },
    {
      "id": 379878,
      "author_name": "Adamski",
      "author_url": "",
      "post_date": "2018-09-01T05:57:59.247000",
      "content": "<p>I got an issue reading pixel array from the dcm image, same method as the notebook presented :</p>\n\n<p><code>dcm_file = folder_images + '%s.dcm' % patientId</code></p>\n\n<p><code>dcm_data = pydicom.dcmread(dcm_file)</code></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 379877,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-09-01T05:56:00.660000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "378937": "tl;dr:\n\n    import pydicom\n    filename = \"all/stage_1_train_images/00a85be6-6eb0-421d-8acf-ff2dc0007e8a.dcm\"\n    ds = pydicom.dcmread(filename) \n    print(ds.pixel_array[512][512]) # [x][y]\n\n\n\n",
    "378610": "This article might help you to get some information to work with dicom images:\n\nhttps://medium.com/@verma.chandan/building-neural-network-for-medical-imaging-using-deep-learning-in-tensorflow-part-1-ab993b7fb04f",
    "379878": "I got an issue reading pixel array from the dcm image, same method as the notebook presented :\n\n` dcm_file = folder_images + '%s.dcm' % patientId`\n\n` dcm_data = pydicom.dcmread(dcm_file)`",
    "379877": ""
  }
}