Page MenuHomePhabricator

2DMapperOpacity.diff

Authored By
xplanes
May 31 2011, 2:35 PM
Size
1 KB
Referenced Files
None
Subscribers
None

2DMapperOpacity.diff

Index: mitkImageMapperGL2D.cpp
===================================================================
--- mitkImageMapperGL2D.cpp (revision 29842)
+++ mitkImageMapperGL2D.cpp (working copy)
@@ -1070,6 +1070,11 @@
GetDataNode()->GetBoolProperty( "use color", useColor, renderer );
mitk::LookupTableProperty::Pointer LookupTableProp;
+ // If "use LUT opacity" is true, then uses the opacity of the LUT instead of the opacity of
+ // the property "opacity"
+ bool useLUTOpacity = false;
+ GetDataTreeNode()->GetBoolProperty( "use LUT opacity", useLUTOpacity, renderer );
+
if ( !useColor )
{
LookupTableProp = dynamic_cast<mitk::LookupTableProperty*>(
@@ -1093,7 +1098,8 @@
m_iil4mitkMode = iil4mitkImage::COLOR_ALPHA;
// only update the lut, when the properties have changed...
if ( LookupTableProp->GetLookupTable()->GetMTime()
- <= this->GetDataNode()->GetPropertyList()->GetMTime() )
+ <= this->GetDataNode()->GetPropertyList()->GetMTime() &&
+ !useLUTOpacity )
{
LookupTableProp->GetLookupTable()->ChangeOpacityForAll( opacity );
LookupTableProp->GetLookupTable()->ChangeOpacity(0, 0.0);

File Metadata

Mime Type
application/octet-stream
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
660
Default Alt Text
2DMapperOpacity.diff (1 KB)