Importing CT cases with Hounsfield Units

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
antibios
Posts: 2
Joined: Mon, 2013-10-21, 07:31

Importing CT cases with Hounsfield Units

#1 Post by antibios »

I'm running a study where I need to place specific markers on CT and MRI
images without affecting the window/levels. Currently I can export the Dicom
files using dcmj2pnm and overlay the marker using imagemagik onto the image.
But when I import the dicom file back using img2dcm, the window levels are
wrong (either too dark or too light).

Is there a way to export and import a CT or MRI image whilst retaining the widow levels? (I also need to retain
the hounsfield units).

Currently I've been trying the commands:
> dcmj2pnm -d -v -im +oj +Jq 90 +W 1 image1.dcm image1.jpg
> composite marker1.jpg image1_marked.jpg
> img2dcm --dataset-from image1.dcm image1_marked.jpg

Andreas Thiel
Posts: 18
Joined: Tue, 2007-12-18, 14:25

Re: Importing CT cases with Hounsfield Units

#2 Post by Andreas Thiel »

If you transfer the image to an jpg image, you loose the information about the original Hounsfield values.
Because you reduce the image data information from 12bit data to 8 bit gray values.

So if you want to re use the original image data, you have to use an DICOM Viewer (or an Viewer with 12 bit support)

May be Imagemagick works with 16-bit ASCII PGM/PPM ?
Use this with +opw

Or you use Software like DICOMscope, to create an presentation state file.

antibios
Posts: 2
Joined: Mon, 2013-10-21, 07:31

Re: Importing CT cases with Hounsfield Units

#3 Post by antibios »

Interestingly I can't find the tool to import PNM files using DCMTK. Whenever I convert a DCM file to JPG it seems to convert back to 8bit.

Is anyone able to show me what file format I should export and import CT images and or commands? Whenever I export CT data, I can't seem to import it back with the houndsfield units.

Matt

J. Riesmeier
DCMTK Developer
Posts: 2509
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Importing CT cases with Hounsfield Units

#4 Post by J. Riesmeier »

Interestingly I can't find the tool to import PNM files using DCMTK.
Correct. img2dcm does not support any input format that would allow for specifying 16 bits per pixel (e.g. PGM or TIFF). See documentation: http://support.dcmtk.org/docs-snapshot/ ... ut_plugins
Is anyone able to show me what file format I should export and import CT images and or commands?
If you don't want to write your own img2dcm input plugin, I would use raw pixel data and insert it with dcmodify's --insert-from-file option. See: http://support.dcmtk.org/docs-snapshot/ ... l#examples

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest