X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolCropImage.cxx;h=539e30ef9ea892727b49348220e9e9e8c2333eae;hb=72c516346c3a550e2d34a7635f5f41061a16306c;hp=c3b55709722033a6445b9b3d0fb0c239ec1d5628;hpb=6194949c0beb1589904e22381b9aba1bbface172;p=clitk.git diff --git a/vv/vvToolCropImage.cxx b/vv/vvToolCropImage.cxx index c3b5570..539e30e 100644 --- a/vv/vvToolCropImage.cxx +++ b/vv/vvToolCropImage.cxx @@ -33,6 +33,9 @@ #include // vtk +#include +#include +#include #include #include #include @@ -173,8 +176,11 @@ void vvToolCropImage::InputIsSelected(vvSlicerManager * slicer) spin_zmin->setHidden(true); spin_zmax->setHidden(true); } - +#if VTK_MAJOR_VERSION <= 5 int *a = mCurrentImage->GetFirstVTKImageData()->GetWholeExtent(); +#else + int *a = mCurrentImage->GetFirstVTKImageData()->GetInformation()->Get(vtkDataObject::DATA_EXTENT()); +#endif for(int i=0; i<6; i++){ mInitialExtent[i] = a[i]; mReducedExtent[i] = a[i];