Hello everyone,<div><br></div><div>I&#39;ve applied the vtkContourWidget in the same way the distancewidget is applied in the QT VTK FOUR PANE VIEW EXAMPLE</div><div><br></div><div>so far everything is fine, but I&#39;m trying now to compute the area so I connect the following code to an pushButton which &#39;ll be activated after finishing drawing the contour.</div>
<div><br></div><div><div><span class="" style="white-space:pre">        </span>vtkSmartPointer&lt; vtkTriangleFilter &gt; triangleTrans =</div><div><span class="" style="white-space:pre">                </span>vtkSmartPointer&lt; vtkTriangleFilter &gt;::New();</div>
<div><span class="" style="white-space:pre">        </span>triangleTrans-&gt;SetInput(contourRepresentation-&gt;GetContourRepresentationAsPolyData());</div><div><span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span></div>
<div><span class="" style="white-space:pre">        </span>vtkSmartPointer&lt; vtkMassProperties &gt; massProp =</div><div><span class="" style="white-space:pre">                </span>vtkSmartPointer&lt; vtkMassProperties &gt;::New();</div><div>
<span class="" style="white-space:pre">        </span>massProp-&gt;SetInput(triangleTrans-&gt;GetOutput());</div><div><span class="" style="white-space:pre">        </span>massProp-&gt;GetSurfaceArea();</div><div><span class="" style="white-space:pre">        </span></div>
<div><span class="" style="white-space:pre">        </span>this-&gt;ui-&gt;surfaceAreaLabel-&gt;setNum(massProp-&gt;GetSurfaceArea());</div></div><div><br></div><div>What I&#39;m trying to do is convert the contour in a triangle mesh so then I can apply vtkMassProperties and get the surface area which is my goal.</div>
<div><br></div><div>Everythings build ok, but once in the gui when pushing the button... it gives me the following error:</div><div><br></div><div><div>Warning: In C:\Users\RODRIGO LOVERA\Documents\PUCP\Tesis\VTK 5.10\VTK\Graphics\vtkMassProperties.cxx, line 120</div>
<div>vtkMassProperties (04C64588): Input data type must be VTK_TRIANGLE not 3</div></div><div><br></div><div>What I use to draw the contours is the following code:</div><div><br></div><div><br></div><div><br clear="all"><div>
<br></div>-- <br><b><font face="&#39;comic sans ms&#39;, sans-serif" color="#000066">Rodrigo Lovera</font></b><br>
</div>