[Insight-users] problems with DICOM reader

Luis Ibanez luis.ibanez at kitware.com
Wed, 11 Feb 2004 09:28:23 -0500


Hi Marc,

You seem to be reading DICOM images using signed short
(16 bits), saving them as VTK images and then traying
to visualize them with a ray casting module that only
works with *8 bits*.

The VTK files will be *16 bits* ....

It is then just normal to find saturation if you try
to visualize them with a method limited to 8 bits.

Please try an alternative method for visualizing the
images, or use a vtkShiftScale filter in order to make
the intensities fit in 8 bits.

You could also convert the image type in ITK using the
RescaleIntensityImageFilter instantiated over input
image "signed short" and output image "unsigned char".
Then connect the output of the rescale filter to the
ImageFileWriter (also instantiated over unsigned char).


For a sanity check you probably should attempt reading
the VTK image using VolView, which now manages multiple
pixel types for volume rendering.


Regards,


    Luis


--------------------
Marc HUERTAS wrote:

> Hi,
> 
> Thanks...
> 
> i've alread tested the DICOM images with MRIConvert and I can view them 
> without problems.
> 
> I'm using a VTK ray casting module that only works with 8bit unsigned 
> images...
> 
> I'm moving the images from a linux workstation to a windows one, but this 
> shouldn't be a problem, should be?
> 
> marc
> 
> 
> On Wed, 11 Feb 2004 08:33:57 -0500, Luis Ibanez wrote
> 
>>Hi Marc,
>>
>>Thanks for the clarification,
>>
>>A saturation leads to suspect of a
>>conflict with the endianness of the
>>image.  Are you moving the images
>>from PCs to Sun or Macs for example ?
>>
>>What are you using for viewing the
>>.vtk images ?
>>
>>Please check first that you can view
>>the original DICOM images using
>>MRIConvert or VolView.
>>
>>Regards,
>>
>>   Luis
>>
>>--------------------
>>Marc HUERTAS wrote:
>>
>>
>>>Hi,
>>>
>>>what I mean by "very strange things" is that there is a sort of 
> 
> saturation 
> 
>>>problem...
>>>
>>>Marc
>>>
>>> 
>>>
>>>
>>>>Can you gives us a better description of the
>>>>
>>>>          "very strange things"
>>>>
>>>>that you get ?
>>>>
>>>>----
>>>>
>>>>Just for a test, try reading the DICOM images
>>>>into an image with pixel type float. You can
>>>>try visualizing the image with the ImageViewer
>>>>application in InsightApplications.
>>>>
>>>>Have you verified the consistency of the DICOM
>>>>files ?
>>>>
>>>>You could do this by viewing the original DICOM
>>>>files with applications like:
>>>>
>>>>- MRIConvert
>>>>http://lcni.uoregon.edu/~jolinda/MRIConvert.html
>>>>
>>>>or
>>>>
>>>>- VolView
>>>>http://www.kitware.com/products/volview.html
>>>>
>>>>This will help to rule out the possibility of your
>>>>DICOM files being inconsistent.
>>>>
>>>>Please let us know what you find,
>>>>
>>>>  Thanks
>>>>
>>>>     Luis
>>>>
>>>>-----------------------
>>>>Marc HUERTAS wrote:
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I'm trying to convert some DICOM images into .vtk format, but I've 
>>>
>>>problems 
>>>
>>>
>>>>>with the sign...Indeed the DICOM images are 16 bit signed, so I read 
>>>
>>>them as 
>>>
>>>
>>>>>signed short, but I get very strange things...
>>>>>
>>>>>Does anyone have the same problem? What could I do?
>>>>>
>>>>>thanks,
>>>>>
>>>>>Marc 
>>>>>_______________________________________________
>>>>>Insight-users mailing list
>>>>>Insight-users at itk.org
>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>>
>>>
>>>
>>>
>>>
>>>Marc 
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
> 
> 
> 
> 
> Marc 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>