[vtkusers] vtkSmartVolumeMapper ignoring clipping

David Gobbi david.gobbi at gmail.com
Fri Apr 11 08:49:26 EDT 2014


Hi Richard,

The vtkImageClip filter performs what I consider to be an undesirable
optimization, by default it simply modifies the WholeExtent in the
image information instead of actually clipping the data.  See the
doxygen page on this filter for more info.

The volume mappers generally ignore the WholeExtent, instead what
they do is ask the pipeline to update the whole image, and then they
render whatever data is present.  Since vtkImageClip only modifies the
WholeExtent info, without physically clipping the Extent, the effects
of vtkImageClip are ignored.

I do not consider this to be a bug in the volume mappers.  I consider
it to be an unwise optimization in vtkImageClip that does something
that is unexpected not only to users, but also to downstream filters
and mappers.

  David

On Fri, Apr 11, 2014 at 4:28 AM, Richard Whitehead
<richard.whitehead at vivosight.com> wrote:
>
> This looks like a bug in VTK?
>
> I'm visualising a memory volume (vtkImageData) which is then connected to a
> vtkImageClip so that only the valid parts of the volume are rendered.
>
> Connecting that clipper into a vtkImageViewer2 to view slices works fine;
> the invalid part of a slice is clipped off.
>
> But connecting that same clipper into a vtkSmartVolumeMapper, which is set
> as the mapper of a vtkVolume, the display always shows the whole extent of
> my memory volume, ignoring the clipping.
> I have set CroppingOn on the mapper, no effect.
>
> If I set the mapper's clipping region with SetCroppingRegionPlanes then it
> clips as expected, but I would have expected the mapper to take notice of
> the "whole region" given by the clipper without me having to pass the clip
> information around my program myself.
>
> Please can someone tell me if this is wrong, or if not for now perhaps a
> cheat so I can get the clipping region from the clipper and set it on the
> mapper.
>
> Many thanks,
>
> Richard


More information about the vtkusers mailing list