Hi Mario,
sorry for the delayed answer. You’re absolutely right, the doku is outdated and 
I have added a ticket for it [1]. As far as I know we don’t use the toolmanager 
independently from the segmentation plugin.

A long time ago I used it for the different interaction options in the clipping 
plane plugin and also struggled on this or a similar autoload problem. I solved 
it only with a workaround☹. Please have a look at bug 10707 [2] and the commit 
[3]. Maybe it is sufficient to call an empty static method declared in the 
tools.

Best,
Jasmin

[1] http://bugs.mitk.org/show_bug.cgi?id=19726
[2] http://bugs.mitk.org/show_bug.cgi?id=10707
[3] 
http://mitk.org/git/?p=MITK.git;a=commit;h=ed9466c1d0dd8668e10d660907302cb96d98b7ba


Von: Ceresa, Mario [mailto:mario.cer...@upf.edu]
Gesendet: Freitag, 22. April 2016 18:35
An: MITK
Betreff: Re: [mitk-users] External segmentation tools

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<mailto: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/marioceresa
Tel.: (+34) 93 542 13 48<tel:%28%2B34%29%2093%20542%2013%2048>
Fax: (+34) 93 542 25 17<tel:%28%2B34%29%2093%20542%2025%2017>



--
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/marioceresa
Tel.: (+34) 93 542 13 48
Fax: (+34) 93 542 25 17
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to