Corresponding email conversation:
Von: Floca, Ralf Omar <r.floca@Dkfz-Heidelberg.de>
Gesendet: Donnerstag, 16. April 2020 22:20
An: Neher, Peter <p.neher@Dkfz-Heidelberg.de>; Samuel Klistorner <samuel.klistorner@sydney.edu.au>; mitk-users@lists.sourceforge.net
Cc: Wasserthal, Jakob <j.wasserthal@dkfz-heidelberg.de>
Betreff: AW: Python and MITK
Hi,
short answer: sadly no. Not in the workbench
Reason: The mechanism currently used to transfer the image data is very primitive to say it politly. This is already very long on my would be great if we finally would refactor that code part and really make the images transparent accessible. We also already have bindings for mitk::Images that are used by mitk Phenotyping when you want to use it directly out of python. But it is not leveraged in the workbench yet.
@Peter/Samuel maybe you want to have a look.
Best Ralf
Von: Neher, Peter
Gesendet: Donnerstag, 16. April 2020 08:23
An: Samuel Klistorner <samuel.klistorner@sydney.edu.au>; Floca, Ralf Omar <r.floca@Dkfz-Heidelberg.de>; mitk-users@lists.sourceforge.net
Cc: Wasserthal, Jakob <j.wasserthal@dkfz-heidelberg.de>
Betreff: AW: Python and MITK
Hi Samuel,
you mean that the changes you are making in python are directly reflected in the MITK image? Unfortunately I don't know if that is supposed to work. I will try and look into this, but I never really used the python console.
@Ralf, are you a python console user in MITK and maybe know about this or maybe you know someone who might know?
If nobody knows, I will have a look as soon as I can work from the office again. In general it is recommended to ask such questions via the users list so we can leverage the knowledge of the complete MITK developers group.
Best,
Peter
Von: Wasserthal, Jakob
Gesendet: Mittwoch, 15. April 2020 15:14
An: Neher, Peter
Cc: Samuel Klistorner
Betreff: AW: Python and MITK
Hi Peter,
Samuel from Sydney who visited our lab last year is using MITK+Python but is having some more questions. Since I am not familiar with this I refer him to you. So maybe you can help him.
Best
Jakob
Von: Samuel Klistorner <samuel.klistorner@sydney.edu.au>
Gesendet: Mittwoch, 15. April 2020 14:52
An: Wasserthal, Jakob
Betreff: Re: Python and MITK
Hi Jakob,
Great to hear from you. Glad to hear that you are doing well and Germany is coping well.
I did manage to build MITK Diffusion with Python. I worked out that I can drag images from the Data Manager to the Variable Stack and vice versa. My next question is, is there a way to update/refresh the Display (primarily the 3D window) using the Python console?
e.g. I have a SITK image in my python console to which I do some data manipulation on, and then automatically display that in the 3D window – such as erode or dilate a binary mask.
Id be happy to speak to Peter directly if its easier.
How are you going with your work? Any new papers coming out?
Cheers
Kind Regards,
Samuel Klistorner | Software Engineer
The University of Sydney, Save Sight Institute