[vtkusers] Scalar Type of vtkDICOMImageReader

Scott Johnson Scott.Johnson at neuwave.com
Tue Apr 13 15:18:53 EDT 2010


Right now I just want the unsigned short CT numbers as the pixel values.

 

I'm seeing values as small as -3024.

 

Thanks

 

                                -- Scott

 

From: Jothybasu K Selvaraj [mailto:jothybasu at gmail.com] 
Sent: Tuesday, April 13, 2010 2:17 PM
To: Scott Johnson
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Scalar Type of vtkDICOMImageReader

 

If you want to convert raw values to HU, you should use the formula 

HU = PixelValue * RescaleSlope + RescaleIntercept



Jothy

 

On Tue, Apr 13, 2010 at 8: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

 

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


More information about the vtkusers mailing list