Page MenuHomePhabricator

[Py] UC3 - Selected image can be manipulated with simpleITK and added to data storage
Open, Needs TriagePublic


Somthing like that should be possible code and details might vary...

import mitk.plugin
import mitk.ioutil
import mitk.core

nodes = mitk.plugin.get_current_selection()
ds =

for node in nodes:
  image = node.get_data()
  gaussian = sitk.SmoothingRecursiveGaussianImageFilter()
  blur_image = gaussian.Execute(image)

  newNode = mitk.core.DataNode(name = + '_blurred') = blured_image['coolProp'] = 'value'
  ds.add_node(newNode, parents=[node])

Result: Selected images are blured and the results are added as new child node (to the respective input node) with the same node + suffix "_blurred".