]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Sat, 28 May 2016 02:20:43 +0000 (21:20 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Sat, 28 May 2016 02:20:43 +0000 (21:20 -0500)
lib/cpExtensions/QT/SimpleMPRWidget.cxx
lib/cpExtensions/QT/SimpleMPRWidget.h
lib/cpPlugins/OrthoNormalBase.cxx

index f838a2ea704c118576580bd39897728d1f5277f1..836bd7bdd7c9cb6765b856169925e43031d5c656 100644 (file)
@@ -194,10 +194,14 @@ AddMesh( vtkPolyData* mesh )
 
 // -------------------------------------------------------------------------
 void cpExtensions::QT::SimpleMPRWidget::
-AddMeshActor( vtkActor* actor )
+AddMeshActor( vtkProp3D* actor )
 {
-  std::cerr << "SimpleMPR: adding mesh actor" << std::endl;
-  std::exit( 1 );
+  if( actor != NULL )
+  {
+    this->m_Renderers[ 3 ]->AddViewProp( actor );
+    this->m_VTK[ 3 ]->GetRenderWindow( )->Render( );
+
+  } // fi
 }
 
 // -------------------------------------------------------------------------
index 802846063e4c89fcbd019aab8e531e9d500f2339..fefe1446e70fb86ac51fd417607e54dbaa0ed456 100644 (file)
@@ -100,7 +100,7 @@ namespace cpExtensions
       void AddImage( vtkImageData* image );
       void AddImageActor( vtkImageActor* actor );
       void AddMesh( vtkPolyData* mesh );
-      void AddMeshActor( vtkActor* actor );
+      void AddMeshActor( vtkProp3D* actor );
       void AddActor( vtkProp* actor );
 
       // Visual objects
index 4ad0255a33f74bd2bbe058fdc5023e01cdd09879..e45545de90a132aeb6e3a5fca646ee86fcd61a49 100644 (file)
@@ -1,6 +1,8 @@
 #include <cpPlugins/OrthoNormalBase.h>
+
+#include <vtkAxesActor.h>
 #include <vtkMatrix4x4.h>
+
 // -------------------------------------------------------------------------
 void cpPlugins::OrthoNormalBase::
 SetITK( itk::LightObject* o )
@@ -34,6 +36,15 @@ cpPlugins::OrthoNormalBase::
 void cpPlugins::OrthoNormalBase::
 _CreateVTKActor( ) const
 {
+  auto matrix =
+    const_cast< vtkMatrix4x4* >( this->GetVTK< vtkMatrix4x4 >( ) );
+  if( matrix !=  NULL )
+  {
+    auto actor = vtkAxesActor::New( );
+    actor->SetUserMatrix( matrix );
+    this->m_Actor = actor;
+
+  } // fi
 }
 
 // eof - $RCSfile$