From: tbaudier Date: Thu, 19 Nov 2015 14:32:27 +0000 (+0100) Subject: Crop Debug Try X-Git-Tag: v1.4.0~92 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b7b0742cc0f489572dbb8d68353e1c7a525b59e5;p=clitk.git Crop Debug Try --- diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 317dc06..9258fdb 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1099,6 +1099,7 @@ void vvSlicer::UpdateDisplayExtent() #if VTK_MAJOR_VERSION <= 5 this->ImageActor->SetDisplayExtent(w_ext); #else + cout << mReducedExtent[0] << " " << mReducedExtent[1] << " " << mReducedExtent[2] << " " << mReducedExtent[3] << " " << mReducedExtent[4] << " " << mReducedExtent[5] << endl; vtkSmartPointer mapperOpenGL= vtkSmartPointer::New(); try { mapperOpenGL = dynamic_cast(GetImageActor()->GetMapper()); diff --git a/vv/vvToolCropImage.cxx b/vv/vvToolCropImage.cxx index 539e30e..9482947 100644 --- a/vv/vvToolCropImage.cxx +++ b/vv/vvToolCropImage.cxx @@ -191,8 +191,10 @@ void vvToolCropImage::InputIsSelected(vvSlicerManager * slicer) } // Set initial sliders values - std::vector imsize = mCurrentSlicerManager->GetImage()->GetSize(); + int w_ext[6], imsize[3]; + mCurrentSlicerManager->GetSlicer(0)->GetRegisterExtent(w_ext); for(int dim=0; dimGetDimension() && dim<3; ++dim){ + imsize[dim] = w_ext[2*dim+1] - w_ext[2*dim] +1; mSliders[dim*2]->setMaximum(imsize[dim]-1); mSliders[dim*2+1]->setMaximum(imsize[dim]-1); mSliders[dim*2+1]->setValue(imsize[dim]-1);