<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Thank you David for your help.</DIV>
<DIV>Can you make me a favour and tell me what does 'Mean_Curvature' means in this line?</DIV>
<DIV>vtkDoubleArray *myArray = newPolyData-&gt;GetPointData()-&gt;GetArray("Mean_Curvature");</DIV>
<DIV>&nbsp;</DIV>
<DIV>- 'myArray' in this case, what does it contain exactly? the mean curvatures?</DIV>
<DIV>- If i want to store the maximum curvatures of the points, should i do? </DIV>
<DIV><BR><BR><BR>--- En date de&nbsp;: <B>Mar 28.10.08, David E DeMarle <I>&lt;dave.demarle@kitware.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: David E DeMarle &lt;dave.demarle@kitware.com&gt;<BR>Objet: Re: [vtkusers] What the array contains in this case?<BR>À: butterfly.1688@yahoo.fr<BR>Cc: vtkusers@vtk.org<BR>Date: Mardi 28 Octobre 2008, 12h44<BR><BR><PRE>On Tue, Oct 28, 2008 at 7:47 AM, B. C. &lt;butterfly.1688@yahoo.fr&gt; wrote:
&gt; Hi everyone,
&gt; Please, i need help.
&gt; I have a polydata, i used vtkCurvatures to compute the maximum curavtures.
I
&gt; did this:
&gt; vtkCurvatures *curve = vtkCurvatures::New();
&gt; curve-&gt;SetInput(myPolyData);
&gt; curve-&gt;SetCurvatureTypeToMaximum();
&gt;

You need to call:
curve-&gt;Update();
here, to tell the filter to go ahead and run.

&gt; vtkPolyData *newPolyData = vtkPolyData::New();

You don't have to create a new poly data structure above.
Instead, the above line can be:
vtkPolyData *newPolyData;
since you are setting the pointer below to something else.

&gt; newPolyData = curve-&gt;GetOutput();
&gt;
&gt; Then, i used a double aray to store the values of the curvatures and i did
&gt; this:
&gt; vtkDoubleArray *myArray =
&gt; vtkDoubleArray::SafeDownCast(objetRes-&gt;GetPoints());
&gt;

objectRes should be newPolyData above. And you are getting the spatial
coordinates, not the data values. Instead you need call:
vtkDoubleArray *myArray =
newPolyData-&gt;GetPointData()-&gt;GetArray("Mean_Curvature");
The difference is that you are getting a point associated array call
Mean_Curvature.

&gt; To access to the curves values stored in the array, i used this:
&gt; double curveValue;
&gt; vtkIdType nPoints = myArray-&gt;GetNumberOfTuples();
&gt; for (vtkIdType i=0; i&lt;nPoints; i++)
&gt; curveValue = myArray-&gt;GetValue(i);
&gt;
&gt; Can you tell me if what i did is right?
&gt; - 'newPolyData' is it 'myPolyData' with maximum
curvatures?
&gt; - What the array 'myArray' really contanis?
&gt; - To access to the curev values, is is right to use the finction
&gt; 'GetValue(i)'?
&gt;
&gt; Thank you
&gt;
&gt;

Read the VTK Users guide chapter 11 to learn the layout of vtk's data
structures. Also, pease read some of the Examples that come with code
to get a feel for how to use and manipulate filters and finally read
the vtkCurvatures.cxx class to see exactly what it does.

&gt; _______________________________________________
&gt; This is the private VTK discussion list.
&gt; Please keep messages on-topic. Check the FAQ at:
&gt; http://www.vtk.org/Wiki/VTK_FAQ
&gt; Follow this link to subscribe/unsubscribe:
&gt; http://www.vtk.org/mailman/listinfo/vtkusers
&gt;
&gt;


cheers,
-- 
David E DeMarle
Kitware, Inc.
R&amp;D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
</PRE></BLOCKQUOTE></td></tr></table><br>