[vtkusers] vtkImageData::FindCell
David Gobbi
david.gobbi at gmail.com
Wed Dec 1 13:01:46 EST 2010
On Tue, Nov 30, 2010 at 10:41 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> 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.
>
David, can you put this into the bug tracker? The entry doesn't have to say
much, it just has to say that vtkImageData::FindCell ignores the tolerance
and that, because of this, there is no way to ensure that FindCell will
return
a cell when given a point that lies on the boundary of the data set.
There is a good chance that I can do a fix for this in the coming weeks.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101201/da68fd86/attachment.htm>
More information about the vtkusers
mailing list