[Insight-developers] GDCM eventually replacing DICOMImageIO2
Miller, James V (Research)
millerjv at crd.ge.com
Tue Nov 30 09:58:24 EST 2004
Mathieu,
Our thoughts on the rescaling/offsetting was to promote to a data type that
was capable of holding the dynamic range of the data after the slope and
intercept
was applied. The decision to promote could be based on the typical dynamic
range of the modality. (However, we have seen cases where CT data was pushed
to
a PACS, pulled off the PACS, and the slope had been modified from 1 to 2 and
the
intercept modified from -1024 to -2048.) The data would be read from disk,
transformed by the slope and intercept (possibly with promotion from char to
short or short to float, etc.) and passed to the ImageFileReader. The
ImageFileReader then casts the data to the pixel type requested by the user.
Now this was the vision, the implementation in DICOMParser/DICOMImageIO2 may
have only performed the promotion if the slope != 1.0.
But I think the ideal solution is for there to be no data corruption (by
overflow) between the pulling the data off disk and passing it off to
the ImageFileReader. So ideally the DICOM code would apply the slope and
intercept and promote as necessary to avoid overflow. However, we wouldn't
want to universally promote to a large data type if it were not necessary.
So if the data is short and the slope is 1 and the intercept is 0, then the
data sent to the ImageFileReader would be short.
Thinking about it a little more, I think we can probably get away with
assuming the application of the intercept will not cause the datatype
to change. I can't recall whether DICOM specifies whether the data
is a "short" vs an "unsigned short". DICOM may only say the data is
"16 bit" and rely on the sign of the intercept to determine whether a
"short" or "unsigned short" is needed.
Jim
-----Original Message-----
From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
Sent: Monday, November 29, 2004 6:13 PM
To: Lorensen, William E (Research)
Cc: Luis Ibanez; insight-developers at public.kitware.com
Subject: Re: [Insight-developers] GDCM eventually replacing
DICOMImageIO2
Lorensen, William E (Research) wrote:
> Mathieu,
> I also noticed that all GDCM tests are failing on terminus.kitware running
a
> Visual Studio 6 compiler.
Unfortunately Luis is away, and the dashboard is on his machine. He will
be back on wednesday.
-----
Jim,
I implemented the rescale based on the Slope/Intercept. Can I assume the
slope/intercept are correct, meanig that I won't be ouside of the domain
after rescaling (e.g. pixel = unsigned char and intercept = -1024 ) ? Do
you think I should precomputed the scalar range of the image before ?
Thanks
Mathieu
_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list