Hi Sebastian,
sorry for my late answer.

To draw a 3D Line, you can use a mitkPointSetMapper associated with a 
mitkPointSet.
The Points represent the edge points of the line.
The mitkPointSetVtkMapper3D connects each point if the bool property "show 
contour" is set to true.


        mitk::PointSet::Pointer pointSet = mitk::PointSet::New();
      mitk::DataTreeNode pointSetNode = mitk::DataTreeNode::New();
        mitk::PointSetInteractor interactor = 
mitk::PointSetInteractor::New("pointsetinteractor", pointSetNode);
        mitk::GlobalInteraction::GetInstance()->AddInteractor(interactor);
        pointSetNode->SetName("Contour");
      pointSetNode->SetProperty("show contour", mitk::BoolProperty::New(true));
      pointSetNode->SetProperty("contoursize", mitk::FloatProperty::New(1.0));
      pointSetNode->SetProperty("pointsize", mitk::FloatProperty::New(1.1));
      pointSetNode->SetData(pointSet);
      mitk::DataStorage::GetInstance()->Add(pointSetNode);

The mitkContourInteractor is deprecated and formally used as a hierarchical 
statemachine. 
Hierarchical statemachines turned out to be too complex to use.
But you can check the mitkExtrudedContourInteractor with statemachine pattern 
"dragWithCtrl" as used in QmitkExtrudedContourCutter.

Best Regrds,
Ingmar


-----Ursprüngliche Nachricht-----
Von: sebastian ordas [mailto:[email protected]] 
Gesendet: Mittwoch, 4. März 2009 14:43
An: [email protected]
Betreff: [mitk-users] contour interactor example

Hi team,

I´m trying to draw a contour on a 2D slice via Contour Interactor (not
via mitkTool like e.g. in ContourTool)

I setup the interactor with the "PressMoveRelease" state machine and
add it to the DefaultDataStorage, but
I cannot see the contour.

If I use the pointsetinteractor instead, everything is ok ... but I
need a contour, not a set of points.

Shall I use another interactor (e.g. polygon)?

Does someone has any example that can provide?

thank you
sebastian

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

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

Reply via email to