Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
Available sections:
The Python view provides the graphical front end to run Python code through the mitkPython module. Furthermore the SimpleITK/VTK Python wrapping can be used. Images and surfaces in the DataManager can be transferred via a drag & drop mechanism into the MITK Python Console.
Images and surfaces can be transferred from the data manager into the python console. To transfer an image or surface simply drag it from the data manager into the Variable Stack view, as shown in Figure. A new entry will appear in the Variable Stack, as soon as the data is transferred. As soon as the entry is available the object can be accessed and modified in the python console. Three dimensional images will be copied in-memory to python via numpy and a SimpleITK image object is created with the same properties. Surfaces are fully memory mapped as a vtkPolyData object. To transfer an image or surface from the python runtime to the data manager just double click on the corresponding entry in the Variable Stack View.
The Python console can be used for interactive programming. All items in the data storage can be accessed in the python console. The console can also be used to load python scripts and run them.
The python plugin contains some code snippets of SimpleITK/VTK that can be run in the python console. Snippets can be modified and saved by the user.