[vtkusers] Once again: vtkImageReslice

Jens Kowal jk at memot.unibe.ch
Mon Jan 28 08:38:41 EST 2002


Hi vtk users,

I'm using vtk since a while but I'm not able to solve 
a problem which came up using vtkImageReslice. I've 
read all the mails in the archive regarding vtkImageReslice
but i could not find any hint targeting my problem.


I have a slice stack (vtkImageData) oriented as it is shown below:

         5   ------------------------ 6
            /                        /|
           /                        / |
          /                Z       /  |
         /                /       /   |
        /                /       /    |
       /                /       /     |
    1  --------------------------  2  |
      |               /----> X  |     |
      |               |         |     |
      |               |         |     |
      |               |         |     |
      |               |         |     / 7
      |               v Y       |    /
      |                         |   /
      |                         |  /
      |                         | /
      |                         |/
       --------------------------
     0                            3

-the slice stack origin is the most negative point(1);
-the center of the geometrical center of the volume 
 is exact the origin of the coordinate system. 
-then I use a vtkImageReslice to reslice my Volume 
 first as a test with the same orientation/position
 as the original vtkImageData slice stack everything 
 works fine: I can retrieve the first image (most close 
 to the slice stack origin) using 
 myReslicer->GetScalarPointer(0,0,0); and I get the first image
 out of the stack;

-then apply a rotation to the reslicer using 
myReslicer->SetResliceAxes(m)
 m=(1,0,0,0
    0,0,1,0
    0,-1,0,0
    0,0,0,1)
 m is a simple rotation(-90Grad) around the x-axis

-set again the Slice Stack Origin to the most negative point(5 in this
case)
 (I assume that the rotation center and the rotation axes are defined in
the 
  original coordinate system, and the slice stack origin is defined in
the 
  the rotated coordinate system) (The Point numbering is not changed in
that 
  example after the rotation)


         5   ------------------------ 6
            /                        /|
           /                        / |
          /                        /  |
         /                        /   |
        /                        /    |
       /                        /     |
    1  --------------------------  2  |
      |               /----> X  |     |
      |              /|         |     |
      |             / |         |     |
      |            /  |         |     |
      |           /   |         |     / 7
      |          Y    v Z       |    /
      |                         |   /
      |                         |  /
      |                         | /
      |                         |/
       --------------------------
     0                            3

-if I then try to retrieve the "first" image in the stack (the image
 most close to the slice stack origin) using
myReslicer->GetScalarPointer(0,0,0)
 and I do NOT get the first image(the image close to the points 1,5,6,2)
out of the stack;
 I get the image on the bottom (points 0,4,7,3). Is this ok - Should I
get the top plane 
 by using the index (0,0,0).
 (The slice stack extension and the spacing is set properly)


 What am I doing wrong?? Any help would be appreciate.

					/jk




------------------------------------------------------------------------
Jens Kowal                      Tel : +41 31 632 49 50
                                
University of Bern             mail : jk at memot.unibe.ch
M. E. Mueller Institute                
Orthopaedic Biomechanics

P. O. Box 30, Murtenstrasse 35, 3010 Bern, Switzerland 
------------------------------------------------------------------------



More information about the vtkusers mailing list