Dear all,

I try to add VTK mesh objects to a DataStorage in MITK 0.14 and found 
the method

mitk::DataTreeNode::Pointer CommonFunctionality::AddVtkMeshToDataTree( 
vtkPolyData *polys, mitk::DataTreeIteratorBase *iterator, std::string str)

for that reason. However I can't figure out how to get an iterator for 
my Node out of the DataStorage instance. Right now i'm not sure about 
using iterators for this kind of tasks at all in MITK 0.14, as i also 
read about the change from DataTree to DataStorage (without iterator 
interface) some days ago.

May you explain the proper way of adding VTK objects to a DataStorage?


My experimental code so far:

#include "QmitkCommonFunctionality.h"
#include "vtkSphereSource.h"

...


void Experimental::createVtkObjects() {
        vtkSphereSource* sphere = vtkSphereSource::New();
        sphere->SetRadius(50);
        sphere->SetCenter(0.0, 0.0, 0.0);
        sphere->SetThetaResolution(24);
        sphere->SetPhiResolution(24);
        vtkPolyData* sphereData = sphere->GetOutput();

        mitk::DataTreeNode::Pointer sphereNode = mitk::DataTreeNode::New();
        sphereNode->SetVisibility(true);

        //???
        //      mitk::DataTreeNode* node = 
CommonFunctionality::AddVtkMeshToDataTree(sphereData, , "My Sphere");

        DataStorage->Add(sphereNode);
        mitk::RenderingManager::GetInstance()->RequestUpdateAll();

}



Thanks in advance,
Simon



-- 
Simon Eck

Biomedical Computer Vision Group
Im Neuenheimer Feld 267
69120 Heidelberg

[email protected]

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to