[Insight-users] Qs about reading and writing (DICOM) images

Alexander Schmidt-Richberg a_schmiri at web.de
Tue Oct 17 04:00:39 EDT 2006


Hello all,

I have some questions regarding reading and writing images. I am currently working on a file converter, that is able to read and write various ITK and VTK file formats.
Here are my questions:

1) Is there a possibility, to determine the component type of an images before defining the reader type? I want to be able to automatically detect images of the types "short", "unsigned short" and "char", or is this only possible with user interaction?

2) Is it possible to write 12 bit DICOM images (i.e. 16 bit, of which only 12 are effectively used)? So far, when I write a "short" or "unsigned short" image, it is always stored with 16 bit, so the largest possible value is around 65k. In my opinion, I should somehow be able to set the "BitsStored" tag (0028,0101) to 12 and "HighBit" (0028,0102) to 11.

3) How exactly is the "RescaleIntercept" tag (0028,1052) handled? When I read a DICOM image with the value -1000, I get pixels with negative values. Does this mean, the negative values are stored in the file? Or does it mean, that the positive values have been reduced by 1000 by the GDCMImageIO in order to get the Hounsfield values? In the latter case, is there a way to avoid this and write the tag to the output file instead?

Thank you a lot for your help,
best regards

Alexander Schmidt-Richberg



More information about the Insight-users mailing list