Hello everyone,<div><br></div><div>I'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'm trying now to compute the area so I connect the following code to an pushButton which 'll be activated after finishing drawing the contour.</div>
<div><br></div><div><div><span class="" style="white-space:pre">        </span>vtkSmartPointer< vtkTriangleFilter > triangleTrans =</div><div><span class="" style="white-space:pre">                </span>vtkSmartPointer< vtkTriangleFilter >::New();</div>
<div><span class="" style="white-space:pre">        </span>triangleTrans->SetInput(contourRepresentation->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< vtkMassProperties > massProp =</div><div><span class="" style="white-space:pre">                </span>vtkSmartPointer< vtkMassProperties >::New();</div><div>
<span class="" style="white-space:pre">        </span>massProp->SetInput(triangleTrans->GetOutput());</div><div><span class="" style="white-space:pre">        </span>massProp->GetSurfaceArea();</div><div><span class="" style="white-space:pre">        </span></div>
<div><span class="" style="white-space:pre">        </span>this->ui->surfaceAreaLabel->setNum(massProp->GetSurfaceArea());</div></div><div><br></div><div>What I'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="'comic sans ms', sans-serif" color="#000066">Rodrigo Lovera</font></b><br>
</div>