[vtkusers] How to extract vtkPolyData for each regions in vtkPolyDataConnectivyFilter?
Andrej Gluhov
realandron at gmail.com
Thu Apr 1 08:54:32 EDT 2010
I found several similar questions, but their problem to solve can not.
vtkDICOMImageReader DicomReader = new vtkDICOMImageReader();
DicomReader.SetFileName(m_strFilePath);
DicomReader.Update();
m_ContourFilter.SetInputConnection(DicomReader.GetOutputPort());
m_ContourFilter.SetValue(0, -250);
m_ContourFilter.Update();
m_ConnectivityFilter.SetInputConnection(m_ContourFilter.GetOutputPort());
m_ConnectivityFilter.ScalarConnectivityOn();
m_ConnectivityFilter.SetExtractionModeToSpecifiedRegions();
m_ConnectivityFilter.Update();
int regions =
m_ConnectivityFilter.GetNumberOfExtractedRegions();
for (int i = 0; i < regions; i++)
{
m_ConnectivityFilter.AddSpecifiedRegion(i);
m_ConnectivityFilter.Update();
vtkPolyData PD = m_ConnectivityFilter.GetOutput();//here I
was hoping to see vtkPolyData for I-st region, but returned vtkPolyData of
m_contourfilter
}
--
С Уважением,
Андрей.
Best regards, Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100401/656b2996/attachment.htm>
More information about the vtkusers
mailing list