]> Creatis software - clitk.git/blobdiff - vv/vvMainWindow.cxx
Added mha next to mhd (similar but in one file)
[clitk.git] / vv / vvMainWindow.cxx
index 882bc2b16d631c7cf68233f30ac3fe0c3640cf81..3d8c51a5a78f2ed85a0e61bc293a9599b7f584c4 100644 (file)
@@ -2007,6 +2007,7 @@ void vvMainWindow::OpenField()
     }
 
   QString Extensions = "Images ( *.mhd)";
+  Extensions += ";;Images ( *.mha)";
   Extensions += ";;Images ( *.vf)";
   QString file = QFileDialog::getOpenFileName(this,tr("Load deformation field"),mInputPathName,Extensions);
   if (!file.isEmpty())
@@ -2184,14 +2185,17 @@ void vvMainWindow::SaveAs()
     OutputListeFormat.push_back(".jpeg");
     OutputListeFormat.push_back(".tif");
     OutputListeFormat.push_back(".mhd");
+    OutputListeFormat.push_back(".mha");
     OutputListeFormat.push_back(".hdr");
     OutputListeFormat.push_back(".vox");
   } else if (dimension == 3) {
     OutputListeFormat.push_back(".mhd");
+    OutputListeFormat.push_back(".mha");
     OutputListeFormat.push_back(".hdr");
     OutputListeFormat.push_back(".vox");
   } else if (dimension == 4) {
     OutputListeFormat.push_back(".mhd");
+    OutputListeFormat.push_back(".mha");
   }
   QString Extensions = "AllFiles(*.*)";
   for (int i = 0; i < OutputListeFormat.count(); i++) {
@@ -2493,27 +2497,22 @@ void vvMainWindow::UpdateTSlice(int slicer, int slice)
 void vvMainWindow::UpdateSliceRange(int slicer, int min, int max, int tmin, int tmax)
 {
   int position = int((min+max)/2);
-  int tPosition = int((tmin+tmax)/2);
   if (slicer == 0) {
     NOVerticalSlider->setValue(position);
     NOVerticalSlider->setRange(min,max);
     NOHorizontalSlider->setRange(tmin,tmax);
-    NOHorizontalSlider->setValue(tPosition);
   } else if (slicer == 1) {
     NEVerticalSlider->setValue(position);
     NEVerticalSlider->setRange(min,max);
     NEHorizontalSlider->setRange(tmin,tmax);
-    NEHorizontalSlider->setValue(tPosition);
   } else if (slicer == 2) {
     SOVerticalSlider->setValue(position);
     SOVerticalSlider->setRange(min,max);
     SOHorizontalSlider->setRange(tmin,tmax);
-    SOHorizontalSlider->setValue(tPosition);
   } else if (slicer == 3) {
     SEVerticalSlider->setValue(position);
     SEVerticalSlider->setRange(min,max);
     SEHorizontalSlider->setRange(tmin,tmax);
-    SEHorizontalSlider->setValue(tPosition);
   }
 }
 //------------------------------------------------------------------------------