[vtkusers] Scalar Type of vtkDICOMImageReader

Scott Johnson Scott.Johnson at neuwave.com
Tue Apr 13 15:06:21 EDT 2010


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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100413/9c9abd3f/attachment.htm>


More information about the vtkusers mailing list