X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvImageContour.cxx;h=8fb22ae4d000428bd0fb50317b2843fa22372c80;hb=3a823a03d4a2217e41e4dd3b05a8ea825bb762a5;hp=4fecf93e9371f52703dfc9634899547f74965f11;hpb=c1f8fb924289d20bfc4b266e24ef52173df58b61;p=clitk.git diff --git a/vv/vvImageContour.cxx b/vv/vvImageContour.cxx index 4fecf93..8fb22ae 100644 --- a/vv/vvImageContour.cxx +++ b/vv/vvImageContour.cxx @@ -18,6 +18,7 @@ #include "vvImageContour.h" #include "vvImage.h" +#include #include #include #include @@ -82,7 +83,11 @@ void vvImageContour::SetSlicer(vvSlicer * slicer) { //------------------------------------------------------------------------------ void vvImageContour::SetImage(vvImage::Pointer image) { for (unsigned int numImage = 0; numImage < image->GetVTKImages().size(); numImage++) { +#if VTK_MAJOR_VERSION <= 5 mClipperList[numImage]->SetInput(image->GetVTKImages()[numImage]); +#else + mClipperList[numImage]->SetInputData(image->GetVTKImages()[numImage]); +#endif } mHiddenImageIsUsed = true; mHiddenImage = image; @@ -295,13 +300,27 @@ void vvImageContour::CreateNewActor(int numImage) { vtkSmartPointer squares = vtkSmartPointer::New(); vtkSmartPointer squaresMapper = vtkSmartPointer::New(); - if (mHiddenImageIsUsed) + if (mHiddenImageIsUsed) { +#if VTK_MAJOR_VERSION <= 5 clipper->SetInput(mHiddenImage->GetVTKImages()[0]); - else +#else + clipper->SetInputData(mHiddenImage->GetVTKImages()[0]); +#endif + } else { +#if VTK_MAJOR_VERSION <= 5 clipper->SetInput(mSlicer->GetImage()->GetVTKImages()[numImage]); - +#else + clipper->SetInputData(mSlicer->GetImage()->GetVTKImages()[numImage]); +#endif + } + +#if VTK_MAJOR_VERSION <= 5 squares->SetInput(clipper->GetOutput()); squaresMapper->SetInput(squares->GetOutput()); +#else + squares->SetInputData(clipper->GetOutput()); + squaresMapper->SetInputData(squares->GetOutput()); +#endif squaresMapper->ScalarVisibilityOff(); squaresActor->SetMapper(squaresMapper); squaresActor->GetProperty()->SetColor(1.0,0,0);