]> Creatis software - clitk.git/blobdiff - vv/vvSlicerManager.cxx
Open Dicom with imaging machine coordinate system (Identity matrix) by default
[clitk.git] / vv / vvSlicerManager.cxx
index e9d1c215fc91b4f6886e74c343bf8c2eddbe5c47..089001cabb1dc23c778427fe0beebdc7c9ef235f 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));
@@ -1625,6 +1627,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)
 {