]> Creatis software - clitk.git/commitdiff
Apply log before casting back to pixel type
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Thu, 18 Apr 2013 15:48:45 +0000 (17:48 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Thu, 18 Apr 2013 15:48:45 +0000 (17:48 +0200)
tools/clitkImageArithmGenericFilter.txx

index f3040750d6f8cb61b81ffb9052f511ad579cd761..37fa000d3c3e402a1dac421696e070ed8f4f4e90 100644 (file)
@@ -397,7 +397,7 @@ void clitk::ImageArithmGenericFilter<args_info_type>::ComputeImage(Iter1 it, Ite
         ito.Set(-log(0.5 / mScalar) );
       }
       else {
-        ito.Set(-log(PixelTypeDownCast<double, PixelType>((double)it.Get() / mScalar)) );
+        ito.Set(PixelTypeDownCast<double, PixelType>(-log((double)it.Get() / mScalar)) );
       }
       ++it;
       ++ito;