From: Simon Rit Date: Tue, 4 Sep 2012 11:11:44 +0000 (+0200) Subject: Fix transform update in sequence of overlay/fusion X-Git-Tag: v1.4.0~281^2~12 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=de86d2ca5f5796d0e198d0342c857af84e7df0f6;p=clitk.git Fix transform update in sequence of overlay/fusion --- diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index abf6306..cc5662b 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -725,15 +725,25 @@ void vvSlicer::SetTSlice(int t) mVOIFilter->SetInput(mVF->GetVTKImages()[mCurrentTSlice]); } if (mOverlay && mOverlayActor->GetVisibility()) { - if (mOverlay->GetVTKImages().size() > (unsigned int)mCurrentTSlice) { - mCurrentOverlayTSlice = mCurrentTSlice; + if (mOverlay->GetVTKImages().size() > (unsigned int)t) { + mCurrentOverlayTSlice = t; mOverlayReslice->SetInput( mOverlay->GetVTKImages()[mCurrentOverlayTSlice] ); + + // Update overlay transform + mConcatenatedOverlayTransform->Identity(); + mConcatenatedOverlayTransform->Concatenate(mOverlay->GetTransform()[mCurrentOverlayTSlice]); + mConcatenatedOverlayTransform->Concatenate(mSlicingTransform); } } if (mFusion && mFusionActor->GetVisibility()) { - if (mFusion->GetVTKImages().size() > (unsigned int)mCurrentTSlice) { - mCurrentFusionTSlice = mCurrentTSlice; + if (mFusion->GetVTKImages().size() > (unsigned int)t) { + mCurrentFusionTSlice = t; mFusionReslice->SetInput( mFusion->GetVTKImages()[mCurrentFusionTSlice]); + + // Update fusion transform + mConcatenatedFusionTransform->Identity(); + mConcatenatedFusionTransform->Concatenate(mFusion->GetTransform()[mCurrentFusionTSlice]); + mConcatenatedFusionTransform->Concatenate(mSlicingTransform); } } if (mSurfaceCutActors.size() > 0)