From: srit Date: Mon, 17 Jan 2011 14:48:58 +0000 (+0000) Subject: Removed specific autoscale for unsigned_char and short X-Git-Tag: v1.2.0~270 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=569b31e2cf816ff6b5000189220d33e91c7ba47b;p=clitk.git Removed specific autoscale for unsigned_char and short --- diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index ac2afc4..ccb767c 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -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;