X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicer.cxx;h=1c486bc786213e22bc1e7d82342dbf2a04ed8644;hb=a0b0efabb1aadd2422cb32f4173f3ffecc041ab0;hp=77f75356314da830272042bfd5754b23d4a8a6e4;hpb=dd5f76100aae9f0a2dc7163327163ffceb37b07e;p=clitk.git diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 77f7535..1c486bc 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1265,12 +1265,22 @@ void vvSlicer::Render() double X = (mCurrent[0] - this->GetInput()->GetOrigin()[0])/this->GetInput()->GetSpacing()[0]; double Y = (mCurrent[1] - this->GetInput()->GetOrigin()[1])/this->GetInput()->GetSpacing()[1]; double Z = (mCurrent[2] - this->GetInput()->GetOrigin()[2])/this->GetInput()->GetSpacing()[2]; + +// if (X < this->GetInput()->GetWholeExtent()[0]) X = this->GetInput()->GetWholeExtent()[0]; +// else if (X > this->GetInput()->GetWholeExtent()[1]) X = this->GetInput()->GetWholeExtent()[1]; +// if (Y < this->GetInput()->GetWholeExtent()[2]) Y = this->GetInput()->GetWholeExtent()[2]; +// else if (Y > this->GetInput()->GetWholeExtent()[3]) Y = this->GetInput()->GetWholeExtent()[3]; +// if (Z < this->GetInput()->GetWholeExtent()[4]) Z = this->GetInput()->GetWholeExtent()[4]; +// else if (Z > this->GetInput()->GetWholeExtent()[5]) Z = this->GetInput()->GetWholeExtent()[5]; + if (X >= this->GetInput()->GetWholeExtent()[0] && X <= this->GetInput()->GetWholeExtent()[1] && Y >= this->GetInput()->GetWholeExtent()[2] && Y <= this->GetInput()->GetWholeExtent()[3] && Z >= this->GetInput()->GetWholeExtent()[4] && Z <= this->GetInput()->GetWholeExtent()[5]) { + + int ix, iy, iz; double value = this->GetScalarComponentAsDouble(this->GetInput(), X, Y, Z, ix, iy, iz); @@ -1390,7 +1400,7 @@ void vvSlicer::SetSlice(int slice) this->UpdateDisplayExtent(); // Seems to work without this line - // this->Render(); + //this->Render(); } //----------------------------------------------------------------------------