Page MenuHomePhabricator

Creating scene file with image properties can result in missing LevelWindowbar
Open, NormalPublic

Description

In the current MITK version (v2022.10)

When I add Image properties to the scene, containing just a few properties:

<?xml version='1.0' encoding='utf-8'?>
<property key="name" type="StringProperty">
<string value="1.3.12.2.1107.5.1.4.73104.30000020081307523376400012735" /></property>
<property key="layer" type="IntProperty"><int value="0" /></property>

I get the problem, the LevelWendowbar is not showing, and the LevelWindow is fixed therefore to a strange value.

image.png (794×343 px, 93 KB)

When adding parameters or no properties (no file) LevelWindow is there:

<property key="levelwindow" type="LevelWindowProperty">
    <LevelWindow fixed="false" isFloatingImage="false">
        <CurrentSettings level="45" window="320"/>
        <DefaultSettings level="45" window="320"/>
        <CurrentRange min="-2048" max="4096"/>
    </LevelWindow>
</property>

Event Timeline

gaoh triaged this task as Normal priority.Dec 6 2022, 4:42 PM
gaoh created this task.

Reading your other task regarding mitkscene files I wonder if it has something to to with attaching the level window property to the BaseData property list instead of the DataNode property list. In principle, the level window should be attached to the latter one as it is an "appearance" property and not something instrinsic to the data. A few years ago we changed the way properties are queried and when a property is not present in a DataNode property list, the Base Data property list is queried as fallback. Maybe it is not fully functional for level windows as it could be that the code somehow relies on / assumes that the properties are located in the DataNode property list.