X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpPlugins%2FImage.cxx;h=261d966674fc7f54e6dca307acc58174d4d8fc53;hb=107144983fb7d178ad07ccfd1b7c703671eb09aa;hp=ba3ff298c951b66f6809ea1dc5bcc4a074b00758;hpb=1b0022070ff3b5f80f6f8c8b87f73032f5685eaf;p=cpPlugins.git diff --git a/lib/cpPlugins/Image.cxx b/lib/cpPlugins/Image.cxx index ba3ff29..261d966 100644 --- a/lib/cpPlugins/Image.cxx +++ b/lib/cpPlugins/Image.cxx @@ -1,5 +1,9 @@ #include +#include +#include +#include + // ------------------------------------------------------------------------- void cpPlugins::Image:: SetITK( itk::LightObject* o ) @@ -38,4 +42,23 @@ cpPlugins::Image:: { } +// ------------------------------------------------------------------------- +void cpPlugins::Image:: +_CreateVTKActor( ) const +{ + vtkImageData* image = + const_cast< vtkImageData* >( this->GetVTK< vtkImageData >( ) ); + if( image != NULL ) + { + vtkImageSliceMapper* mapper = vtkImageSliceMapper::New( ); + vtkImageActor* actor = vtkImageActor::New( ); + mapper->SetInputData( image ); + actor->SetMapper( mapper ); + actor->GetProperty( )->SetInterpolationTypeToNearest( ); + this->m_Actor = actor; + mapper->Delete( ); + + } // fi +} + // eof - $RCSfile$