<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi,</DIV>
<DIV>I have always bugs. But, i will explain my problem another way:</DIV>
<DIV>i have a polydata object, i want to do this for each point of this polydata structure:</DIV>
<DIV>compute the maximum curvature</DIV>
<DIV>if this value is &gt; 0.5, display this point</DIV>
<DIV>else hide it</DIV>
<DIV>&nbsp;</DIV>
<DIV>As output, i want to have not the whole structure but just the points which satisfy the condition above</DIV>
<DIV><BR><BR>--- En date de&nbsp;: <B>Lun 20.10.08, Amy Squillacote <I>&lt;ahs@cfdrc.com&gt;</I></B> a écrit&nbsp;:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">De: Amy Squillacote &lt;ahs@cfdrc.com&gt;<BR>Objet: Re: [vtkusers] How to use 'vtkCurvatures' class?<BR>À: butterfly.1688@yahoo.fr<BR>Cc: vtkusers@vtk.org<BR>Date: Lundi 20 Octobre 2008, 18h14<BR><BR><PRE>vtkUnstructuredGridToPolyDataFilter is an abstract class; you can't 
instantiate it. Instead, do one of the two things I described in my 
previous email after the vtkThresholdFilter.

1) vtkGeometryFilter *geom = vtkGeometryFilter::New();
    geom-&gt;SetInput(thresh-&gt;GetOutput());

    maxMapper-&gt;SetInput(geom-&gt;GetOutput());

2) Replace vtkPolyDataMapper with vtkDataSetMapper, as shown below.
    vtkDataSetMapper *mapper = vtkDataSetMapper::New();
    mapper-&gt;SetInput(thresh-&gt;GetOutput());

    actor-&gt;SetMapper(mapper);


- Amy

