Hi,

first of all, thank all the MITK developers. I started to work with MITK 
this August, and I have to say I feel a bit overwhelmed with the size of 
the project.

I'm trying to create a Python plugin for MITK, that is, create a plugin 
with `MitkPluginGenerator` with a simple view, process an image with 
Python and show it in the MitkWorkbench.

For now I've been able to compile MITK with a simple C++ plugin, the 
default example with the button `Do something`. And now I'm trying to 
embed a call to a Python script, no luck for now.

I've looked in the documentation and found `mitkPythonService.h`, that 
contains a few functions, and It's a lot easier and simple than full 
python embedding. But now I'm having a lot of problems compiling MITK 
with this basic example:

'''
...

itk::SmartPointer<mitk::PythonService> _PythonService(new 
mitk::PythonService());

std::string result = _PythonService->Execute( "print ('Hello World!')", 
mitk::IPythonService::SINGLE_LINE_COMMAND );

MITK_INFO << result;
'''

I'll try to figure it out the compiling problem. But I would like to 
know if someone tried this before, if so, do you know if there is any 
example with `mitkPythonService.h`?.

Also, I would like to ask, how to test my Plugin (mitkPythonService) 
without compiling all the MITK project, because it takes me several 
hours to compile, between 6 and 7 hours, with an SSD, Intel i7-4790k and 
8GB RAM.

I compile without the `-jX` flag, because it causes compiling erros, I 
think, only when the `MITK_USE_PYTHON` option is enabled, again, I'm not 
sure. But I do now, that everytime I compile with `-jX` I get compile 
errors, not always the same error.

Kind regards and thank you for your time,
-- 
Luis J. Salvatierra
http://www.ljsalvatierra.com
@Luisja_350
Python San Sebastián - ACPySS

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

Reply via email to