Page MenuHomePhabricator

bug3359.diff

Authored By
xplanes
Feb 17 2010, 3:56 PM
Size
2 KB
Referenced Files
None
Subscribers
None

bug3359.diff

Index: mitkGeometry2DDataVtkMapper3D.cpp
===================================================================
--- mitkGeometry2DDataVtkMapper3D.cpp (revision 21081)
+++ mitkGeometry2DDataVtkMapper3D.cpp (working copy)
@@ -558,7 +558,28 @@
VtkRepresentationProperty* representationProperty;
this->GetDataTreeNode()->GetProperty(representationProperty, "representation", renderer);
if ( representationProperty != NULL )
- m_BackgroundActor->GetProperty()->SetRepresentation( representationProperty->GetVtkRepresentation() );
+ {
+ mitk::VtkRepresentationProperty::IdType type = representationProperty->GetValueAsId();
+ bool isVolume = false;
+ switch (type) {
+ case mitk::VtkRepresentationProperty::POINTS:
+ m_BackgroundActor->GetProperty()->SetRepresentationToPoints();
+ break;
+ case mitk::VtkRepresentationProperty::WIREFRAME:
+ m_BackgroundActor->GetProperty()->SetRepresentationToWireframe();
+ break;
+ case mitk::VtkRepresentationProperty::SURFACE:
+ m_BackgroundActor->GetProperty()->SetRepresentationToSurface();
+ break;
+ case mitk::VtkRepresentationProperty::WIRESURF:
+ //m_Assembly->RemovePart(m_Actor);
+ //m_Assembly->RemovePart(m_ActorWireframe);
+ //isVolume = true;
+ m_BackgroundActor->GetProperty()->SetRepresentationToSurface();
+ break;
+ }
+ }
+ //m_BackgroundActor->GetProperty()->SetRepresentation( representationProperty->GetVtkRepresentation() );
}
@@ -693,9 +714,8 @@
vtkLookupTable *lookupTableSource;
// check for "use color"
- bool useColor;
- if ( !node->GetBoolProperty( "use color", useColor, planeRenderer ) )
- useColor = false;
+ bool useColor = false;
+ node->GetBoolProperty( "use color", useColor, planeRenderer );
if ( binary )
useColor = true;
@@ -740,7 +760,10 @@
// Apply color property (of the node, not of the plane)
float rgb[3] = { 1.0, 1.0, 1.0 };
- node->GetColor( rgb, renderer );
+ if ( useColor )
+ {
+ node->GetColor( rgb, renderer );
+ }
imageActor->GetProperty()->SetColor( rgb[0], rgb[1], rgb[2] );
//m_BackgroundActor->GetProperty()->SetColor(1,1,1);

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
452
Default Alt Text
bug3359.diff (2 KB)