[vtkusers] speed on vtkImageReslice between rotateX & rotateY

Kevin Tiow Wee Tan twtan at cheerful.com
Tue Jun 17 06:04:39 EDT 2003


Hi all,
How are you?

Further to my mail send on 12th Jun, 2003 on rotate raw data in X and Y
direction, I foudn a way to do so quite easily and quickly...

The following is my way of coding for doing so:

vtkImageReader reader = new vtkImageReader();
reader.SetFileNme(filename);
reader.SetFileDimensionality(3);
reader.GetOutput().ReleaseDataFlagOn();

vtkImageChangeInformation changeInfo = new vtkImageChangeInformation();
changeInfo.SetInput(reader.GetOutput());
changeInfo.CenterImageOn();

vtkImageReslice reslice = new vtkImageReslice();
reslice.SetInput( reader.GetOutput());

vtkTransform transform = new vtkTransform();
transform.RotateX(-90.);	
//transform.RotateY(-90.);
reslice.SetResliceAxis(transform.GetMatrix());
reslice.Update();  
//quicker on file reading without the above line

vtkImageViewer viewer = new vtkImageViewer();
viewer.OffScreenRenderingOn();
viewer.SetInput(reslice.GetOutput());


My query is why is there a SPEED DIFFERENCE if I use RotateX and
RotateY? The process of RotateX seems to be quicker than RotateY. 
RotateY seems to take ages before the process is completed.

If I discard the line 
reslice.Update(); 
the slices reading process seems a lot quicker for both, but it take
about 2-4 seconds for each slice to display on RotateY, but only take
only take about 0.5 or less on RotateX

Is this normal on the speed difference between these two rotation
orientation?

Any advice would be greatly appreciated...

--
Thanks
Kevin
**********************************
Manchester Material Science Centre
University of Manchester
----------------------------------
Centre for Virtual Environments
University of Salford
**********************************



More information about the vtkusers mailing list