Hi there, 

I would like to have a mitk::Tool subclass that can use seed points to run a 
region growing algorithm on a per slice basis. 

However, I'm not sure I understand how to do this. Each mitk::Tool is itself a 
subclass of StateMachine, so when registered will receive events. When I 
construct my mitk::Tool subclass, the constructor string parameter determines 
the correct pattern of state machine. So, by way of example, the 
mitkAddContourTool, inherits from mitkContourTool which specifies 
PressMoveReleaseWithCTRLInversion, and in StateMachine.xml the transition graph 
is defined, with certain actions. 

Question 1: How do these action ID's get converted to method calls? In tools 
like mitk::AddContourTool, the methods that are called are OnMousePressed, 
OnMouseMoved etc. 

In addition, the MITK Tutorial Step5.cpp suggests that I can create a point set 
interactor, registered with the global interactor, which will add/remove 
points. 

Question 2: So, should I create a PointSetInteractor within my own subclass of 
mitk::Tool? Which one will get the events first? 

I also tried in my mitk::Tool subclass, specifying in the constructor the 
pattern PressMoveReleaseWithCTRLInversion and implementing methods 
OnMousePressed and OnInvertLogic. So, when OnMousePressed was triggered, I 
could add points to the point set and they were visualised, but then when the 
control key was pressed, I couldnt remove them as PointSet doesn't have a 
remove method. 

Question 3: So, does all interaction with a PointSet have to be done with an 
interactor? I can't just remove points programmatically myself from within a 
Tool? 

Thanks as always 

Matt 

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to