Page MenuHomePhabricator

ImageVTKMapper2D::SetDefaultProperties does not evaluate properties of mitk::image for level/window properties
Closed, ResolvedPublic

Description

ImageVTKMapper2D::SetDefaultProperties() is supposed to use the level/window values that are defined in the images DICOM tags to create an initial LevelWindow-Object.

These values are stored as StringProperties on the image (if available). However, the mapper tries to retrieve the preoperties from the datanode instead of the image.

Thus, the mapper will only use the LW values from the DICOM tags if the properties of the image have previously been assigned to the datanode as well.

This should be changed, the mapper should check the properties of the image.

Event Timeline

This improves DICOM loading behavior and fixes an issue we observed in our applications.

Who creates the data node for the new DICOM image? Can't the level/window information be added automatically as properties to the data node, such that the ImageVTKMapper2D works out of the box?

I would just like to understand the changes better... do you have a branch already?

(In reply to comment #2)

Who creates the data node for the new DICOM image? Can't the level/window
information be added automatically as properties to the data node, such that
the ImageVTKMapper2D works out of the box?

DicomSeriesReader actually produces DataNodes right now, and these get a copy of the image's DICOM-tag properties. When the node is used like this, everything works fine. However, if an application (like Mint did) just takes the image and produces a new node, ImageVTKMapper2D is not able to find relevant information on the node level anymore. At the image level, this information is preserved in any case, so it is a better way to look for it.

Yes, there is a branch:

http://mitk.org/git/?p=MITK.git;a=commitdiff;h=cfa16d6e7575bff68094d4eb716ebf2567721a84

Thanks for the clarification.

[6146c2]: Merge branch 'bug-13050-levelwindow-from-dicom-tags'

Merged commits:

2012-09-06 16:10:53 Markus Engel [cfa16d]
searching in properties of mitkImage instead of datanode

The problem has been solved as proposed in the description.
Branch has been integrated into master, ticket can be closed.