[Insight-users] Problem getting data type for DICOM files

Jenny Simpson simpson at cs.utah.edu
Fri, 6 Feb 2004 11:21:31 -0700 (MST)


The problem is that if the data is stored as a short and we cast it to
something incompatible (like an unsigned short), then the data is skewed.
We resolved this by declaring all pixel values signed integers, which
correctly handles all of the data types we've tested.

Jenny Simpson
Scientific Computing and Imaging Institute
University of Utah


On Thu, 5 Feb 2004, Bill Lorensen wrote:

> Do you really need the data type. The reader will produce whatever type you
> ask for.
>
> Bill
>
> At 07:16 PM 2/5/2004, Jenny Simpson wrote:
> >It seems like there is a "loop 22" problem with reading DICOM files.  If I
> >don't know the data type of the pixel data up front, I have a problem.
> >The problem is that I can't declare an itk::ImageFileReader without first
> >knowing the pixel type.  But I can't find out the pixel type until I've
> >declared a reader and read in the data.  So it's a circular problem.
> >I need to be able to determine the data type at run time.  What is the
> >solution?
> >
> >Thanks,
> >
> >Jenny Simpson
> >Scientific Computing and Imaging Institute
> >University of Utah
> >
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users at itk.org
> >http://www.itk.org/mailman/listinfo/insight-users
>
>