]> Creatis software - clitk.git/blobdiff - vv/vvSlicerManager.cxx
Remove debug verbose
[clitk.git] / vv / vvSlicerManager.cxx
index e975da28babd5ee04bdb31120ccd77bd50b5412f..5afe71bd9a2df0ce2f5265916ba47f787a2ad78d 100644 (file)
@@ -351,7 +351,7 @@ bool vvSlicerManager::SetFusionSequence(std::vector<std::string> filenames, int
        }\r
 \r
        //adjust the time slider in the overlay panel\r
-       mFusionSequenceNbFrames = mFusionSequenceReader->GetOutput()->GetTransform().size()-1; //actually, this is the maximum index...\r
+       mFusionSequenceNbFrames = mFusionSequenceReader->GetOutput()->GetTransform().size()\r
        mFusionSequenceFrameIndex = std::max<int>( 0, std::min<int>(mFusionSequenceFrameIndex, mFusionSequenceNbFrames));\r
 \r
        return true;\r
@@ -965,6 +965,10 @@ void vvSlicerManager::ReloadFusion()
 //the secondary sequence is being reloaded.\r
 void vvSlicerManager::ReloadFusionSequence()\r
 {\r
+  //  this is to keep the slice thickness, which needs to be artificially increased for visualization\r
+  double sp_x, sp_y, sp_z;\r
+  this->GetImage()->GetVTKImages()[0]->GetSpacing(sp_x, sp_y, sp_z);\r
+\r
   mFusionSequenceReader->Update(mImage->GetNumberOfDimensions(),mFusionComponent.c_str(),vvImageReader::MERGEDWITHTIME);\r
 \r
   for ( unsigned int i = 0; i < mSlicers.size(); i++) {\r
@@ -984,6 +988,13 @@ void vvSlicerManager::ReloadFusionSequence()
          this->AddFusionSequenceInitialTransformMatrices( mFusionSequenceReader->GetOutput()->GetTransform()[i]->GetMatrix() );\r
   }\r
 \r
+  //  also update the slice thickness\r
+  for (unsigned i=0 ; i<this->GetImage()->GetTransform().size() ; i++) {\r
+    sp_x = this->GetImage()->GetVTKImages()[i]->GetSpacing()[0];\r
+    sp_y = this->GetImage()->GetVTKImages()[i]->GetSpacing()[1];\r
+    this->GetImage()->GetVTKImages()[i]->SetSpacing( sp_x, sp_y, sp_z);\r
+  }\r
+\r
 }\r
 //----------------------------------------------------------------------------\r
 \r