[Insight-developers] Tensor anisotropy filters template default

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 1 16:35:47 EST 2006


Hi Casey,

I agree with you in that this filter has a quite specific output
type and it would be healthy to enforce it at compilation time.


The issue at this point will be to respect the Backward Compatibility
Policy (BCP) as stated in:

http://www.insightsoftwareconsortium.org/wiki/index.php/Administration-BackwardCompatibility



which says:


API's can change if:

    1. The compiler, if possible, can warn the user about the
       deprecated API. Some compilers show line numbers where
       the deprecated API is being used.

    2. At run-time, deprecated API's report how to change code
       from the old API to the new API.

    3. Documentation in the deprecated code clearly informs the
       user how to move the code from the old API to the new API.



In this particular case, it seems that we could use the Concept
Checking in order to enforce the use of the correct output image
type while still respecting the BCP.


Please let us know if you could find this to be a reasonable compromise,


    Thanks


      Luis


----------------------
Casey Goodlett wrote:
> Hello,
> 
> There is a small bug in itkTensorFractionalAnisotropyImageFilter.h and
> itkTensorRelativeAnisotropyImageFilter.h.  Both filters use a default
> template parameter of TOutputImage=TInputImage.  This is an invalid
> default since these filters map from tensors -> scalars.  A better
> default would be the following
> 
> template <typename TInputImage,
>           typename TOutputImage=itk::Image<ITK_TYPENAME
> 	                          TInputImage::PixelType::RealValueType,
>   ::itk::GetImageDimension<TInputImage>::ImageDimension > >
> 
> I filed this bug at http://www.itk.org/Bug/bug.php?op=show&bugid=2899&pos=0
> 
> Thanks
> 
> --
> Casey Goodlett
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 
> 



More information about the Insight-developers mailing list