]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Image.cxx
...
[cpPlugins.git] / lib / cpPlugins / Image.cxx
index b3ff5d2976eeea96a786ceb7546b2afb4db2579e..994e643880bccc3c0dd382b10b865039e698adfb 100644 (file)
@@ -1,6 +1,7 @@
 #include <cpPlugins/Image.h>
 
 #include <vtkImageActor.h>
+#include <vtkImageProperty.h>
 #include <vtkImageSliceMapper.h>
 
 // -------------------------------------------------------------------------
@@ -8,8 +9,10 @@ void cpPlugins::Image::
 SetITK( itk::LightObject* o )
 {
   this->Superclass::SetITK( o );
-  bool     s = this->_ITK_2_VTK_0< 2 >( o );
-  if( !s ) s = this->_ITK_2_VTK_0< 3 >( o );
+  bool     s = this->_ITK_2_VTK_0_Scalar< 2 >( o );
+  if( !s ) s = this->_ITK_2_VTK_0_Scalar< 3 >( o );
+  if( !s ) s = this->_ITK_2_VTK_0_Color< 2 >( o );
+  if( !s ) s = this->_ITK_2_VTK_0_Color< 3 >( o );
   if( !s )
   {
     this->m_VTKObject = NULL;
@@ -53,8 +56,9 @@ _CreateVTKActor( ) const
     vtkImageActor* actor = vtkImageActor::New( );
     mapper->SetInputData( image );
     actor->SetMapper( mapper );
+    actor->GetProperty( )->SetInterpolationTypeToNearest( );
     this->m_Actor = actor;
-    // TODO: mapper->Delete( );
+    mapper->Delete( );
 
   } // fi
 }