[vtkusers] bounds argument in vtkBox::IntersectWithLine()

David Gobbi david.gobbi at gmail.com
Wed Mar 18 09:41:49 EDT 2015


Hi Maarten,

If you used (0, 13, ...) then you'd get the wrong answer.  The bounds of a
volume start and end in the center of the corner voxels.  If the first voxel
is 0 and the last voxel is 99, then the real-world dimension of the volume
is
99 times the spacing.

A voxel is a data point.  Emphasis on "point".  If you have a series of data
points, anything before the first point or after the last point is outside
of the
bounds of the data points.

 - David


On Wed, Mar 18, 2015 at 7:23 AM, Maarten Beek via vtkusers <vtkusers at vtk.org
> wrote:

> Hi all,
>
> For an image with dims = (100, 100, 100) and spacing = (0.13, 0.13, 0.13),
> vtkImageData::GetBounds() returns
> (0, 12.87, 0, 12.87, 0, 12.87)
>
> If I use these bounds as argument in vtkBox::IntersectWithLine, do I get
> the correct intersections?
> Or should I use (0, 13, 0, 13, 0, 13) for the bounds?
>
> Thanks - Maarten
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150318/440983a6/attachment.html>


More information about the vtkusers mailing list