[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    Re: [vtkusers] vtkImageData::FindCell
From:       David Gobbi <david.gobbi () gmail ! com>
Date:       2010-11-30 17:41:23
Message-ID: AANLkTikzOmPRLXKh_dxoPmFJWx=c3PnA4nyvgj+6uMf3 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Tue, Nov 30, 2010 at 9:25 AM, David Doria <daviddoria@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

[Attachment #5 (text/html)]

On Tue, Nov 30, 2010 at 9:25 AM, David Doria <span dir="ltr">&lt;<a \
href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;</span> wrote:<div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">
<br>
</div>So it considers a point on the boundary to be &quot;outside&quot; no matter \
the<br> tolerance? Doesn&#39;t that seem silly? Often you may know the \
coordinates<br> of the grid points and want to get the cell id they are \
associated<br> with. This method should work for all such points, but it seems to<br>
work only on points that aren&#39;t on the boundary faces of the<br>
structured grid?<br></blockquote><div><br></div><div>Hmm... I looked at the FindCell \
implementation in vtkImageData, and it ignores</div><div>the tolerance completely.  \
This is not good.  As you said, boundary points</div>

<div>should be considered to be inside the cell unless the tolerance is strictly \
set</div><div>to zero (and even then, it should be an even 50/50 chance that the \
boundary</div><div>points are considered to be inside).</div>

<div><br></div><div>In fact this is precisely the sort of boundary issue that \
tolerances are for:</div><div>to ensure that points on the boundary are not \
mistakenly marked as &quot;outside&quot;</div><div>due to roundoff error.</div>

<div><br></div><div>I&#39;m not saying that it huge tolerances are reasonable (they \
aren&#39;t, tolerances</div><div>should be small by definition) but tolerances should \
not be ignored completely...</div><div><br></div><div>

  David</div></div>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic