[vtkusers] orthogonal slices through a volume (and now non-orthogonal too).
Mark Gooding
mark.gooding at gmail.com
Wed Aug 23 06:31:35 EDT 2006
Hi all,
In response to my question about displaying non-orthogonal planes,
David kindly pointed me to this thread, which appears to be the best
simple example of how to use vtkImageReslice in the archives so far.
However I still a problem.
To put things in context, I have been using the following pipeline to
display orthogonal planes: ( I am trying to use vtkImageReslice to
display non-orthogonal planes.)
vtkStructuredPoints
vtkImageMapToColors
vtkImageActor
and using the actor's SetDisplayExtend to specify which plane to show.
When using vtkImageReslice....to get planes through the centre of my
volume I use:
double origin[3];
double spacing[3];
imageDataStructuredPoints->GetOrigin(origin);
imageDataStructuredPoints->GetSpacing(spacing);
testReslice->SetResliceAxesOrigin((origin[0]+spacing[0]*(volumeSizeInVoxelsX/2)),(origin[1]+spacing[1]*(volumeSizeInVoxelsY/2)),(origin[2]+spacing[2]*(volumeSizeInVoxelsZ/2)));
When displayed in 3D, the image appears offset by half the volume (
see http://www.robots.ox.ac.uk/~gooding/vtkbizarre.html ), and I get
the error message:
ERROR: In \vtk\source\Filtering\vtkStreamingDemandDrivenPipeline.cxx, line 628
vtkStreamingDemandDrivenPipeline (026B50E8): The update extent
specified in the information for output port 0 on algorithm
vtkImageReslice(026B4028) is 182 182 0 359 0 177, which is outside the
whole extent 0 363 0 359 0 0.
Any suggestions as to what is going wrong?
Cheers,
mark
More information about the vtkusers
mailing list