In this step the result of the previous step is converted into a surface by means of a VTK filter.
Step7 inherits from Step6. It enhances the method StartRegionGrowing() by processing the result image.
if (m_ResultImage.IsNotNull())
{
vtkMarchingCubes *surfaceCreator = vtkMarchingCubes::New();
surfaceCreator->SetInputData(m_ResultImage->GetVtkImageData());
surfaceCreator->SetValue(0, 1);
surfaceCreator->Update();
surface->SetVtkPolyData(surfaceCreator->GetOutput());
surfaceNode->SetData(surface);
m_DataStorage->Add(surfaceNode);
std::cout << "8";
surfaceCreator->Delete();
}
[Previous step] [Next step] [Main tutorial page]