[vtkusers] Scalar value minima in PolyData

John Platt jcplatt at dsl.pipex.com
Tue Nov 27 04:23:33 EST 2007


Hi Dave,

Just a quick thought - could you remove your 3rd loop and in the 2nd
loop over the cells use the cell value of the point scalars
(vtkPointDataToCellData) for comparison?

John.

-----Original Message-----
From: vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org
[mailto:vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org] On Behalf Of
Kevin H. Hobbs
Sent: 26 November 2007 13:47
To: David.Pont at ensisjv.com
Cc: VTK Users
Subject: Re: [vtkusers] Scalar value minima in PolyData

On Thu, 2007-11-22 at 10:06 +1300, David.Pont at ensisjv.com wrote:
> "Kevin H. Hobbs" <hobbsk at ohiou.edu> wrote on 22/11/2007 02:40:31:
> 
> > Is there a better way to find all of the positions of the scalar
> value
> > minima in a PolyData than to :
> >    loop over all of the points
> >       loop over all of the cells the point is in
> >          loop over all of the other points in the cell
> >             compare the values of the other points to the first
> points value
> >       save the points location if it is value is less than all of 
> > its neighbor's values.
> > 
> > 
> vtkThresholdPoints can be used to extract all points with a scalar
> value <= a specified threshold, but if you are after local minima then
> you are on the right track.
>    DP

Thank you David.

Yes, I am after scalar value local minima. 

Though the code I posted works both the pseudo-code and code make it
obvious that looping like this is inelegant, confusing, and probably
inefficient.





More information about the vtkusers mailing list