]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageUndoRedo.cxx
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageUndoRedo.cxx
index ab2219edbe40fe24aaaef4fd9efb43b7578f71e0..4e981c4e89e18d2bb35d4e7efd1be201636324db 100755 (executable)
@@ -70,7 +70,14 @@ void ImageUndoRedo::Redo( )
 void ImageUndoRedo::SetImage( VTKImageDataPointerType image )
 {
        this->m_CurrentImage = image;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_CurrentImage->Update( );
+#else
+       // ..
+#endif
+
        this->UpdateUndoImage( );
 }
 // ----------------------------------------------------------------------------------
@@ -97,10 +104,20 @@ void ImageUndoRedo::SetURImages( ImageMManagerType* imMManager )
 // ----------------------------------------------------------------------------------
 void ImageUndoRedo::UpdateUndoImage( )
 {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_CurrentImage->Update( );
+#else
+       // ...
+#endif
        this->m_UndoImage = VTKImageDataPointerType::New( );
        this->m_UndoImage->DeepCopy( m_CurrentImage );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        this->m_UndoImage->Update( );
+#else
+       // ..
+#endif
 }
 // ----------------------------------------------------------------------------------
 ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
@@ -110,9 +127,21 @@ ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
        extract->SetVOI( region.minX, region.maxX, region.minY, region.maxY,
                region.minZ, region.maxZ );
        extract->SetSampleRate( 1, 1, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        extract->SetInput( img );
+#else
+       extract->SetInputData( img );
+#endif
        VTKImageDataPointerType imgResult = extract->GetOutput( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        imgResult->Update( );
+#else
+       // ..
+#endif
+
        return ( imgResult );
 }
 // ----------------------------------------------------------------------------------