]> Creatis software - clitk.git/commitdiff
Removed specific autoscale for unsigned_char and short
authorsrit <srit>
Mon, 17 Jan 2011 14:48:58 +0000 (14:48 +0000)
committersrit <srit>
Mon, 17 Jan 2011 14:48:58 +0000 (14:48 +0000)
vv/vvSlicerManager.cxx

index ac2afc43b80d3cc648707a4e0c06469dbc269f2f..ccb767c908aae568ac08b164e5e8f8101a14c1d5 100644 (file)
@@ -1020,18 +1020,10 @@ void vvSlicerManager::SetPreset(int preset)
   std::string component_type=mImage->GetScalarTypeAsITKString();
   switch (preset) {
   case 0:
-    if (component_type == "unsigned_char") {
-      window = 255;
-      level = 127;
-    } else if (component_type == "short") {
-      window = 2000;
-      level = 0;
-    } else {
-      double range[2];
-      mImage->GetScalarRange(range);
-      window = range[1] - range[0];
-      level = (range[1] + range[0])* 0.5;
-    }
+    double range[2];
+    mImage->GetScalarRange(range);
+    window = range[1] - range[0];
+    level = (range[1] + range[0])* 0.5;
     break;
   case 1:
     window = 2000;