{
  "id": 17906,
  "title": "Other DICOM-aware tools...",
  "url": "/competitions/second-annual-data-science-bowl/discussion/17906",
  "author_name": "",
  "post_date": "2015-12-15T03:49:00.583Z",
  "votes": 2,
  "comment_count": 7,
  "views": 2045,
  "content": "<p>In addition to the tools/libraries/modules mentioned in the documentation:</p>\n\n<p><a href=\"http://www.imagemagick.org/script/index.php\">ImageMagick</a> - Can convert DICOM to many other formats, apply necessary and/or convenient colorspace transformations (etc.), as well as dump out discrete DICOM-related fields (via &quot;identify -verbose somefile.dcm&quot;).  It can also be used to do batch conversions.</p>\n\n<p>I've used it in the past to convert DICOM images/slices to formats more easily read as &quot;data&quot; (such as 8-bit non-raw PGM).</p>",
  "messages": [
    {
      "id": "101358",
      "postDate": "12/15/2015 03:49:00",
      "content": "<p>In addition to the tools/libraries/modules mentioned in the documentation:</p>\n\n<p><a href=\"http://www.imagemagick.org/script/index.php\">ImageMagick</a> - Can convert DICOM to many other formats, apply necessary and/or convenient colorspace transformations (etc.), as well as dump out discrete DICOM-related fields (via &quot;identify -verbose somefile.dcm&quot;).  It can also be used to do batch conversions.</p>\n\n<p>I've used it in the past to convert DICOM images/slices to formats more easily read as &quot;data&quot; (such as 8-bit non-raw PGM).</p>",
      "rawMarkdown": "In addition to the tools/libraries/modules mentioned in the documentation:\r\n\r\n[ImageMagick][1] - Can convert DICOM to many other formats, apply necessary and/or convenient colorspace transformations (etc.), as well as dump out discrete DICOM-related fields (via \"identify -verbose somefile.dcm\").  It can also be used to do batch conversions.\r\n\r\nI've used it in the past to convert DICOM images/slices to formats more easily read as \"data\" (such as 8-bit non-raw PGM).\r\n\r\n  [1]: http://www.imagemagick.org/script/index.php",
      "votes": null
    },
    {
      "id": "101569",
      "postDate": "12/15/2015 22:12:26",
      "content": "<p>Do you know if any information is lost in the conversion?</p>",
      "rawMarkdown": "Do you know if any information is lost in the conversion?",
      "votes": null
    },
    {
      "id": "101612",
      "postDate": "12/16/2015 04:54:54",
      "content": "<p>[quote=megaminion;101569]</p>\n\n<p>Do you know if any information is lost in the conversion?</p>\n\n<p>[/quote]</p>\n\n<p>It depends on what you mean by &quot;information&quot; I guess.  There are two types of data in a typical DICOM file.  An image or series of images (which may or may not be compressed, and if compressed may or may not be losslessly compressed) and a bunch of discrete radiology-specific variables.  If the image is uncompressed or losslessly compressed, and you use ImageMagick with the correct options to convert it to a different lossless format, you shouldn't lose any image data.  The discrete variables won't be included in the converted image itself, but they're are available via the &quot;identify&quot; command and can be easily extracted from it's output.  That said, lots of real world DICOM images contain really horrible artifacts, some of which can be compensated for in the conversion process (via equalization and other options) - although you might consider that information loss.  DICOM viewer software typically handles such filtering semi-automagically, but the viewer/user is also provided a series of controls for enhancement and adjustment.</p>\n\n<p>Here's an example of the &quot;identify&quot; command and its output (most discrete DICOM variables are in the &quot;Properties&quot; section):</p>\n\n<p>% identify -verbose train/1/study/sax_5/IM-4557-0001.dcm</p>\n\n<pre>Image: train/1/study/sax_5/IM-4557-0001.dcm\n  Format: DCM (Digital Imaging and Communications in Medicine image)\n  Class: PseudoClass\n  Geometry: 230x256+0+0\n  Resolution: 72x72\n  Print size: 3.19444x3.55556\n  Units: Undefined\n  Type: TrueColor\n  Endianess: LSB\n  Colorspace: sRGB\n  Depth: 16-bit\n  Channel depth:\n    red: 16-bit\n    green: 16-bit\n    blue: 16-bit\n  Channel statistics:\n    Red:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n    Green:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n    Blue:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n  Image statistics:\n    Overall:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n  Colormap: 65536\n  Rendering intent: Perceptual\n  Gamma: 0.454545\n  Chromaticity:\n    red primary: (0.64,0.33)\n    green primary: (0.3,0.6)\n    blue primary: (0.15,0.06)\n    white point: (0.3127,0.329)\n  Interlace: None\n  Background color: white\n  Border color: srgb(223,223,223)\n  Matte color: grey74\n  Transparent color: black\n  Compose: Over\n  Page geometry: 230x256+0+0\n  Dispose: Undefined\n  Iterations: 0\n  Compression: Undefined\n  Orientation: Undefined\n  Properties:\n    date:create: 2015-12-14T20:36:30-05:00\n    date:modify: 2000-01-01T00:00:00-05:00\n    dcm:: MR20130108141855\n    dcm:AcquisitionNumber: 1\n    dcm:AcquisitionTime: 143456.972500\n    dcm:AngioFlag: N\n    dcm:BodyPartExamined: HEART\n    dcm:CardiacNumberofImages: 30\n    dcm:dB/dt: 0\n    dcm:EchoNumber(s): 1\n    dcm:EchoTime: 1.15\n    dcm:EchoTrainLength: 1\n    dcm:FlipAngle: 59\n    dcm:ImagedNucleus: 1H\n    dcm:ImageOrientation(Patient): 0.6412704900014\\0.6609492247605\\-0.3897669572217\\-0.5193910379064\\-2.87725648E-08\\-0.8545366871835\n    dcm:ImagePosition(Patient): -6.1293118013072\\-115.2682035908\\209.36298825445\n    dcm:ImageType: ORIGINAL\\PRIMARY\\M\\RETRO\\NORM\\DIS2D\n    dcm:ImagingFrequency: 63.641155\n    dcm:ImplementationClassUID: 1.2.276.0.7230010.3.0.3.6.0\n    dcm:ImplementationVersionName: OFFIS_DCMTK_360\n    dcm:Instance(formerlyImage)Number: 1\n    dcm:InstanceCreationTime: 143506.468000\n    dcm:MagneticFieldStrength: 1.5\n    dcm:Manufacturer: SIEMENS\n    dcm:Manufacturer'sModelName: Aera\n    dcm:MediaStorageSOPClassUID: 1.2.840.10008.5.1.4.1.1.4\n    dcm:MediaStorageSOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\n    dcm:Modality: MR\n    dcm:MRAcquisitionType: 2D\n    dcm:NominalInterval: 1123\n    dcm:NumberofAverages: 1\n    dcm:NumberofPhaseEncodingSteps: 172\n    dcm:Patient'sAge: 050Y\n    dcm:Patient'sBirthDate: 19000101\n    dcm:Patient'sID: 1\n    dcm:Patient'sName: NDSB_1\n    dcm:Patient'sSex: M\n    dcm:PatientPosition: HFS\n    dcm:PercentPhaseFieldofView: 89.84375\n    dcm:PercentSampling: 74.7826\n    dcm:PhaseEncodingDirection: ROW\n    dcm:PhotometricInterpretation: MONOCHROME2\n    dcm:PixelBandwidth: 930\n    dcm:PixelSpacing: 1.5625\\1.5625\n    dcm:ReferencedImageSequence: &#9618;&#9618;\n    dcm:RepetitionTime: 38.92\n    dcm:SAR: 1.9531589778436\n    dcm:ScanningSequence: GR\n    dcm:ScanOptions: CT\n    dcm:SequenceName: *tfi2d1_14\n    dcm:SequenceVariant: SK\\SS\n    dcm:SeriesDescription: sax\n    dcm:SeriesNumber: 5\n    dcm:SeriesTime: 143506\n    dcm:SliceLocation: -11.166474299894\n    dcm:SliceThickness: 6\n    dcm:SoftwareVersion(s): syngo MR D11\n    dcm:SOPClassUID: 1.2.840.10008.5.1.4.1.1.4\n    dcm:SOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\n    dcm:SpecificCharacterSet: ISO_IR 100\n    dcm:StudyTime: 141855.484000\n    dcm:TransferSyntaxUID: 1.2.840.10008.1.2.1\n    dcm:TransmittingCoil: Body\n    dcm:TriggerTime: 0\n    dcm:VariableFlipAngleFlag: N\n    dcm:WindowCenter: 278\n    dcm:WindowCenter&amp;WidthExplanation: Algo1\n    dcm:WindowWidth: 628\n    signature: 55baa64690b85acca6e1e1e6521166a81b1f41c73d10e8165539dddea12296d2\n  Artifacts:\n    filename: train/1/study/sax_5/IM-4557-0001.dcm\n    verbose: true\n  Tainted: False\n  Filesize: 120KB\n  Number pixels: 58.9K\n</pre>",
      "rawMarkdown": "[quote=megaminion;101569]\r\n\r\nDo you know if any information is lost in the conversion?\r\n\r\n[/quote]\r\n\r\nIt depends on what you mean by \"information\" I guess.  There are two types of data in a typical DICOM file.  An image or series of images (which may or may not be compressed, and if compressed may or may not be losslessly compressed) and a bunch of discrete radiology-specific variables.  If the image is uncompressed or losslessly compressed, and you use ImageMagick with the correct options to convert it to a different lossless format, you shouldn't lose any image data.  The discrete variables won't be included in the converted image itself, but they're are available via the \"identify\" command and can be easily extracted from it's output.  That said, lots of real world DICOM images contain really horrible artifacts, some of which can be compensated for in the conversion process (via equalization and other options) - although you might consider that information loss.  DICOM viewer software typically handles such filtering semi-automagically, but the viewer/user is also provided a series of controls for enhancement and adjustment.\r\n\r\nHere's an example of the \"identify\" command and its output (most discrete DICOM variables are in the \"Properties\" section):\r\n\r\n% identify -verbose train/1/study/sax_5/IM-4557-0001.dcm\r\n\r\n<pre>\r\nImage: train/1/study/sax_5/IM-4557-0001.dcm\r\n  Format: DCM (Digital Imaging and Communications in Medicine image)\r\n  Class: PseudoClass\r\n  Geometry: 230x256+0+0\r\n  Resolution: 72x72\r\n  Print size: 3.19444x3.55556\r\n  Units: Undefined\r\n  Type: TrueColor\r\n  Endianess: LSB\r\n  Colorspace: sRGB\r\n  Depth: 16-bit\r\n  Channel depth:\r\n    red: 16-bit\r\n    green: 16-bit\r\n    blue: 16-bit\r\n  Channel statistics:\r\n    Red:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n    Green:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n    Blue:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n  Image statistics:\r\n    Overall:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n  Colormap: 65536\r\n  Rendering intent: Perceptual\r\n  Gamma: 0.454545\r\n  Chromaticity:\r\n    red primary: (0.64,0.33)\r\n    green primary: (0.3,0.6)\r\n    blue primary: (0.15,0.06)\r\n    white point: (0.3127,0.329)\r\n  Interlace: None\r\n  Background color: white\r\n  Border color: srgb(223,223,223)\r\n  Matte color: grey74\r\n  Transparent color: black\r\n  Compose: Over\r\n  Page geometry: 230x256+0+0\r\n  Dispose: Undefined\r\n  Iterations: 0\r\n  Compression: Undefined\r\n  Orientation: Undefined\r\n  Properties:\r\n    date:create: 2015-12-14T20:36:30-05:00\r\n    date:modify: 2000-01-01T00:00:00-05:00\r\n    dcm:: MR20130108141855\r\n    dcm:AcquisitionNumber: 1\r\n    dcm:AcquisitionTime: 143456.972500\r\n    dcm:AngioFlag: N\r\n    dcm:BodyPartExamined: HEART\r\n    dcm:CardiacNumberofImages: 30\r\n    dcm:dB/dt: 0\r\n    dcm:EchoNumber(s): 1\r\n    dcm:EchoTime: 1.15\r\n    dcm:EchoTrainLength: 1\r\n    dcm:FlipAngle: 59\r\n    dcm:ImagedNucleus: 1H\r\n    dcm:ImageOrientation(Patient): 0.6412704900014\\0.6609492247605\\-0.3897669572217\\-0.5193910379064\\-2.87725648E-08\\-0.8545366871835\r\n    dcm:ImagePosition(Patient): -6.1293118013072\\-115.2682035908\\209.36298825445\r\n    dcm:ImageType: ORIGINAL\\PRIMARY\\M\\RETRO\\NORM\\DIS2D\r\n    dcm:ImagingFrequency: 63.641155\r\n    dcm:ImplementationClassUID: 1.2.276.0.7230010.3.0.3.6.0\r\n    dcm:ImplementationVersionName: OFFIS_DCMTK_360\r\n    dcm:Instance(formerlyImage)Number: 1\r\n    dcm:InstanceCreationTime: 143506.468000\r\n    dcm:MagneticFieldStrength: 1.5\r\n    dcm:Manufacturer: SIEMENS\r\n    dcm:Manufacturer'sModelName: Aera\r\n    dcm:MediaStorageSOPClassUID: 1.2.840.10008.5.1.4.1.1.4\r\n    dcm:MediaStorageSOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\r\n    dcm:Modality: MR\r\n    dcm:MRAcquisitionType: 2D\r\n    dcm:NominalInterval: 1123\r\n    dcm:NumberofAverages: 1\r\n    dcm:NumberofPhaseEncodingSteps: 172\r\n    dcm:Patient'sAge: 050Y\r\n    dcm:Patient'sBirthDate: 19000101\r\n    dcm:Patient'sID: 1\r\n    dcm:Patient'sName: NDSB_1\r\n    dcm:Patient'sSex: M\r\n    dcm:PatientPosition: HFS\r\n    dcm:PercentPhaseFieldofView: 89.84375\r\n    dcm:PercentSampling: 74.7826\r\n    dcm:PhaseEncodingDirection: ROW\r\n    dcm:PhotometricInterpretation: MONOCHROME2\r\n    dcm:PixelBandwidth: 930\r\n    dcm:PixelSpacing: 1.5625\\1.5625\r\n    dcm:ReferencedImageSequence: ▒▒\r\n    dcm:RepetitionTime: 38.92\r\n    dcm:SAR: 1.9531589778436\r\n    dcm:ScanningSequence: GR\r\n    dcm:ScanOptions: CT\r\n    dcm:SequenceName: *tfi2d1_14\r\n    dcm:SequenceVariant: SK\\SS\r\n    dcm:SeriesDescription: sax\r\n    dcm:SeriesNumber: 5\r\n    dcm:SeriesTime: 143506\r\n    dcm:SliceLocation: -11.166474299894\r\n    dcm:SliceThickness: 6\r\n    dcm:SoftwareVersion(s): syngo MR D11\r\n    dcm:SOPClassUID: 1.2.840.10008.5.1.4.1.1.4\r\n    dcm:SOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\r\n    dcm:SpecificCharacterSet: ISO_IR 100\r\n    dcm:StudyTime: 141855.484000\r\n    dcm:TransferSyntaxUID: 1.2.840.10008.1.2.1\r\n    dcm:TransmittingCoil: Body\r\n    dcm:TriggerTime: 0\r\n    dcm:VariableFlipAngleFlag: N\r\n    dcm:WindowCenter: 278\r\n    dcm:WindowCenter&WidthExplanation: Algo1\r\n    dcm:WindowWidth: 628\r\n    signature: 55baa64690b85acca6e1e1e6521166a81b1f41c73d10e8165539dddea12296d2\r\n  Artifacts:\r\n    filename: train/1/study/sax_5/IM-4557-0001.dcm\r\n    verbose: true\r\n  Tainted: False\r\n  Filesize: 120KB\r\n  Number pixels: 58.9K\r\n</pre>",
      "votes": null
    },
    {
      "id": "101631",
      "postDate": "12/16/2015 07:06:29",
      "content": "<p>Thank you for the detailed response!</p>",
      "rawMarkdown": "Thank you for the detailed response!",
      "votes": null
    },
    {
      "id": "101793",
      "postDate": "12/17/2015 04:07:30",
      "content": "<p>MATLAB's image processing toolbox has dicomread.m and other DICOM tools.</p>",
      "rawMarkdown": "MATLAB's image processing toolbox has dicomread.m and other DICOM tools.",
      "votes": null
    },
    {
      "id": "101958",
      "postDate": "12/18/2015 03:18:11",
      "content": "<p>There are a number of java-based tools available at <a href=\"https://github.com/dcm4che/dcm4che\">https://github.com/dcm4che/dcm4che</a>, including a number of command-line utilities that extract data as json, convert images to jpg, etc.</p>",
      "rawMarkdown": "There are a number of java-based tools available at https://github.com/dcm4che/dcm4che, including a number of command-line utilities that extract data as json, convert images to jpg, etc.",
      "votes": null
    },
    {
      "id": "101961",
      "postDate": "12/18/2015 03:58:07",
      "content": "<p>I'm quite fond of <a href=\"http://horosproject.org/\">http://horosproject.org/</a>\non OS X</p>",
      "rawMarkdown": "I'm quite fond of http://horosproject.org/\r\non OS X",
      "votes": null
    },
    {
      "id": "102160",
      "postDate": "12/20/2015 03:21:43",
      "content": "<p>I'm using the <code>oro.dicom</code> R package to read in the images. \n<a href=\"https://cran.r-project.org/web/packages/oro.dicom/index.html\">https://cran.r-project.org/web/packages/oro.dicom/index.html</a></p>\n\n<p>Some of my initial exploratory work in R using it:\n<a href=\"https://github.com/davluangu/diagnose_heart_disease\">https://github.com/davluangu/diagnose_heart_disease</a></p>",
      "rawMarkdown": "I'm using the `oro.dicom` R package to read in the images. \r\nhttps://cran.r-project.org/web/packages/oro.dicom/index.html\r\n\r\nSome of my initial exploratory work in R using it:\r\nhttps://github.com/davluangu/diagnose_heart_disease",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 101569,
      "author_name": "maxwang7",
      "author_url": "",
      "post_date": "12/15/2015 22:12:26",
      "content": "<p>Do you know if any information is lost in the conversion?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101612,
      "author_name": "yetiman",
      "author_url": "",
      "post_date": "12/16/2015 04:54:54",
      "content": "<p>[quote=megaminion;101569]</p>\n\n<p>Do you know if any information is lost in the conversion?</p>\n\n<p>[/quote]</p>\n\n<p>It depends on what you mean by &quot;information&quot; I guess.  There are two types of data in a typical DICOM file.  An image or series of images (which may or may not be compressed, and if compressed may or may not be losslessly compressed) and a bunch of discrete radiology-specific variables.  If the image is uncompressed or losslessly compressed, and you use ImageMagick with the correct options to convert it to a different lossless format, you shouldn't lose any image data.  The discrete variables won't be included in the converted image itself, but they're are available via the &quot;identify&quot; command and can be easily extracted from it's output.  That said, lots of real world DICOM images contain really horrible artifacts, some of which can be compensated for in the conversion process (via equalization and other options) - although you might consider that information loss.  DICOM viewer software typically handles such filtering semi-automagically, but the viewer/user is also provided a series of controls for enhancement and adjustment.</p>\n\n<p>Here's an example of the &quot;identify&quot; command and its output (most discrete DICOM variables are in the &quot;Properties&quot; section):</p>\n\n<p>% identify -verbose train/1/study/sax_5/IM-4557-0001.dcm</p>\n\n<pre>Image: train/1/study/sax_5/IM-4557-0001.dcm\n  Format: DCM (Digital Imaging and Communications in Medicine image)\n  Class: PseudoClass\n  Geometry: 230x256+0+0\n  Resolution: 72x72\n  Print size: 3.19444x3.55556\n  Units: Undefined\n  Type: TrueColor\n  Endianess: LSB\n  Colorspace: sRGB\n  Depth: 16-bit\n  Channel depth:\n    red: 16-bit\n    green: 16-bit\n    blue: 16-bit\n  Channel statistics:\n    Red:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n    Green:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n    Blue:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n  Image statistics:\n    Overall:\n      min: 3658 (0.0558175)\n      max: 65535 (1)\n      mean: 12908 (0.196964)\n      standard deviation: 8880.15 (0.135502)\n      kurtosis: 2.03112\n      skewness: 1.42502\n  Colormap: 65536\n  Rendering intent: Perceptual\n  Gamma: 0.454545\n  Chromaticity:\n    red primary: (0.64,0.33)\n    green primary: (0.3,0.6)\n    blue primary: (0.15,0.06)\n    white point: (0.3127,0.329)\n  Interlace: None\n  Background color: white\n  Border color: srgb(223,223,223)\n  Matte color: grey74\n  Transparent color: black\n  Compose: Over\n  Page geometry: 230x256+0+0\n  Dispose: Undefined\n  Iterations: 0\n  Compression: Undefined\n  Orientation: Undefined\n  Properties:\n    date:create: 2015-12-14T20:36:30-05:00\n    date:modify: 2000-01-01T00:00:00-05:00\n    dcm:: MR20130108141855\n    dcm:AcquisitionNumber: 1\n    dcm:AcquisitionTime: 143456.972500\n    dcm:AngioFlag: N\n    dcm:BodyPartExamined: HEART\n    dcm:CardiacNumberofImages: 30\n    dcm:dB/dt: 0\n    dcm:EchoNumber(s): 1\n    dcm:EchoTime: 1.15\n    dcm:EchoTrainLength: 1\n    dcm:FlipAngle: 59\n    dcm:ImagedNucleus: 1H\n    dcm:ImageOrientation(Patient): 0.6412704900014\\0.6609492247605\\-0.3897669572217\\-0.5193910379064\\-2.87725648E-08\\-0.8545366871835\n    dcm:ImagePosition(Patient): -6.1293118013072\\-115.2682035908\\209.36298825445\n    dcm:ImageType: ORIGINAL\\PRIMARY\\M\\RETRO\\NORM\\DIS2D\n    dcm:ImagingFrequency: 63.641155\n    dcm:ImplementationClassUID: 1.2.276.0.7230010.3.0.3.6.0\n    dcm:ImplementationVersionName: OFFIS_DCMTK_360\n    dcm:Instance(formerlyImage)Number: 1\n    dcm:InstanceCreationTime: 143506.468000\n    dcm:MagneticFieldStrength: 1.5\n    dcm:Manufacturer: SIEMENS\n    dcm:Manufacturer'sModelName: Aera\n    dcm:MediaStorageSOPClassUID: 1.2.840.10008.5.1.4.1.1.4\n    dcm:MediaStorageSOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\n    dcm:Modality: MR\n    dcm:MRAcquisitionType: 2D\n    dcm:NominalInterval: 1123\n    dcm:NumberofAverages: 1\n    dcm:NumberofPhaseEncodingSteps: 172\n    dcm:Patient'sAge: 050Y\n    dcm:Patient'sBirthDate: 19000101\n    dcm:Patient'sID: 1\n    dcm:Patient'sName: NDSB_1\n    dcm:Patient'sSex: M\n    dcm:PatientPosition: HFS\n    dcm:PercentPhaseFieldofView: 89.84375\n    dcm:PercentSampling: 74.7826\n    dcm:PhaseEncodingDirection: ROW\n    dcm:PhotometricInterpretation: MONOCHROME2\n    dcm:PixelBandwidth: 930\n    dcm:PixelSpacing: 1.5625\\1.5625\n    dcm:ReferencedImageSequence: &#9618;&#9618;\n    dcm:RepetitionTime: 38.92\n    dcm:SAR: 1.9531589778436\n    dcm:ScanningSequence: GR\n    dcm:ScanOptions: CT\n    dcm:SequenceName: *tfi2d1_14\n    dcm:SequenceVariant: SK\\SS\n    dcm:SeriesDescription: sax\n    dcm:SeriesNumber: 5\n    dcm:SeriesTime: 143506\n    dcm:SliceLocation: -11.166474299894\n    dcm:SliceThickness: 6\n    dcm:SoftwareVersion(s): syngo MR D11\n    dcm:SOPClassUID: 1.2.840.10008.5.1.4.1.1.4\n    dcm:SOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\n    dcm:SpecificCharacterSet: ISO_IR 100\n    dcm:StudyTime: 141855.484000\n    dcm:TransferSyntaxUID: 1.2.840.10008.1.2.1\n    dcm:TransmittingCoil: Body\n    dcm:TriggerTime: 0\n    dcm:VariableFlipAngleFlag: N\n    dcm:WindowCenter: 278\n    dcm:WindowCenter&amp;WidthExplanation: Algo1\n    dcm:WindowWidth: 628\n    signature: 55baa64690b85acca6e1e1e6521166a81b1f41c73d10e8165539dddea12296d2\n  Artifacts:\n    filename: train/1/study/sax_5/IM-4557-0001.dcm\n    verbose: true\n  Tainted: False\n  Filesize: 120KB\n  Number pixels: 58.9K\n</pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101631,
      "author_name": "maxwang7",
      "author_url": "",
      "post_date": "12/16/2015 07:06:29",
      "content": "<p>Thank you for the detailed response!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101793,
      "author_name": "smckenna",
      "author_url": "",
      "post_date": "12/17/2015 04:07:30",
      "content": "<p>MATLAB's image processing toolbox has dicomread.m and other DICOM tools.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101958,
      "author_name": "drewfarris",
      "author_url": "",
      "post_date": "12/18/2015 03:18:11",
      "content": "<p>There are a number of java-based tools available at <a href=\"https://github.com/dcm4che/dcm4che\">https://github.com/dcm4che/dcm4che</a>, including a number of command-line utilities that extract data as json, convert images to jpg, etc.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101961,
      "author_name": "michamucha",
      "author_url": "",
      "post_date": "12/18/2015 03:58:07",
      "content": "<p>I'm quite fond of <a href=\"http://horosproject.org/\">http://horosproject.org/</a>\non OS X</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 102160,
      "author_name": "iamdavid",
      "author_url": "",
      "post_date": "12/20/2015 03:21:43",
      "content": "<p>I'm using the <code>oro.dicom</code> R package to read in the images. \n<a href=\"https://cran.r-project.org/web/packages/oro.dicom/index.html\">https://cran.r-project.org/web/packages/oro.dicom/index.html</a></p>\n\n<p>Some of my initial exploratory work in R using it:\n<a href=\"https://github.com/davluangu/diagnose_heart_disease\">https://github.com/davluangu/diagnose_heart_disease</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "101358": "In addition to the tools/libraries/modules mentioned in the documentation:\r\n\r\n[ImageMagick][1] - Can convert DICOM to many other formats, apply necessary and/or convenient colorspace transformations (etc.), as well as dump out discrete DICOM-related fields (via \"identify -verbose somefile.dcm\").  It can also be used to do batch conversions.\r\n\r\nI've used it in the past to convert DICOM images/slices to formats more easily read as \"data\" (such as 8-bit non-raw PGM).\r\n\r\n  [1]: http://www.imagemagick.org/script/index.php",
    "101569": "Do you know if any information is lost in the conversion?",
    "101612": "[quote=megaminion;101569]\r\n\r\nDo you know if any information is lost in the conversion?\r\n\r\n[/quote]\r\n\r\nIt depends on what you mean by \"information\" I guess.  There are two types of data in a typical DICOM file.  An image or series of images (which may or may not be compressed, and if compressed may or may not be losslessly compressed) and a bunch of discrete radiology-specific variables.  If the image is uncompressed or losslessly compressed, and you use ImageMagick with the correct options to convert it to a different lossless format, you shouldn't lose any image data.  The discrete variables won't be included in the converted image itself, but they're are available via the \"identify\" command and can be easily extracted from it's output.  That said, lots of real world DICOM images contain really horrible artifacts, some of which can be compensated for in the conversion process (via equalization and other options) - although you might consider that information loss.  DICOM viewer software typically handles such filtering semi-automagically, but the viewer/user is also provided a series of controls for enhancement and adjustment.\r\n\r\nHere's an example of the \"identify\" command and its output (most discrete DICOM variables are in the \"Properties\" section):\r\n\r\n% identify -verbose train/1/study/sax_5/IM-4557-0001.dcm\r\n\r\n<pre>\r\nImage: train/1/study/sax_5/IM-4557-0001.dcm\r\n  Format: DCM (Digital Imaging and Communications in Medicine image)\r\n  Class: PseudoClass\r\n  Geometry: 230x256+0+0\r\n  Resolution: 72x72\r\n  Print size: 3.19444x3.55556\r\n  Units: Undefined\r\n  Type: TrueColor\r\n  Endianess: LSB\r\n  Colorspace: sRGB\r\n  Depth: 16-bit\r\n  Channel depth:\r\n    red: 16-bit\r\n    green: 16-bit\r\n    blue: 16-bit\r\n  Channel statistics:\r\n    Red:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n    Green:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n    Blue:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n  Image statistics:\r\n    Overall:\r\n      min: 3658 (0.0558175)\r\n      max: 65535 (1)\r\n      mean: 12908 (0.196964)\r\n      standard deviation: 8880.15 (0.135502)\r\n      kurtosis: 2.03112\r\n      skewness: 1.42502\r\n  Colormap: 65536\r\n  Rendering intent: Perceptual\r\n  Gamma: 0.454545\r\n  Chromaticity:\r\n    red primary: (0.64,0.33)\r\n    green primary: (0.3,0.6)\r\n    blue primary: (0.15,0.06)\r\n    white point: (0.3127,0.329)\r\n  Interlace: None\r\n  Background color: white\r\n  Border color: srgb(223,223,223)\r\n  Matte color: grey74\r\n  Transparent color: black\r\n  Compose: Over\r\n  Page geometry: 230x256+0+0\r\n  Dispose: Undefined\r\n  Iterations: 0\r\n  Compression: Undefined\r\n  Orientation: Undefined\r\n  Properties:\r\n    date:create: 2015-12-14T20:36:30-05:00\r\n    date:modify: 2000-01-01T00:00:00-05:00\r\n    dcm:: MR20130108141855\r\n    dcm:AcquisitionNumber: 1\r\n    dcm:AcquisitionTime: 143456.972500\r\n    dcm:AngioFlag: N\r\n    dcm:BodyPartExamined: HEART\r\n    dcm:CardiacNumberofImages: 30\r\n    dcm:dB/dt: 0\r\n    dcm:EchoNumber(s): 1\r\n    dcm:EchoTime: 1.15\r\n    dcm:EchoTrainLength: 1\r\n    dcm:FlipAngle: 59\r\n    dcm:ImagedNucleus: 1H\r\n    dcm:ImageOrientation(Patient): 0.6412704900014\\0.6609492247605\\-0.3897669572217\\-0.5193910379064\\-2.87725648E-08\\-0.8545366871835\r\n    dcm:ImagePosition(Patient): -6.1293118013072\\-115.2682035908\\209.36298825445\r\n    dcm:ImageType: ORIGINAL\\PRIMARY\\M\\RETRO\\NORM\\DIS2D\r\n    dcm:ImagingFrequency: 63.641155\r\n    dcm:ImplementationClassUID: 1.2.276.0.7230010.3.0.3.6.0\r\n    dcm:ImplementationVersionName: OFFIS_DCMTK_360\r\n    dcm:Instance(formerlyImage)Number: 1\r\n    dcm:InstanceCreationTime: 143506.468000\r\n    dcm:MagneticFieldStrength: 1.5\r\n    dcm:Manufacturer: SIEMENS\r\n    dcm:Manufacturer'sModelName: Aera\r\n    dcm:MediaStorageSOPClassUID: 1.2.840.10008.5.1.4.1.1.4\r\n    dcm:MediaStorageSOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\r\n    dcm:Modality: MR\r\n    dcm:MRAcquisitionType: 2D\r\n    dcm:NominalInterval: 1123\r\n    dcm:NumberofAverages: 1\r\n    dcm:NumberofPhaseEncodingSteps: 172\r\n    dcm:Patient'sAge: 050Y\r\n    dcm:Patient'sBirthDate: 19000101\r\n    dcm:Patient'sID: 1\r\n    dcm:Patient'sName: NDSB_1\r\n    dcm:Patient'sSex: M\r\n    dcm:PatientPosition: HFS\r\n    dcm:PercentPhaseFieldofView: 89.84375\r\n    dcm:PercentSampling: 74.7826\r\n    dcm:PhaseEncodingDirection: ROW\r\n    dcm:PhotometricInterpretation: MONOCHROME2\r\n    dcm:PixelBandwidth: 930\r\n    dcm:PixelSpacing: 1.5625\\1.5625\r\n    dcm:ReferencedImageSequence: ▒▒\r\n    dcm:RepetitionTime: 38.92\r\n    dcm:SAR: 1.9531589778436\r\n    dcm:ScanningSequence: GR\r\n    dcm:ScanOptions: CT\r\n    dcm:SequenceName: *tfi2d1_14\r\n    dcm:SequenceVariant: SK\\SS\r\n    dcm:SeriesDescription: sax\r\n    dcm:SeriesNumber: 5\r\n    dcm:SeriesTime: 143506\r\n    dcm:SliceLocation: -11.166474299894\r\n    dcm:SliceThickness: 6\r\n    dcm:SoftwareVersion(s): syngo MR D11\r\n    dcm:SOPClassUID: 1.2.840.10008.5.1.4.1.1.4\r\n    dcm:SOPInstanceUID: 1.3.6.1.4.1.9590.100.1.2.155926562610379287424879000432859632760\r\n    dcm:SpecificCharacterSet: ISO_IR 100\r\n    dcm:StudyTime: 141855.484000\r\n    dcm:TransferSyntaxUID: 1.2.840.10008.1.2.1\r\n    dcm:TransmittingCoil: Body\r\n    dcm:TriggerTime: 0\r\n    dcm:VariableFlipAngleFlag: N\r\n    dcm:WindowCenter: 278\r\n    dcm:WindowCenter&WidthExplanation: Algo1\r\n    dcm:WindowWidth: 628\r\n    signature: 55baa64690b85acca6e1e1e6521166a81b1f41c73d10e8165539dddea12296d2\r\n  Artifacts:\r\n    filename: train/1/study/sax_5/IM-4557-0001.dcm\r\n    verbose: true\r\n  Tainted: False\r\n  Filesize: 120KB\r\n  Number pixels: 58.9K\r\n</pre>",
    "101631": "Thank you for the detailed response!",
    "101793": "MATLAB's image processing toolbox has dicomread.m and other DICOM tools.",
    "101958": "There are a number of java-based tools available at https://github.com/dcm4che/dcm4che, including a number of command-line utilities that extract data as json, convert images to jpg, etc.",
    "101961": "I'm quite fond of http://horosproject.org/\r\non OS X",
    "102160": "I'm using the `oro.dicom` R package to read in the images. \r\nhttps://cran.r-project.org/web/packages/oro.dicom/index.html\r\n\r\nSome of my initial exploratory work in R using it:\r\nhttps://github.com/davluangu/diagnose_heart_disease"
  },
  "source": "meta"
}