]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Image.cxx
...
[cpPlugins.git] / lib / cpPlugins / Image.cxx
index 4d9cbd83f1bb43c79f3ddffd8d8331fd54935c62..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,6 +56,7 @@ _CreateVTKActor( ) const
     vtkImageActor* actor = vtkImageActor::New( );
     mapper->SetInputData( image );
     actor->SetMapper( mapper );
+    actor->GetProperty( )->SetInterpolationTypeToNearest( );
     this->m_Actor = actor;
     mapper->Delete( );