[Dcmlib] image's data is flipped by using vtkGDCMReader.
Mathieu Malaterre
mathieu.malaterre at kitware.com
Tue May 17 15:09:03 CEST 2005
Dennis,
Ok I think I see what is going on. VTK define an image only in terms of
spacing/origing and dimensions. There is no notion of Orientation.
Whereas DICOM specifically defines it. ITK has a much better approach
since it allows reading in the DICOM orientation and passing it right
away to ITK.
The only solution I can think of right now is to use the DICOM
information later on in your pipeline. I'll assume you are familiar with
VTK, therfore you should be able to do something like:
float orient[6];
gdcmFile *f ...
f->GetImageOrientationPatient( orient );
vtkImageActor *imageActor = ...
imageActor->SetInput( reader->GetOutput());
imageActor->SetOrientation ( orient );
HTH
Mathieu
Dennis wrote:
> Hi,
>
> I have found the image's data is flipped along x-axis after i use
> vtkGDCMReader to read a series of Dicom files.
> Can any one verify GDCM gets the correct orientation (such as RAI, or
> LAS...)?
> When I do some 3D volume rendering, i found it. I do not like to flip it
> back to get the correct result, that's dangenrous for huge data.
>
> any hints will be helpful!
>
>
>
> Dennis
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
More information about the Dcmlib
mailing list