[vtkusers] imageSliceMapper->GetSliceNumber() problem

David Gobbi david.gobbi at gmail.com
Wed Aug 15 11:48:03 EDT 2012


Hi Concetta,

The superclass of vtkImageResliceMapper is vtkImageMapper3D, the
SliceMapper has a GetSliceNumber method but the ResliceMapper does
not.

The only way to get the slice from ResliceMapper is with the
GetSlicePlane() method.  This returns a vtkPlane object that describes
the slice plane.  If you need a slice number, then you will have to
compute it from the position of the SlicePlane.

It makes no difference if you are using VTK 5.10 or VTK 6.0, the
vtkImageResliceMapper class is identical in both.

 - David

On Wed, Aug 15, 2012 at 9:32 AM, Concetta Piazzese
<aliens30586 at hotmail.it> wrote:
>
> Hi everyone.
> I'm tring to use imageSliceMapper. The code works but the only problem is
> that I can't get the slice number using imageSliceMapper->GetSliceNumber();
> I got the following error:
> 'GetSliceNumber' : is not a member of 'vtkImageResliceMapper'.
> What's the problem? If I go to vtkImageSliceMapper Class Reference page
> there is a GetSliceNumber function.
> Can somebody explain that?
> Thank you!



More information about the vtkusers mailing list