[Insight-users] guest image pixel type

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Nov 25 11:24:32 EST 2009


[opening a different parenthesis]
VTK/ITK does not support reporting whether or not the loaded image was
lossy or lossless.
[close]

So everything that should be at vtkImageData level can be accessed at
vtkGDCMImageReader level.

Method 1.
Ref:
virtual vtkMatrix4x4* vtkGDCMImageReader::GetDirectionCosines  	(  	 	
)   	 [virtual]
http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html#ae6640b34e077906f6072779537c72b13

Method 2.
If you use a CVS VTK, vtkMedicalImageProperties now stored the Image
Orientation (Patient):
http://www.vtk.org/doc/nightly/html/classvtkMedicalImageProperties.html#ab479c4722a823c300598b9b31249af4e

In any way this is always very ugly to use from VTK. One guy manage to
gets things working though (C.P. Botha):

grep for GetDirectionCosines:
http://devide.googlecode.com/svn-history/r3097/trunk/devide/modules/viewers/DICOMBrowser.py

Cheers
-- 
Mathieu



On Wed, Nov 25, 2009 at 5:02 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Mathieu,
>
> Does the vtk reader take into account the image orientation? I didn't
> think the vtk supported orientation, but I've been away from it for
> years.
>
> Bill
>
> On Wed, Nov 25, 2009 at 8:50 AM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
>> José
>>
>> On Wed, Nov 25, 2009 at 2:38 PM, Lic. José M. Rodriguez Bacallao
>> <jmrbcu at gmail.com> wrote:
>>> but, if I don't know in advance what kind of image (CT, MR, PET, etc)
>>> I will load, the only thing I know is that the image is a dicom image,
>>> what is the simplest way to know the right pixel type
>>
>> Do you remember that we have been exchanging about that all night ? In
>> the end you agreed to use vtkGDCMImageReader, since the code is not
>> templated. thus the proper pixel type is detected at run time, and is
>> *very* user oriented.
>>
>> that was yesterday night...
>>
>> --
>> Mathieu
>>
>


More information about the Insight-users mailing list