From: Leonardo Florez-Valencia Date: Thu, 26 May 2016 22:48:48 +0000 (-0500) Subject: Almost there... X-Git-Tag: v0.1~156 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c2678ab6df323b2bdb41217673ed60bc29642166;p=cpPlugins.git Almost there... --- 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 );