From de86d2ca5f5796d0e198d0342c857af84e7df0f6 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Tue, 4 Sep 2012 13:11:44 +0200 Subject: [PATCH] Fix transform update in sequence of overlay/fusion --- vv/vvSlicer.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) 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) -- 2.47.1