]> Creatis software - creaRigidRegistration.git/blobdiff - lib/Convolution.cxx
#3113 crea Rigid Registration Bug New Normal - branch vtk7itk4 compilation with...
[creaRigidRegistration.git] / lib / Convolution.cxx
index adddb961ec87ce30c678d2d82bfa9d4b1c0101bd..796a0597d1d20e4b397d9796e178008369ac0032 100644 (file)
@@ -55,7 +55,12 @@ vtkImageData *Convolution::getImage()
 void Convolution::setImage(vtkImageData *image)
 {
        _image = image;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _convolve->SetInput(_image);
+#else
+       _convolve->SetInputData(_image);
+#endif
 }
 
 void Convolution::setFactor(double factor)
@@ -75,13 +80,23 @@ void Convolution::Run()
                double kernel[] = {0.0,1.0,0.0,1.0,-_factor,1.0,0.0,1.0,0.0};
                _convolve->SetKernel3x3(kernel);
                _convolve->Update();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _cast->SetInput(_convolve->GetOutput());
+#else
+               _cast->SetInputData(_convolve->GetOutput());
+#endif
                //_cast->SetOutputScalarTypeToDouble();
                _cast->Update();
        }
        else
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _cast->SetInput(_image);
+#else
+               _cast->SetInputData(_image);
+#endif
                _cast->SetOutputScalarType(_image->GetScalarType());
                _cast->Update();
        }