[vtkusers] Scalar Type of vtkDICOMImageReader

Bill Lorensen bill.lorensen at gmail.com
Tue Apr 13 15:20:47 EDT 2010


12 bits becomes short. There is no native 12 bit data storage.

I don't know about the vtkDICOMImageReader, but in itk we apply the
rescale slope and intercept that is in the dicom header. For CT data,
this reults in negative values. Hence, short is needed. For CT data,
the resulting values should be Hounsfeld units.

Bill

On Tue, Apr 13, 2010 at 3:06 PM, Scott Johnson
<Scott.Johnson at neuwave.com> wrote:
> Hi Folks,
>
>
>
> I’m reading a series of DICOM files from a directory with code like this:
>
>
>
>     _reader=vtkDICOMImageReader::New();
>
>     _reader->SetDirectoryName(directory.c_str());
>
>     _reader->SetDataScalarTypeToUnsignedShort();
>
>     _reader->Update();
>
>
>
>     cerr << "Scalar Type: " << _reader->GetDataScalarType();
>
>
>
> How come the value of _reader->GetDataScalarType is 4, which is VTK_SHORT?
>
>
>
> The files are CT which should be 12 bit unsigned data.  When I access the
> data I get negative values, which I don’t want.  (I can’t find code
> converting to Hounsfield units which could be negative.)  How do I get
> Unsigned Short data from vtkDICOMImageReader?
>
>
>
> Thanks
>
>
>
>                                 -- Scott
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list