Page MenuHomePhabricator

[Py] UC1.4 - All images in data storage that are visible are set opacity 50% in a specific render window
Open, NormalPublic

Description

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

import mitk.ioutil
import mitk.core

def predicate_only_visible(node):
  return node.visible is True

ds = mitk.core.services.get_data_storage()
image_predicate = mitk.core.ImagePredicate()
visible_predicate = mitk.core.LambdaPredicate(predicate_only_visible)
predicate = image_predicate+visible_predicate # + is like a AndPredicate(pred1,pred2)

ds.get_subset(predicate)
for node in nodes:
  node.set_property(name='opacity', value=0.5, context=render_name)

Scope:
This introduces more operation on the datastorage, also the support of predicated to a certain extend and context specific property interaction.

Event Timeline

floca renamed this task from [Py] UC2 - All images in data storage that are visible are stored to [Py] UC2 - All images in data storage that are visible are set opacity 50% in a specific render window.Jul 31 2023, 8:04 PM
floca renamed this task from [Py] UC2 - All images in data storage that are visible are set opacity 50% in a specific render window to [Py] UC4 - All images in data storage that are visible are set opacity 50% in a specific render window.
floca updated the task description. (Show Details)
floca triaged this task as Normal priority.Nov 16 2023, 4:29 PM
floca renamed this task from [Py] UC4 - All images in data storage that are visible are set opacity 50% in a specific render window to [Py] UC1.4 - All images in data storage that are visible are set opacity 50% in a specific render window.Mar 7 2024, 11:17 AM