Hi,

I'm new to MITK and I would like to use it to display tubes around a 
polyline that I have generated using "vtkTubeFilter". The code works 
fine when using VTK only but I would like to integrate it into some 
application that uses MITK.

I have successfully visualized data from other sources with MITK 
already, however, there seems to be a problem with the output of 
"vtkTubeFilter". Below you find my code, which works fine for other 
data, but not in this particular case. In the 2D-views of the 
QmitkStdMultiWidget, I can see the cross-sections of the tubes, but 
nothing is visualized in the 3d-view. My original vtkPolyData which 
serves as an input to vtkTubeFilter consists only of points and the 
connecting polyline.

Any help is deeply appreciated.

Thanks in advance,
Steffen



mitk::DataTree::Pointer tree=mitk::DataTree::New();
mitk::DataTreePreOrderIterator it(tree);
mitk::DataStorage::CreateInstance(tree);
...

vtkPolyData *pointEvolution = vtkPolyData::New();
...

pointEvolution->SetPoints(samplePts);
pointEvolution->SetLines(polyLine);
...

vtkTubeFilter *profileTubes = vtkTubeFilter::New();
profileTubes->SetNumberOfSides(20);      
profileTubes->SetInput(pointEvolution);
profileTubes->SetRadius(10);
profileTubes->Update();
...
mitk::Surface::Pointer tubes = mitk::Surface::New();
tubes->SetVtkPolyData(profileTubes->GetOutput());

mitk::DataTreeNode::Pointer node = mitk::DataTreeNode::New();
node->SetData(tubes);
node->SetProperty( "visible", new mitk::BoolProperty( true ) );

it.Add(node);

QmitkStdMultiWidget* renderWindow = new QmitkStdMultiWidget(NULL, "");
renderWindow->SetData(&it);
renderWindow->InitializeStandardViews(&it);
        
qtapplication.setMainWidget(renderWindow);
renderWindow->show();
renderWindow->Fit();
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
qtapplication.exec();



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to