[vtkusers] Bounds computation of vtkImageData
elvis.stansvik at orexplore.com
Wed Feb 1 02:39:04 EST 2017
Den 31 jan. 2017 3:13 em skrev "David Gobbi" <david.gobbi at gmail.com>:
> If you use vtkCellPicker, then positions beyond the bounds will not be
picked. If you use vtkPropPicker, the pick will be based on what is drawn
on the screen, and by default the vtkImageActor and vtkImageSliceMapper
only draw the image out to its bounds (but this can be changed by setting
the "Border" property of the mapper, which causes the border region to be
I got curious here. What is the story for vtkGPUVolumeRayCastMapper? Will
it also draw the volume only out to its bounds (center of peripheral
voxels)? I couldn't find a similar border property on it.
> - David
> On Tue, Jan 31, 2017 at 6:38 AM, Timothee Evain <
tevain at telecom-paristech.fr> wrote:
>> Oh right, thanks for remembering me that!
>> Does that mean that, if image is displayed, a pick on border of data
could return an out-of-bound position value ?
>> ----- Mail original -----
>> De: "David Gobbi" <david.gobbi at gmail.com>
>> À: "Timothee Evain" <tevain at telecom-paristech.fr>
>> Cc: "VTK Users" <vtkusers at vtk.org>
>> Envoyé: Mardi 31 Janvier 2017 14:16:57
>> Objet: Re: [vtkusers] Bounds computation of vtkImageData
>> Hi Tim,
>> The bounds go from the center of the first voxel to the center of the
>> voxel. So the code in vtkImageData.cxx is correct.
>> - David
>> On Tue, Jan 31, 2017 at 4:14 AM, Timothee Evain <
tevain at telecom-paristech.fr
>> > wrote:
>> > Hello everyone,
>> > It may be more a dev issue, but I think there is a small mistake in the
>> > ComputeBounds() method of vtkImageData
>> > When computing upper bounds, code read (line 781 of vtkImageData.cxx):
>> > this->Bounds = origin + (extent[1-swapXBounds] * spacing);
>> > this->Bounds = origin + (extent[3-swapYBounds] * spacing);
>> > this->Bounds = origin + (extent[5-swapZBounds] * spacing);
>> > Since the upper extent is meant to be the index of the last inside
>> > this leads to upper bounds excluding the upper fringe of data in each
>> > direction.
>> > So I guess this part should read something like:
>> > this->Bounds = origin + ( (extent[1-swapXBounds] + 1) *
>> > this->Bounds = origin + ( (extent[3-swapYBounds] + 1) *
>> > this->Bounds = origin + ( (extent[5-swapZBounds] + 1) *
>> > Am I mistaken ?
>> > Tim
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers