From 7f456873c42a4fe66d38ccb8847bd414dd15e443 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Thu, 18 Apr 2013 17:48:45 +0200 Subject: [PATCH] Apply log before casting back to pixel type --- tools/clitkImageArithmGenericFilter.txx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/clitkImageArithmGenericFilter.txx b/tools/clitkImageArithmGenericFilter.txx index f304075..37fa000 100644 --- a/tools/clitkImageArithmGenericFilter.txx +++ b/tools/clitkImageArithmGenericFilter.txx @@ -397,7 +397,7 @@ void clitk::ImageArithmGenericFilter::ComputeImage(Iter1 it, Ite ito.Set(-log(0.5 / mScalar) ); } else { - ito.Set(-log(PixelTypeDownCast((double)it.Get() / mScalar)) ); + ito.Set(PixelTypeDownCast(-log((double)it.Get() / mScalar)) ); } ++it; ++ito; -- 2.47.1