1

I need some help with MITK. I am trying to draw points and lines (actually my goal is display a virtual colonoscopy centerline), under MITK. I created a vtkPolyData which contains the data of the centerline. This is wrapped into a mitk::Surface structure in order to add in a mitk::StandaloneDataStorage:

mitk::StandaloneDataStorage::Pointer ds = mitk::StandaloneDataStorage::New();
mitk::DataNode::Pointer dn = mitk::DataNode::New();
mitk::Surface::Pointer aSurface = mitk::Surface::New();
aSurface->Initialize();
aSurface->SetVtkPolyData(polydata); //polydata is a vtkPolyData which contains data
dn->SetData(aSurface);
ds->Add(dn);
renderWindow.GetRenderer()->SetDataStorage(ds); //renderWindow is a QmitkRenderWindow

Now, nothing is shown. I assume that something is missing (e.g. indicate the type of rendering). The camera and its orientation are placed correctly due that I am drawing something else in the same location. Thanks!

Bugs
  • 4,491
  • 9
  • 32
  • 41
esmitt
  • 153
  • 2
  • 12

1 Answers1

1

I solved! The trick is put the function mitk::RenderingManager::GetInstance()->RequestUpdateAll(); every time that you want to render something :-) or when an event/callback is invoked

esmitt
  • 153
  • 2
  • 12