[vtkusers] vtkImageReslice and slab mode

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Mon Jan 30 17:47:47 EST 2017

Thanks for the clarification, David.

I’ll clip the extents as you suggested.

On Mon, Jan 30, 2017 at 11:27 AM David Gobbi <david.gobbi at gmail.com> wrote:

> Hi Sankesh,
> When I wrote this filter, I decided not to reduce the extent.  Similarly,
> if someone uses vtkImageReslice to apply cubic interpolation (which has a
> kernel size of 4), I don't remove two slices from each of the 6 faces of
> the volume.
> Instead, for any kernel-based operation, if any of the kernel samples are
> outside of the input volume, then the default behavior is to clamp the
> coordinates of those samples to the bounds of the input (the same as what
> OpenGL does when you apply CLAMP_TO_EDGE with a texture lookup).  The
> vtkImageInterpolator also provides other methods for handling the boundary.
> So, in the case you describe, the slab at the boundary will contain
> repeats of the outer slice.  To avoid this, you'd have to explicitly set
> the OutputExtent yourself, or else override RequestInformation().  It used
> to be possible to wire such changes into the pipeline easily via the
> ExecuteInformationEvent.
> Really, a way to customize RequestInformation() is what is needed here...
> almost everyone seems to want something different, depending on their
> particular application, and the API for vtkImageReslice is already waaay to
> complicated.
>  - David
> On Mon, Jan 30, 2017 at 8:00 AM, Sankhesh Jhaveri <
> sankhesh.jhaveri at kitware.com> wrote:
> Hi David,
> I am looking at the vtkImageReslice class to reformat a vtkImageData,
> specifically at the slab operations to generate thick slices.
> When I set SlabNumberOfSlices to be greater than 1 and SlabSliceSpacingFraction
> = 1, I’d expect the output dimensions along the reslice direction to be
> less than the input dimensions. But, they come out to be the same. What am
> I missing here?
> Thank you!
> Sankhesh
>> --
> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
> <http://www.kitware.com/> | (518) 881-4417
> --
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170130/f49c2fcd/attachment.html>

More information about the vtkusers mailing list