[Insight-developers] world coordinates and slice images - nifti problem?

Luis Ibanez luis.ibanez at kitware.com
Fri Feb 27 07:28:35 EST 2009


Hi Richard,


I'm having trouble understanding your description of the problem.


You said:
 > My problem is that even though I declare the image as 3D, it only has
 > 1 slice, and the PhysicalPoints produced by the transformation all
 > have a z value of 0. If I concatenate two slices together the results
 > are as I expect. On the surface it looks like it might be a nifti
 > loading issue



Your message is not telling us what the actual image in disk is.

For example:

    a) Is the image on file a 3D image ?
    b) If so, does it really have more than 1 slice ?

or

    c) Are you tring to read a 2D nifti image file
       into an itk::Image< Pixel, 3 > type ?


If the situation is (c), then the behavior looks quite normal.

but

if the situation is that your have a 3D image with more than
one slice on file, and when you read it into an ITK 3D image,
you only get one slice, then that's clearly a bug.


Could you please clarify ?

and...

Please post to the list:

   A) The offending Nifti image, and
   B) The (minima) source code that illustrates the problem


Thanks,


     Luis


---------------------
Richard Beare wrote:
> Hi,
> I'm not sure if this counts as a bug, and I haven't tracked down the
> root of the issue yet, but thought I'd flag it immediately.
> 
> This relates to the same data as my past few posts - single slice MR
> time series which I'm trying to do preliminary visualization on.
> 
> One of my approaches uses the world coordinates as reported by the
> TransformIndexToPhysicalPoint method of OrientedImage.
> 
> My problem is that even though I declare the image as 3D, it only has
> 1 slice, and the PhysicalPoints produced by the transformation all
> have a z value of 0. If I concatenate two slices together the results
> are as I expect. On the surface it looks like it might be a nifti
> loading issue
> 
> The differences in image information are (interesting one last):
> 
> single slice
> 
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 1]
>   Spacing: [1.25, 1.25, 1]
>   Origin: [-160.625, -157.719, 0]
>   Direction:
> 1 0 0
> 0 1 0
> 0 0 1
> 
>   IndexToPointMatrix:
>   1.25 0 0
> 0 1.25 0
> 0 0 1
> 
>   PointToIndexMatrix:
>   0.8 0 0
> 0 0.8 0
> 0 0 1
> 
> slice pair
> 
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 2]
>   Spacing: [1.25, 1.25, 5]
>   Origin: [-160.625, -157.719, 9.70944]
>   Direction:
> 1 0 0
> 0 1 0
> 0 0 1
> 
>   IndexToPointMatrix:
>   1.25 0 0
> 0 1.25 0
> 0 0 5
> 
>   PointToIndexMatrix:
>   0.8 0 0
> 0 0.8 0
> 0 0 0.2
> 
> 
> Orthogonal slice
> ---------------------
> 
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [192, 256, 1]
>   Spacing: [1.25, 1.25, 1]
>   Origin: [-29.0319, -91.3025, 0]
>   Direction:
> 0.479759 0.985709 0
> 0.8774 -0.168457 0
> 0 0 1
> 
>   IndexToPointMatrix:
>   0.599698 1.23214 0
> 1.09675 -0.210571 0
> 0 0 1
> 
>   PointToIndexMatrix:
>   0.142507 0.833862 0
> 0.742239 -0.405853 0
> 0 0 1
> 
> Orthogonal slice pair
> --------------------------
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [192, 256, 2]
>   Spacing: [1.25, 1.25, 4]
>   Origin: [-29.0319, -91.3025, 135.198]
>   Direction:
> 0.47975 0.0179872 -0.877221
> 0.877385 -0.00307401 0.479777
> 0.00593328 -0.999833 -0.0172565
> 
>   IndexToPointMatrix:
>   0.599688 0.0224841 -3.50888
> 1.09673 -0.00384251 1.91911
> 0.0074166 -1.24979 -0.069026
> 
>   PointToIndexMatrix:
>   0.3838 0.701908 0.00474662
> 0.0143898 -0.00245921 -0.799867
> -0.219305 0.119944 -0.00431412
> _______________________________________________
> 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-developers
> 


More information about the Insight-developers mailing list