void ImageArithmGenericFilter<args_info_type>::InitializeImageType()
{
ADD_DEFAULT_IMAGE_TYPES(Dim);
- ADD_VEC_IMAGE_TYPE(3u,3u,float);
- ADD_VEC_IMAGE_TYPE(3u,3u,double);
}
//--------------------------------------------------------------------
++ito;
}
break;
+ case 13: // -ln I/I0
+ while (!it.IsAtEnd()) {
+ if (it.Get() == 0) { // special case for fluence image with 0 value in a pixel -> consider 0.5
+ ito.Set(-log(0.5 / mScalar) );
+ }
+ else {
+ ito.Set(-log(PixelTypeDownCast<double, PixelType>((double)it.Get() / mScalar)) );
+ }
+ ++it;
+ ++ito;
+ }
+ break;
default: // error ?
std::cerr << "ERROR : the operation number (" << mTypeOfOperation << ") is not known." << std::endl;
exit(-1);