Page MenuHomePhabricator

Use 2D mapper vtkProperties inside the 3D mapper
Closed, ResolvedPublic

Description

Currently, the Geometry2DDataVtkMapper3D (the mapper for the 3D RW) gets the slice from the mitkImageVtkMapper2D and applies properties like color, opacity etc..

With the new 2D rendering this is no longer necessary. The 3D mapper can just get the complete actor from the 2D mapper and render the same object in the 3D position. Thus, a lot of effort can be saved and a lot of features which I implemented/fixed for the 2D rendering should also work inside the 3D RW. For instance, the RBGA levelWindow or segmentation contours should work then.

Event Timeline

The actors cannot be used inside the Geometry2DDataVtkMapper3D, because they are OpenGL related and would cause strange bug if used in multiple render windows.

However, there should be just one place to apply properties.

Todo: design a concept for this.

E.g.:
One class for slicing, one for 3D mapping, one for 2D mapping, one for properties.

Changed this bug to:
"Use 2D mapper vtkProperties inside the 3D mapper"

The aim is now to re-use the vtkProperties (e.g. color, opacity, lookuptable, etc.), which are generated in the imageVtkMapper2D, in the Geometry2DDataVtkMapper3D. This would remove a lot of "duplicated" code and would fix some issues of the 3D mapper.

I pushed a solution to bug-9256-2DPropertiesIn3DMapper and wrote a change request.

This bug is urget, because it also fixes an issue with the property "outline binary" which destroys our 3D rendering of binary images (with "outline binary" set on).

[91ea78]: Merge branch 'bug-9296-2DPropertiesIn3DMapper'

Merged commits:

2011-11-16 14:30:23 Thomas Kilgus [ed9090]
Fixed a bug with outline binary which destroyed the 3D rendering of binary images.


2011-11-11 11:12:11 Thomas Kilgus [65813f]
Removed unnecessary includes and forward declarations.


2011-11-11 11:04:58 Thomas Kilgus [d0039a]
Deleted lots of LoC, including 2x DeepCopy.


2011-11-11 10:49:02 Thomas Kilgus [146460]
Fixed a bug regarding grayscale levelwindows. Outcommented more code.


2011-11-11 09:52:33 Thomas Kilgus [928504]
Property and Lut are set from 2D mapper in 3D. Works nicely with setting ambient to 0.5.

[08886c]: Merge branch 'bug-9296-2DPropsLutFix'

Merged commits:

2011-11-21 10:55:32 Thomas Kilgus [5fc431]
Fix for lookuptables. Now re-applied for each render().