Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F536
bug4014.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
xplanes
May 14 2010, 3:53 PM
2010-05-14 15:53:44 (UTC+2)
Size
2 KB
Referenced Files
None
Subscribers
None
bug4014.diff
View Options
Index: Core/Code/Rendering/mitkSurfaceMapper2D.cpp
===================================================================
--- Core/Code/Rendering/mitkSurfaceMapper2D.cpp (revision 21081)
+++ Core/Code/Rendering/mitkSurfaceMapper2D.cpp (working copy)
@@ -27,6 +27,8 @@
#include "mitkVtkScalarModeProperty.h"
#include "mitkAbstractTransformGeometry.h"
#include "mitkLookupTableProperty.h"
+#include "mitkPointSet.h"
+#include "mitkPointSetMapper2D.h"
#include <vtkPolyData.h>
#include <vtkPlane.h>
@@ -280,15 +282,18 @@
//set data into cutter
m_Cutter->SetInput(vtkpolydata);
+ m_Cutter->Update();
// m_Cutter->GenerateCutScalarsOff();
// m_Cutter->SetSortByToSortByCell();
- m_Stripper->SetInput( m_Cutter->GetOutput() );
- // calculate the cut
- m_Stripper->Update();
+ // Stripper will remove cell data from input
+ //m_Stripper->SetInput( m_Cutter->GetOutput() );
+ //// calculate the cut
+ //m_Stripper->Update();
// traverse the cut contour
- PaintCells(renderer, m_Stripper->GetOutput(), worldGeometry, renderer->GetDisplayGeometry(), vtktransform, lut, vtkpolydata);
+ //PaintCells(renderer, m_Stripper->GetOutput(), worldGeometry, renderer->GetDisplayGeometry(), vtktransform, lut, vtkpolydata);
+ PaintCells(renderer, m_Cutter->GetOutput(), worldGeometry, renderer->GetDisplayGeometry(), vtktransform, lut, vtkpolydata);
}
}
@@ -471,6 +476,31 @@
}
}
+ if ( numberOfLines == 0 && contour->GetNumberOfPoints() != 0 )
+ {
+ mitk::PointSet::Pointer pointSet = mitk::PointSet::New( );
+ vtkPoints *pointsVtk = contour->GetPoints( );
+ for( int i = 0; i < pointsVtk->GetNumberOfPoints( ); i++ )
+ {
+ double x[ 3 ];
+ pointsVtk->GetPoint( i, x );
+ p[ 0 ] = (mitk::Point3D::ValueType) x[ 0 ];
+ p[ 1 ] = (mitk::Point3D::ValueType) x[ 1 ];
+ p[ 2 ] = (mitk::Point3D::ValueType) x[ 2 ];
+ pointSet->InsertPoint( i, p );
+ }
+
+ mitk::DataTreeNode::Pointer node;
+ node = mitk::DataTreeNode::New();
+ mitk::PointSetMapper2D::SetDefaultProperties( node );
+ node->SetData( pointSet );
+
+ mitk::PointSetMapper2D::Pointer mapper;
+ mapper = mitk::PointSetMapper2D::New( );
+ mapper->SetDataTreeNode( node );
+ mapper->Paint( renderer );
+ }
+
glEnd();
glLineWidth(1.0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
514
Default Alt Text
bug4014.diff (2 KB)
Attached To
Mode
T4014: Allow rendering a mitk::Surface with only lines
Attached
Detach File
Event Timeline
xplanes
added a comment.
May 14 2010, 3:53 PM
2010-05-14 15:53:44 (UTC+2)
Comment Actions
Unified patch
Log In to Comment