[vtkusers] bounds argument in vtkBox::IntersectWithLine()
Maarten Beek
beekmaarten at yahoo.com
Wed Mar 18 14:58:46 EDT 2015
Hi David,
To clarify.Since "the bounds of avolume start and end in the center of the corner voxels.", I would have to expand the bbox in all directions by 0.5*spacing to get the intersections with the 'outside' planes of the image? And the distance between one 'outside' and its opposite 'outside' would be 100 times the spacing?
Maarten
On Wednesday, March 18, 2015 9:42 AM, David Gobbi <david.gobbi at gmail.com> wrote:
Hi Maarten,
If you used (0, 13, ...) then you'd get the wrong answer. The bounds of avolume start and end in the center of the corner voxels. If the first voxelis 0 and the last voxel is 99, then the real-world dimension of the volume is99 times the spacing.
A voxel is a data point. Emphasis on "point". If you have a series of datapoints, anything before the first point or after the last point is outside of thebounds 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/b74a2476/attachment.html>
More information about the vtkusers
mailing list