Ok, I created the tools as a separate module and added it to the plugin
depend section, so it is loaded with it.

But I have problem registering the factory:

1) If I call the MITK_TOOL_MACRO *no tool* is shown and the resulting
library exports no itkLoad symbol
2) If I add a declaration of itkLoad such as:
extern "C" {
    MITKSEGMENTATION_EXPORT itk::ObjectFactoryBase* itkLoad()
     {
       static mitk::SuperPixelToolFactory::Pointer factory =
mitk::SuperPixelToolFactory::New();
       return factory;
     }
}

then the tool is shown *twice*

3) If I add the only other macro that seems to create an itkLoad symbol,
MITK_EXTERNAL_TOOL_GUI_CPP_MACRO
then the itkLoad lib is created but not loaded.

*PUZZLED*

M.

On 22 April 2016 at 12:02, Ceresa, Mario <mario.cer...@upf.edu> wrote:

> Dear all,
> It seems that the guide at
> http://docs.mitk.org/nightly/toolextensions.html
> is outdated (qt3 and the example files do not exist anymore).
>
> I would really appreciate any example on how to create an external tools.
> For now I created an external module that defines the new tool (copied from
> AddContour) and a plugin that tries to visualize it using the toolmanager
> but I think that the object factory is never registered, so my tool is not
> visualized even if I ask for it (the default ones can be found instead).
>
> I tried the ITK_AUTOLOAD_PATH solution, but I cannot get it working (on a
> side note  the itkLoad symbol seems not to be present neither in my lib nor
> in libMitkSegmentation.so)
>
> Thanks for any help you might provide!
>
> Best,
>
> Mario
>
> --
> Mario Ceresa, PhD Ing.
> SIMBioSys group
> Universidad Pompeu Fabra
> 55.107 - DTIC Building
> c/Roc Boronat, 138
> 08018 Barcelona
> Web: http://simbiosys.upf.edu/
> Ln:  <http://es.linkedin.com/in/>http://es.linkedin.com/in/marioceresa
> Tel.: (+34) 93 542 13 48
> Fax: (+34) 93 542 25 17
>



-- 
Mario Ceresa, PhD Ing.
SIMBioSys group
Universidad Pompeu Fabra
55.107 - DTIC Building
c/Roc Boronat, 138
08018 Barcelona
Web: http://simbiosys.upf.edu/
Ln:  <http://es.linkedin.com/in/>http://es.linkedin.com/in/marioceresa
Tel.: (+34) 93 542 13 48
Fax: (+34) 93 542 25 17
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to