From c2678ab6df323b2bdb41217673ed60bc29642166 Mon Sep 17 00:00:00 2001 From: Leonardo Florez-Valencia Date: Thu, 26 May 2016 17:48:48 -0500 Subject: [PATCH] Almost there... --- lib/cpPlugins/Image.cxx | 2 +- lib/cpPlugins/Mesh.cxx | 20 ++++++++++++++++++++ lib/cpPlugins/Mesh.h | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/cpPlugins/Image.cxx b/lib/cpPlugins/Image.cxx index b3ff5d2..4d9cbd8 100644 --- a/lib/cpPlugins/Image.cxx +++ b/lib/cpPlugins/Image.cxx @@ -54,7 +54,7 @@ _CreateVTKActor( ) const mapper->SetInputData( image ); actor->SetMapper( mapper ); this->m_Actor = actor; - // TODO: mapper->Delete( ); + mapper->Delete( ); } // fi } diff --git a/lib/cpPlugins/Mesh.cxx b/lib/cpPlugins/Mesh.cxx index 071a51d..2854840 100644 --- a/lib/cpPlugins/Mesh.cxx +++ b/lib/cpPlugins/Mesh.cxx @@ -121,4 +121,24 @@ cpPlugins::Mesh:: { } +// ------------------------------------------------------------------------- +void cpPlugins::Mesh:: +_CreateVTKActor( ) const +{ + vtkPolyData* mesh = + const_cast< vtkPolyData* >( this->GetVTK< vtkPolyData >( ) ); + if( mesh != NULL ) + { + std::cout << "Mesh: " << mesh << std::endl; + /* TODO + vtkImageSliceMapper* mapper = vtkImageSliceMapper::New( ); + vtkImageActor* actor = vtkImageActor::New( ); + mapper->SetInputData( image ); + actor->SetMapper( mapper ); + this->m_Actor = actor; + */ + + } // fi +} + // eof - $RCSfile$ diff --git a/lib/cpPlugins/Mesh.h b/lib/cpPlugins/Mesh.h index 6155f46..1c70aba 100644 --- a/lib/cpPlugins/Mesh.h +++ b/lib/cpPlugins/Mesh.h @@ -32,6 +32,8 @@ namespace cpPlugins Mesh( ); virtual ~Mesh( ); + virtual void _CreateVTKActor( ) const ITK_OVERRIDE; + template< class M > inline bool _ITK_2_VTK( itk::LightObject* o ); -- 2.45.1