From: Simon Rit Date: Tue, 30 Oct 2012 10:50:05 +0000 (+0100) Subject: Fixed slice error: check that it is in extent before updating extents X-Git-Tag: v1.4.0~281^2~1^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d6a42415475f71b3d7299d722c6e80bb2f88ff57;p=clitk.git Fixed slice error: check that it is in extent before updating extents --- diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index a915a6b..d3a8dec 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -904,15 +904,15 @@ void vvSlicer::UpdateDisplayExtent() return; } input->UpdateInformation(); + this->SetSlice( this->GetSlice() ); //SR: make sure the update let the slice in extents // Local copy of extent int w_ext[6]; int* ext = GetExtent(); copyExtent(ext, w_ext); // Set slice value - int s = this->Slice > ext[this->SliceOrientation*2+1] ? ext[this->SliceOrientation*2 + 1] : this->Slice; - w_ext[ this->SliceOrientation*2 ] = s; - w_ext[ this->SliceOrientation*2+1 ] = s; + w_ext[ this->SliceOrientation*2 ] = this->Slice; + w_ext[ this->SliceOrientation*2+1 ] = this->Slice; // Image actor this->ImageActor->SetDisplayExtent(w_ext);