[Insight-users] Transforming image to world coordinates with negative z axis

Luis Ibanez luis.ibanez at kitware.com
Thu Mar 12 10:43:06 EDT 2009


Hi John,

You are right, this looks strange.


Please do the following:

Just after you load your DICOM image into an ITK image,
call the Print() method in the resulting image, and post
the outcome to the mailing list.

Your code should look something like

   imageSeriesReader->Update();

   imageSeriesReader->GetOutput()->Print( std::cout );


The output of the Print() method will help us to locate
the source of the problem.


----


BTW: Why do you say that the direction cosines

 > 1 0 0
 > 0 1 0
 > 0 0 1

look wrong to you ?

Given that the direction cosines in the DICOM header
are

 > 1.000000\0.000000\0.000000\0.000000\1.000000\0.000000

It seems normal to have the Direction matrix to be an
identity matrix.




     Thanks


        Luis


--------------------
John Drescher wrote:
> I am loading a dicom CT series in image # order
> 
> The first slice is:
> 0020|0032 Image Position (Patient) = -164.300\-169.500\-24.750
> 0020|0037 Image Orientation (Patient) =
> 1.000000\0.000000\0.000000\0.000000\1.000000\0.000000
> 
> And the last slice is:
> 0020|0032 Image Position (Patient) = -164.300\-169.500\-359.750
> 0020|0037 Image Orientation (Patient) =
> 1.000000\0.000000\0.000000\0.000000\1.000000\0.000000
> 
> The problem I am having is that TransformIndexToPhysicalPoint is
> returning Z values that are positive which is impossible because the z
> range is from -24.750 to -359.750. I thought it was the same problem
> as
> 
> http://www.nabble.com/itk::Image-vs.-itk::OrientedImage-td19899159.html
> 
> but my direction vector (examined while debugging) looks wrong to me:
> 1 0 0
> 0 1 0
> 0 0 1
> 
> Any ideas how to fix this so that I get the correct world coordinates?
> Or am I misunderstanding something? I am quite new at itk and vtk.
> 
> I am using itk version is 3.10.2, and vtk-5.2.1.
> 
> Thanks,
> John M. Drescher
> _____________________________________
> 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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list