<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Actually, I just realized that vtkThresholdPoints appears to have extracted the points and the connections were lost. So when I run it though the vtkPolydataConnectivityFilter there is one region for each point in the polydata. Could you let me know if there's a way to get vtkThresholdPoints to preserve connectivity, or if there's a better approach?<div><br></div><div>I've also tried using the vtkPolydaytaConnectivity filter operating on the scalar data, but was only able to get it to return the largest region for each label.<br><div><br></div><div>Thanks,</div><div>Sara </div><div><div><br></div><div><br><div><div>On Jun 26, 2012, at 2:16 PM, Sara Rolfe wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jochen,<div><br></div><div>I was able to use vtkThresholdPoints to do exactly what I wanted. Thanks for your help!</div><div><br></div><div>Sara</div><div><br><div><div>On Jun 26, 2012, at 1:52 AM, Jochen K. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Sara,<br><br> you may try to separate your polydata by scalar values using a vtkThresholdPoints object:<br><br> untested snippet: <pre> <span style=" color: Green;">//...</span>
vtkSmartPointer<vtkThresholdPoints> threshold = vtkSmartPointer<vtkThresholdPoints>::New();
threshold.SetInput(contourPolydata);
threshold.SetInputArrayToProcess(
<span style=" color: Maroon;">0</span>,
<span style=" color: Maroon;">0</span>,
vtkDataObject::FIELD_ASSOCIATION_POINTS,
vtkDataSetAttributes::SCALARS,
<span style=" color: Maroon;">"NameOfYourScalarArray"</span>);
threshold->ThresholdBetween(<span style=" color: Maroon;">0</span>, <span style=" color: Maroon;">1</span>); <span style=" color: Green;">// would give you the points labeled with 1</span>
<span style=" color: Green;">// you may have to experiment with the value range a bit</span>
<span style=" color: Green;">//threshold->ThresholdBetween(1, 2); // would give you the points labeled with 2</span>
threshold->Update();
vtkSmartPointer<vtkPolyData> part = vtkSmartPointer<vtkPolyData>::New();
part->SetInputConnection(threshold->GetOutputConnection());
<span style=" color: Green;">//...</span>
</pre> <br>best regards<br> Jochen          <br><hr align="left" width="300"> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Extract-Polydata-points-with-same-scalar-value-tp5714208p5714224.html">Re: Extract Polydata points with same scalar value</a><br> Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br>_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></div></div>_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></div></div></div></body></html>