From: Vivien Delmon Date: Thu, 18 Apr 2013 15:48:45 +0000 (+0200) Subject: Apply log before casting back to pixel type X-Git-Tag: v1.4.0~233^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7f456873c42a4fe66d38ccb8847bd414dd15e443;p=clitk.git Apply log before casting back to pixel type --- 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;