[vtkusers] Is it possible to extract a 3-dimensional yz slice using vtkimagereslice?

jflovell at engmail.uwaterloo.ca jflovell at engmail.uwaterloo.ca
Mon Sep 22 04:38:09 EDT 2003


Hi, 
Has anybody used vtkImageReslice to extract a 3D yz (or xy) plane slice of a 
volume? No matter what I put for the SetDirectionCosines or 
SetResliceTransform, I ALWAYS am getting data from the XY plane. Is there a way 
to get the proper plane?

//////////////////
//pseudocode
vtkImageData* data = Reader->GetData(); //standard 3D data
vtkImageReslice* yz = vtkImageReslice::New();

yz->SetInput(data);
yz->SetOutputSpacing(1,1,1);
yz->SetOutputOrigin(0,0,0);
yz->SetOutputExtent(0,0,0,Ydim,0,Zdim);

//so far so good?
yz->SetResliceAxesDirectionCosines(0,1,0,0,0,1,1,0,0);
yz->SetResliceAxesOrigin(/*anywhere in data*/ x, y ,z);
/////////////////

this gives a slice of the xy plane when I put it into a 
vtkdatasetmapper. I get similar results when I use vtkTranform and 
the setResliceTransform. I am always getting the xy plane even for the values 
of the xz plane as well.

Thanks a lot for any help,
Jon
 


----------------------------------------
This mail sent through www.mywaterloo.ca



More information about the vtkusers mailing list