From: Leonardo Florez-Valencia Date: Sat, 28 May 2016 02:20:43 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~154 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e857c52ab67b603ed2230e6e64d1225150fb8d6d;p=cpPlugins.git ... --- diff --git a/lib/cpExtensions/QT/SimpleMPRWidget.cxx b/lib/cpExtensions/QT/SimpleMPRWidget.cxx index f838a2e..836bd7b 100644 --- a/lib/cpExtensions/QT/SimpleMPRWidget.cxx +++ b/lib/cpExtensions/QT/SimpleMPRWidget.cxx @@ -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 } // ------------------------------------------------------------------------- diff --git a/lib/cpExtensions/QT/SimpleMPRWidget.h b/lib/cpExtensions/QT/SimpleMPRWidget.h index 8028460..fefe144 100644 --- a/lib/cpExtensions/QT/SimpleMPRWidget.h +++ b/lib/cpExtensions/QT/SimpleMPRWidget.h @@ -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 diff --git a/lib/cpPlugins/OrthoNormalBase.cxx b/lib/cpPlugins/OrthoNormalBase.cxx index 4ad0255..e45545d 100644 --- a/lib/cpPlugins/OrthoNormalBase.cxx +++ b/lib/cpPlugins/OrthoNormalBase.cxx @@ -1,6 +1,8 @@ #include + +#include #include - + // ------------------------------------------------------------------------- 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$