]> Creatis software - clitk.git/blobdiff - vv/vvSlicerManager.cxx
Changment of cursor color value to keep the same color than before VTK8
[clitk.git] / vv / vvSlicerManager.cxx
index e9d1c215fc91b4f6886e74c343bf8c2eddbe5c47..fab1e8d8654bc145b392cce550641c85f92f2d60 100644 (file)
@@ -221,7 +221,7 @@ void vvSlicerManager::SetImage(vvImage::Pointer image)
 
 
 //----------------------------------------------------------------------------
-bool vvSlicerManager::SetImages(std::vector<std::string> filenames, vvImageReader::LoadedImageType type, int n)
+bool vvSlicerManager::SetImages(std::vector<std::string> filenames, vvImageReader::LoadedImageType type, int n, bool patientCoordinateSystem)
 { 
   mType = type;
   std::string fileWithoutExtension = vtksys::SystemTools::GetFilenameWithoutExtension(filenames[0]);
@@ -237,6 +237,8 @@ bool vvSlicerManager::SetImages(std::vector<std::string> filenames, vvImageReade
   if (mReader.IsNull())
     mReader = vvImageReader::New();
   mReader->SetInputFilenames(filenames);
+  if (type == vvImageReader::DICOM)
+    mReader->SetPatientCoordinateSystem(patientCoordinateSystem);
   mReader->Update(type);
 
   mBaseFileName = vtksys::SystemTools::GetFilenameName(vtksys::SystemTools::GetFilenameWithoutLastExtension(mFileName));
@@ -717,7 +719,7 @@ mSlicers[slicer]->GetRegisterExtent(extentImageReslice);
 #endif
   {
     mSlicers[slicer]->UpdateCursorPosition();
-    mSlicers[slicer]->SetCursorColor(10,212,255);
+    mSlicers[slicer]->SetCursorColor(1,0,0);
     mSelectedSlicer = slicer;
 
     switch (mSlicers[slicer]->GetSliceOrientation()) {
@@ -748,9 +750,9 @@ mSlicers[slicer]->GetRegisterExtent(extentImageReslice);
         if (current) { //do not display corner annotation if image is the one picked
           mSlicers[i]->SetCurrentPosition(-VTK_DOUBLE_MAX,-VTK_DOUBLE_MAX,
                                           -VTK_DOUBLE_MAX, mSlicers[slicer]->GetMaxCurrentTSlice());
-          mSlicers[i]->SetCursorColor(255,10,212);
+          mSlicers[i]->SetCursorColor(0,0.96,0.17);
         } else {
-          mSlicers[i]->SetCursorColor(150,10,282);
+          mSlicers[i]->SetCursorColor(0.41,0.96,1);
         }
         switch (mSlicers[i]->GetSliceOrientation()) {
         case vtkImageViewer2::SLICE_ORIENTATION_XY:
@@ -1392,7 +1394,6 @@ void vvSlicerManager::SetLocalColorWindowing(const int slicer, const bool bCtrlK
     this->SetColorLevel(0.5*(min+max));
     this->SetPreset(WL_USER);
   }
-  this->Render();
   this->UpdateWindowLevel();
 }
 //----------------------------------------------------------------------------
@@ -1625,6 +1626,13 @@ void vvSlicerManager::AddLandmarkProfile(float x,float y,float z,float t)
 }
 //----------------------------------------------------------------------------
 
+//----------------------------------------------------------------------------
+void vvSlicerManager::UpdateLandmark()
+{
+    this->GetLandmarks()->TransformUpdate(mSlicers[mSelectedSlicer]->GetConcatenatedTransform()->GetInverse());
+}
+//----------------------------------------------------------------------------
+
 //----------------------------------------------------------------------------
 void vvSlicerManager::PrevImage(int slicer)
 {