]> Creatis software - clitk.git/commitdiff
corrected fusion/overlay refresh
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Mon, 2 Jul 2012 08:42:22 +0000 (10:42 +0200)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Mon, 2 Jul 2012 08:42:22 +0000 (10:42 +0200)
- occurred with 4D and 3D+t images

vv/vvSlicer.cxx
vv/vvSlicerManager.cxx

index 2224a9ac9748dd6abb32b09a79185048f93137fc..ceceb6e4d315ed36c499d642c42946b3ddbb1ad5 100644 (file)
@@ -671,8 +671,6 @@ void vvSlicer::SetTSlice(int t)
   else if ((unsigned int)t >= mImage->GetVTKImages().size())
     t = mImage->GetVTKImages().size() -1;
 
-  if (mCurrentTSlice == t) return;
-
   mCurrentTSlice = t;
   mImageReslice->SetInput( mImage->GetVTKImages()[mCurrentTSlice] );
   if (mVF && mVFActor->GetVisibility()) {
@@ -1177,6 +1175,7 @@ void vvSlicer::GetExtremasAroundMousePointer(double & min, double & max, vtkImag
     corner1[i] = mCurrent[i];
     corner2[i] = mCurrent[i];
   }
+
   this->Renderer->WorldToView(corner1[0], corner1[1], corner1[2]);
   this->Renderer->WorldToView(corner2[0], corner2[1], corner2[2]);
 
index 3f6f9139fc2e1bec9540eb3480dc49c52b2fdc34..c86928f96825f8bc50d4b7778394ed786ccbeefa 100644 (file)
@@ -846,7 +846,8 @@ void vvSlicerManager::Reload()
 //----------------------------------------------------------------------------
 void vvSlicerManager::ReloadFusion()
 {
-  mFusionReader->Update();
+  mFusionReader->Update(mImage->GetNumberOfDimensions(),mFusionComponent.c_str(),mType);
+
   for ( unsigned int i = 0; i < mSlicers.size(); i++) {
     mSlicers[i]->SetFusion(mFusionReader->GetOutput());
     mSlicers[i]->Render();
@@ -858,7 +859,7 @@ void vvSlicerManager::ReloadFusion()
 //----------------------------------------------------------------------------
 void vvSlicerManager::ReloadOverlay()
 {
-  mOverlayReader->Update();
+  mOverlayReader->Update(mImage->GetNumberOfDimensions(),mOverlayComponent.c_str(),mType);
   for ( unsigned int i = 0; i < mSlicers.size(); i++) {
     mSlicers[i]->SetOverlay(mOverlayReader->GetOutput());
     mSlicers[i]->Render();