<div dir="ltr"><div>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 drawn).</div><div><br></div><div> - David</div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 31, 2017 at 6:38 AM, Timothee Evain <span dir="ltr"><<a href="mailto:tevain@telecom-paristech.fr" target="_blank">tevain@telecom-paristech.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh right, thanks for remembering me that!<br>
Does that mean that, if image is displayed, a pick on border of data could return an out-of-bound position value ?<br>
<br>
Tim<br>
<br>
----- Mail original -----<br>
De: "David Gobbi" <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
À: "Timothee Evain" <<a href="mailto:tevain@telecom-paristech.fr">tevain@telecom-paristech.fr</a>><br>
Cc: "VTK Users" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Envoyé: Mardi 31 Janvier 2017 14:16:57<br>
Objet: Re: [vtkusers] Bounds computation of vtkImageData<br>
<div class="HOEnZb"><div class="h5"><br>
Hi Tim,<br>
<br>
The bounds go from the center of the first voxel to the center of the last<br>
voxel.  So the code in vtkImageData.cxx is correct.<br>
<br>
 - David<br>
<br>
On Tue, Jan 31, 2017 at 4:14 AM, Timothee Evain <<a href="mailto:tevain@telecom-paristech.fr">tevain@telecom-paristech.fr</a><br>
> wrote:<br>
<br>
> Hello everyone,<br>
><br>
> It may be more a dev issue, but I think there is a small mistake in the<br>
> ComputeBounds() method of vtkImageData<br>
> When computing upper bounds, code read (line 781 of vtkImageData.cxx):<br>
><br>
> this->Bounds[1] = origin[0] + (extent[1-swapXBounds] * spacing[0]);<br>
> this->Bounds[3] = origin[1] + (extent[3-swapYBounds] * spacing[1]);<br>
> this->Bounds[5] = origin[2] + (extent[5-swapZBounds] * spacing[2]);<br>
><br>
> Since the upper extent is meant to be the index of the last inside point,<br>
> this leads to upper bounds excluding the upper fringe of data in each<br>
> direction.<br>
> So I guess this part should read something like:<br>
><br>
> this->Bounds[1] = origin[0] + ( (extent[1-swapXBounds] + 1) * spacing[0]);<br>
> this->Bounds[3] = origin[1] + ( (extent[3-swapYBounds] + 1) * spacing[1]);<br>
> this->Bounds[5] = origin[2] + ( (extent[5-swapZBounds] + 1) * spacing[2]);<br>
><br>
> Am I mistaken ?<br>
><br>
> Tim<br>
><br>
</div></div></blockquote></div><br></div></div>