B. C. wrote:
&gt; Hi,
&gt; I used this:
&gt;  
&gt; vtkCurvatures *curve = vtkCurvatures::New();
&gt; curve-&gt;SetInput(cleaner-&gt;GetOutput());
&gt; curve-&gt;SetCurvatureTypeToMaximum();
&gt; curve-&gt;Update();
&gt;  
&gt; vtkThreshold *thresh = vtkThreshold::New();
&gt; thresh-&gt;SetInput(curve-&gt;GetOutput());
&gt; thresh-&gt;ThresholdByUpper(0.5);
&gt;  
&gt; vtkUnstructuredGridToPolyDataFilter *filtre;
&gt; filtre-&gt;SetInput(thresh-&gt;GetOutput());
&gt;   
&gt; vtkPolyDataMapper *maxMapper = vtkPolyDataMapper::New();
&gt; maxMapper-&gt;SetInput(filtre-&gt;GetOutput());
&gt;  
&gt; but, that does not work. The bug generated is in this line:
&gt; filtre-&gt;SetInput(thresh-&gt;GetOutput());
&gt;  
&gt; I don't know how to do!!!!
&gt;  
&gt;
&gt; --- En date de : *Lun 20.10.08, Amy Squillacote /&lt;ahs@cfdrc.com&gt;/* a

&gt; écrit :
&gt;
&gt;     De: Amy Squillacote &lt;ahs@cfdrc.com&gt;
&gt;     Objet: Re: [vtkusers] How to use 'vtkCurvatures' class?
&gt;     À: butterfly.1688@yahoo.fr
&gt;     Cc: vtkusers@vtk.org
&gt;     Date: Lundi 20 Octobre 2008, 13h03
&gt;
&gt;     Add a vtkGeometryFilter between vtkThreshold and vtkPolyDataMapper OR 
&gt;     use a vtkDataSetMapper instead of the vtkPolyDataMapper (in which case

&gt;     vtkGeometryFilter is unneeded).
&gt;
&gt;     - Amy
&gt;
&gt;     B. C. wrote:
&gt;     &gt; Hi Amy,
&gt;     &gt; when i do what you told me, i have this error:
&gt;     &gt; error C2664: 'SetInput' : cannot convert parameter 1 from
&gt;     'class 
&gt;     &gt; vtkUnstructuredGrid *' to 'class vtkPolyData'
&gt;     &gt; for the code line
&gt;     'maxMapper-&gt;SetInput(thresh-&gt;GetOutput());'
&gt;     &gt; It should be something else to add before this. Can you help me?
&gt;     &gt;
&gt;     &gt;
&gt;     &gt; --- En date de : *Ven 17.10.08, Amy Squillacote
/&lt;ahs@cfdrc.com&gt;/* a
&gt;
&gt;     &gt; écrit :
&gt;     &gt;
&gt;     &gt;     De: Amy Squillacote &lt;ahs@cfdrc.com&gt;
&gt;     &gt;     Objet: Re: [vtkusers] How to use 'vtkCurvatures'
class?
&gt;     &gt;     À: butterfly.1688@yahoo.fr
&gt;     &gt;     Cc: vtkusers@vtk.org
&gt;     &gt;     Date: Vendredi 17 Octobre 2008, 20h12
&gt;     &gt;
&gt;     &gt;     Put the vtkThreshold code after you set up vtkCurvatures
(just below 
&gt;     &gt;     your call to curve-&gt;Update()). Then change the input to
maxMapper
&gt;     from 
&gt;     &gt;     "curve-&gt;GetOutput()" to
&gt;     "thresh-&gt;GetOutput()".
&gt;     &gt;
&gt;     &gt;     - Amy
&gt;     &gt;
&gt;     &gt;     B. C. wrote:
&gt;     &gt;     &gt; Thank you Amy.
&gt;     &gt;     &gt; I post you the code i used:
&gt;     &gt;     &gt;  
&gt;     &gt;     &gt; vtkCurvatures *curve = vtkCurvatures::New();
&gt;     &gt;     &gt; curve-&gt;SetInput(cleaner-&gt;GetOutput());
&gt;     &gt;     &gt; curve-&gt;SetCurvatureTypeToMaximum();
&gt;     &gt;     &gt; curve-&gt;Update();
&gt;     &gt;     &gt;  
&gt;     &gt;     &gt; vtkPolyDataMapper *maxMapper = vtkPolyDataMapper::New();
&gt;     &gt;     &gt; maxMapper-&gt;SetInput(curve-&gt;GetOutput());
&gt;     &gt;     &gt;  
&gt;     &gt;     &gt; vtkActor *maxCurve = vtkActor::New();
&gt;     &gt;     &gt; maxCurve-&gt;SetMapper(maxMapper);
&gt;     &gt;     &gt; maxCurve-&gt;SetPosition(0.0,0.0,0.0);
&gt;     &gt;     &gt; myRender-&gt;AddActor(maxCurve);
&gt;     &gt;     &gt; myRenderWindow-&gt;Render();
&gt;     &gt;     &gt;  
&gt;     &gt;     &gt; Please, tell me where to add the code you sent to me to
display
&gt;     the 
&gt;     &gt;     &gt; maximum curvatures&gt;0.5
&gt;     &gt;     &gt;  
&gt;     &gt;     &gt; Thank you for your help!!!
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;
&gt;     &gt;     &gt; --- En date de : *Ven 17.10.08, Amy Squillacote
&gt;     /&lt;ahs@cfdrc.com&gt;/* a
&gt;     &gt;
&gt;     &gt;     &gt; écrit :
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     De: Amy Squillacote &lt;ahs@cfdrc.com&gt;
&gt;     &gt;     &gt;     Objet: Re: [vtkusers] How to use
'vtkCurvatures'
&gt;     class?
&gt;     &gt;     &gt;     À: butterfly.1688@yahoo.fr
&gt;     &gt;     &gt;     Cc: vtkusers@vtk.org
&gt;     &gt;     &gt;     Date: Vendredi 17 Octobre 2008, 19h41
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     You'll want to use vtkCurvatures with curvature
type set
&gt;     to
&gt;     &gt;     maximum. 
&gt;     &gt;     &gt;     Then pass the output of that filter to a
vtkThreshold, using
&gt;     the 
&gt;     &gt;     &gt;     ThresholdByUpper method to indicate the values to
keep.
&gt;     Example c++
&gt;     &gt;     code 
&gt;     &gt;     &gt;     is shown below.
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     vtkCurvatures *curv = vtkCurvatures::New();
&gt;     &gt;     &gt;     curv-&gt;SetCurvatureTypeToMaximum();
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     vtkThreshold *thresh = vtkThreshold::New();
&gt;     &gt;     &gt;    
thresh-&gt;SetInputConnection(curv-&gt;GetOutputPort());
&gt;     &gt;     &gt;     thresh-&gt;ThresholdByUpper(0.5); // using the
example value
&gt;     you
&gt;     &gt;     provided.
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     Online documentation for vtkCurvatures is here: 
&gt;     &gt;     &gt;    
http://www.vtk.org/doc/nightly/html/classvtkCurvatures.html.
&gt;     &gt;     &gt;     Online documentation for vtkThreshold is here: 
&gt;     &gt;     &gt;    
http://www.vtk.org/doc/nightly/html/classvtkThreshold.html.
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     - Amy
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     B. C. wrote:
&gt;     &gt;     &gt;     &gt; Please, i need your help to finish my work!!!
&gt;     &gt;     &gt;     &gt; I use 'vtkCurvatures' to compute
curvatures at
&gt;     each point
&gt;     &gt;     of my 
&gt;     &gt;     &gt;     &gt; polydata structure.
&gt;     &gt;     &gt;     &gt; I want to save only the Maximum curvatures and
display
&gt;     only those
&gt;     &gt;
&gt;     &gt;     &gt;     &gt; which are &gt; some_value (0.5 for example)..
&gt;     &gt;     &gt;     &gt; Can someone tell me how to do this?
&gt;     &gt;     &gt;     &gt; Please heeeeeeeeelp!!!
&gt;     &gt;     &gt;     &gt;
&gt;     &gt;     &gt;     &gt;
&gt;     &gt;     &gt;     &gt;
__________________________________________________
&gt;     &gt;     &gt;     &gt; Do You Yahoo!?
&gt;     &gt;     &gt;     &gt; En finir avec le spam? Yahoo! Mail vous offre
la
&gt;     meilleure
&gt;     &gt;     protection 
&gt;     &gt;     &gt;     &gt; possible contre les messages non sollicités
&gt;     &gt;     &gt;     &gt; http://mail..yahoo.fr Yahoo! Mail
&gt;     &gt;     &gt;     &gt;
&gt;     &gt;    
&gt;    
------------------------------------------------------------------------
&gt;     &gt;     &gt;     &gt;
&gt;     &gt;     &gt;     &gt; _______________________________________________
&gt;     &gt;     &gt;     &gt; This is the private VTK discussion list.
&gt;     &gt;     &gt;     &gt; Please keep messages on-topic. Check the FAQ
at:
&gt;     &gt;     &gt;     http://www.vtk.org/Wiki/VTK_FAQ
&gt;     &gt;     &gt;     &gt; Follow this link to subscribe/unsubscribe:
&gt;     &gt;     &gt;     &gt; http://www.vtk.org/mailman/listinfo/vtkusers
&gt;     &gt;     &gt;     &gt;   
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;     -- 
&gt;     &gt;     &gt;     Amy Squillacote                    Phone: (256)
726-4839
&gt;     &gt;     &gt;     Computer Scientist                 Fax: (256)
726-4806
&gt;     &gt;     &gt;     CFD Research Corporation           Web:
http://www.cfdrc.com
&gt;     &gt;     &gt;     215 Wynn Drive, Suite 501
&gt;     &gt;     &gt;     Huntsville, AL  35805
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;               
&gt;     &gt;     &gt;
&gt;     &gt;     &gt;
&gt;     &gt;     &gt; __________________________________________________
&gt;     &gt;     &gt; Do You Yahoo!?
&gt;     &gt;     &gt; En finir avec le spam? Yahoo! Mail vous offre la
meilleure
&gt;     protection 
&gt;     &gt;     &gt; possible contre les messages non sollicités
&gt;     &gt;     &gt; http://mail.yahoo.fr Yahoo! Mail 
&gt;     &gt;
&gt;     &gt;     -- 
&gt;     &gt;     Amy Squillacote                    Phone: (256) 726-4839
&gt;     &gt;     Computer Scientist                 Fax: (256) 726-4806
&gt;     &gt;     CFD Research Corporation           Web: http://www.cfdrc.com
&gt;     &gt;     215 Wynn Drive, Suite 501
&gt;     &gt;     Huntsville, AL  35805
&gt;     &gt;
&gt;     &gt;
&gt;     &gt;               
&gt;     &gt;
&gt;     &gt;
&gt;     &gt; __________________________________________________
&gt;     &gt; Do You Yahoo!?
&gt;     &gt; En finir avec le spam? Yahoo! Mail vous offre la meilleure
protection 
&gt;     &gt; possible contre les messages non sollicités
&gt;     &gt; http://mail.yahoo.fr Yahoo! Mail 
&gt;
&gt;     -- 
&gt;     Amy Squillacote                    Phone: (256) 726-4839
&gt;     Computer Scientist                 Fax: (256) 726-4806
&gt;     CFD Research Corporation           Web: http://www.cfdrc.com
&gt;     215 Wynn Drive, Suite 501
&gt;     Huntsville, AL  35805
&gt;
&gt;
&gt;               
&gt;
&gt;
&gt; __________________________________________________
&gt; Do You Yahoo!?
&gt; En finir avec le spam? Yahoo! Mail vous offre la meilleure protection 
&gt; possible contre les messages non sollicités
&gt; http://mail.yahoo.fr Yahoo! Mail 

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805


</PRE></BLOCKQUOTE></td></tr></table><br>__________________________________________________<br>Do You Yahoo!?<br>En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités <br>http://mail.yahoo.fr Yahoo! Mail