Medical Imaging Interaction Toolkit  2018.4.99-86eb38db
Medical Imaging Interaction Toolkit
MITK Tutorial - Step 7: Convert result of region growing into a surface

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())
{
m_ResultNode->SetProperty("volumerendering", mitk::BoolProperty::New(false));
vtkMarchingCubes *surfaceCreator = vtkMarchingCubes::New();
surfaceCreator->SetInputData(m_ResultImage->GetVtkImageData());
surfaceCreator->SetValue(0, 1);
surfaceCreator->Update();
surface->SetVtkPolyData(surfaceCreator->GetOutput()); // VTK6_TODO
surfaceNode->SetData(surface);
m_DataStorage->Add(surfaceNode);
std::cout << "8";
surfaceCreator->Delete();
}

[Previous step] [Next step] [Main tutorial page]