Hi Caspar, On 31/08/15 11:47, Goch, Caspar Jonas wrote: > Hi Luis, > > Regarding the compile time: > You might want to build your own project based on the MITK-ProjectTemplate > [1], that way you only need to build MITK once, after that you only build > your own project (plus you are not modifying MITK's source code, but only > your own). >
thank you, I'll try that :). > Regarding the compile error: > I assume you build python during the MITK superbuild? If you want help > regarding the error, please answer the following questions [2]. > I don't build Python, I use the System Python (2.7), I got compile errors with 3.4. > Regarding python itself: > Eric is going to answer that, as I do not use python myself. Does the python > console work for you org.mitk.gui.qt.python? > Thanks, It does work perfectly. I did have at first a few problems trying to import some libraries from my system python console, but the solution was to add some paths to PYTHONPATH and LD_LIBRARY_PATH. > Best, > Caspar > Thanks again, best, Luis > [1] https://github.com/MITK/MITK-ProjectTemplate > [2] http://mitk.org/wiki/BuildErrorHelpQuestions > -----Ursprüngliche Nachricht----- > Von: Luis J. Salvatierra [mailto:[email protected]] > Gesendet: Freitag, 28. August 2015 11:40 > An: mitk-users > Betreff: [mitk-users] MITK Python Plugin > > 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 > -- 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
