]> Creatis software - clitk.git/commitdiff
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 1 Feb 2013 06:59:30 +0000 (07:59 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 1 Feb 2013 06:59:30 +0000 (07:59 +0100)
1  2 
tools/clitkImageArithmGenericFilter.txx

index 4abb43343463652f899748d818f7d5bea3682d20,4c2f0a58c6ef1f32cf858ddb5a02cfef31c0a722..f3040750d6f8cb61b81ffb9052f511ad579cd761
@@@ -45,8 -45,6 +45,6 @@@ template<unsigned int Dim
  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);
  }
  //--------------------------------------------------------------------
  
@@@ -393,18 -391,6 +391,18 @@@ void clitk::ImageArithmGenericFilter<ar
        ++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);