[vtkusers] ImageReslice and Interpolation Can anyone help?

David Gobbi dgobbi at atamai.com
Thu Jun 14 17:03:45 EDT 2007


Hi Janny,

If you are trying to display a single 2D slice, then the axial view is 
the only view that will show an image.  The other views will just 
display a vanishingly thin line.

I have attached an image that goes a small ways towards explaining the 
reslice orientation matrices.  The first two columns of the matrix 
describe the orientation of the slice plane.  The third column must 
always be set to the cross product of the first two columns.  The fourth 
column is set to a point that you want the slice plane to pass through.

The matrix is the geometrical transformation from the reslice output 
image coordinate space to the input image coordinate space.  Describing 
the columns in terms of slice orientation and position are just a useful 
mathematical trick that can be used to fill in the matrix values.

 - David



Janny Dong wrote:
> Hi David,
>
> Yours is probably the quickest reply I've got so far through this 
> list. Thanks again! Now I know how vtkProbeFilter works. Looks like I 
> have to figure out a way to interpolate my data outside VTK. I am 
> considering getting all the data available and then use 
> vtkImageReslice, since it provides several choices of interpolation 
> method.
>
> Could you explain a little bit of the Matrices for axial, coronal, 
> sagittal, oblique view orientations part in your example code?
>
> //static double axialElements[16] = {
>   //         1, 0, 0, 0,
>   //         0, 1, 0, 0,
>   //         0, 0, 1, 0,
>   //         0, 0, 0, 1 };
>
>   //static double coronalElements[16] = {
>   //         1, 0, 0, 0,
>   //         0, 0, 1, 0,
>
>   //         0,-1, 0, 0,
>   //         0, 0, 0, 1 };
>
>   static double sagittalElements[16] = {
>            0, 0,-1, 0,
>            1, 0, 0, 0,
>            0,-1, 0, 0,
>            0, 0, 0, 1 };
>
>   //static double obliqueElements[16] = {
>
>   //         1, 0, 0, 0,
>   //         0, 0.866025, -0.5, 0,
>   //         0, 0.5, 0.866025, 0,
>   //         0, 0, 0, 1 };
>   
>
> I don't quite understand the four different view orientations. Last 
> time I tried axial view and got the first image in my email. I got a 
> blank scene with other view orientations.
>
> Thanks,
> Janny
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: orientation.gif
Type: image/gif
Size: 15343 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070614/148c1f08/attachment.gif>


More information about the vtkusers mailing list