Hi,

I would like to create a plugin something like the interactive 
segmentation plugin. It uses the ToolManager, which stores all the 
available (mitk::Tool) tools.

Is there a way that I can (re-)use the ToolManager in my own plugin to 
store a different set or subset of tools?


I see the list of tools is populated by this line:

std::list<itk::LightObject::Pointer> thingsThatClaimToBeATool = 
itk::ObjectFactoryBase::CreateAllInstance("mitkTool");


I'm feeling a bit unsure about how to proceed, but this is what I think 
I should do:

In order to implement a different set of tools, do I need to implement a 
new macro MITK_TOOL_MACRO as in "mitkToolFactoryMacro.h" and replace the 
keyword "mitkTool" by my own new keyword?


Then, in a new tool I should call something like this:

namespace mitk {
   MY_MITK_TOOL_MACRO(MitkExt_EXPORT, FillRegionTool, "Fill tool");
}


Can anyone correct me if I'm wrong or missing something. I guess as an 
alternative I could simply fill the list "thingsThatClaimToBeATool" 
manually, instead of using an object factory.


Thanks
Bryn








------------------------------------------------------------------------------

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

Reply via email to