[vtkusers] vtkImageData::FindCell
David Gobbi
david.gobbi at gmail.com
Tue Nov 30 12:41:23 EST 2010
On Tue, Nov 30, 2010 at 9:25 AM, David Doria <daviddoria at gmail.com> wrote:
>
> So it considers a point on the boundary to be "outside" no matter the
> tolerance? Doesn't that seem silly? Often you may know the coordinates
> of the grid points and want to get the cell id they are associated
> with. This method should work for all such points, but it seems to
> work only on points that aren't on the boundary faces of the
> structured grid?
>
Hmm... I looked at the FindCell implementation in vtkImageData, and it
ignores
the tolerance completely. This is not good. As you said, boundary points
should be considered to be inside the cell unless the tolerance is strictly
set
to zero (and even then, it should be an even 50/50 chance that the boundary
points are considered to be inside).
In fact this is precisely the sort of boundary issue that tolerances are
for:
to ensure that points on the boundary are not mistakenly marked as "outside"
due to roundoff error.
I'm not saying that it huge tolerances are reasonable (they aren't,
tolerances
should be small by definition) but tolerances should not be ignored
completely...
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101130/22a944b1/attachment.htm>
More information about the vtkusers
mailing list