X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=5afe71bd9a2df0ce2f5265916ba47f787a2ad78d;hb=58f48784852ac6897f690a9ccbb2519ab8e5d9b6;hp=24ec62a36d6d8473d0a6c8cb61aa34b067362cce;hpb=3abd767ea72e82f5f3de805917014a0ae2a71da9;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 24ec62a..5afe71b 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -965,6 +965,10 @@ void vvSlicerManager::ReloadFusion() //the secondary sequence is being reloaded. void vvSlicerManager::ReloadFusionSequence() { + // this is to keep the slice thickness, which needs to be artificially increased for visualization + double sp_x, sp_y, sp_z; + this->GetImage()->GetVTKImages()[0]->GetSpacing(sp_x, sp_y, sp_z); + mFusionSequenceReader->Update(mImage->GetNumberOfDimensions(),mFusionComponent.c_str(),vvImageReader::MERGEDWITHTIME); for ( unsigned int i = 0; i < mSlicers.size(); i++) { @@ -984,6 +988,13 @@ void vvSlicerManager::ReloadFusionSequence() this->AddFusionSequenceInitialTransformMatrices( mFusionSequenceReader->GetOutput()->GetTransform()[i]->GetMatrix() ); } + // also update the slice thickness + for (unsigned i=0 ; iGetImage()->GetTransform().size() ; i++) { + sp_x = this->GetImage()->GetVTKImages()[i]->GetSpacing()[0]; + sp_y = this->GetImage()->GetVTKImages()[i]->GetSpacing()[1]; + this->GetImage()->GetVTKImages()[i]->SetSpacing( sp_x, sp_y, sp_z); + } + } //----------------------------------------------------------------------------