Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F471
bug3359.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
xplanes
Feb 17 2010, 3:56 PM
2010-02-17 15:56:53 (UTC+1)
Size
2 KB
Referenced Files
None
Subscribers
None
bug3359.diff
View Options
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
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
452
Default Alt Text
bug3359.diff (2 KB)
Attached To
Mode
T3359: Color is applied for 3D view when "use color" property is false
Attached
Detach File
Event Timeline
xplanes
added a comment.
Feb 17 2010, 3:56 PM
2010-02-17 15:56:53 (UTC+1)
Comment Actions
Unified patch
Log In to Comment