[Insight-users] LaplacianImageFilter only works on float or double images?

Bill Lorensen bill.lorensen at gmail.com
Fri Dec 3 14:40:55 EST 2010


We try to protect the user. It was a design decision by the itk developers.

Not sure why you got that error.

On Fri, Dec 3, 2010 at 2:29 PM, David Doria <daviddoria at gmail.com> wrote:
> On Fri, Dec 3, 2010 at 2:04 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> All of the edge detection filters require "float" data types. I assume
>> this os because edge detection is sensitive to noise (and probably
>> truncation errors).  As a test you could turn off concept checking and
>> compare an unsigned char result with a float result.
>
> Even with concept checking off, I get errors. Shouldn't it be the
> user's responsibility to be aware of the truncation errors you
> mentioned?
>
>  typedef itk::Image< float,  2 >   FloatImageType;
>  typedef itk::Image< unsigned char, 2 >   UnsignedCharImageType;
>  typedef itk::LaplacianImageFilter<
>                  UnsignedCharImageType, FloatImageType >  filterType;
>
> /media/portable/Examples/c++/src/ITK/LaplacianImageFilter/LaplacianImageFilter.cxx:112:
>  instantiated from here
> /home/doriad/src/ITK/Code/BasicFilters/itkLaplacianImageFilter.txx:123:
> error: no matching function for call to
> ‘itk::NeighborhoodOperatorImageFilter<itk::Image<unsigned char, 2u>,
> itk::Image<float, 2u>,
> float>::OverrideBoundaryCondition(itk::ZeroFluxNeumannBoundaryCondition<itk::Image<float,
> 2u> >*)’
> /home/doriad/src/ITK/Code/BasicFilters/itkNeighborhoodOperatorImageFilter.h:114:
> note: candidates are: void
> itk::NeighborhoodOperatorImageFilter<TInputImage, TOutputImage,
> TOperatorValueType>::OverrideBoundaryCondition(itk::ImageBoundaryCondition<TImage>*)
> [with TInputImage = itk::Image<unsigned char, 2u>, TOutputImage =
> itk::Image<float, 2u>, TOperatorValueType = float]
>
> David
>


More information about the Insight-users mailing list