[Insight-users] LaplacianImageFilter only works on float or double images?
robert tamburo
robert.tamburo at gmail.com
Fri Dec 3 15:02:11 EST 2010
If you're interested in a workaround, you can use CastImageFilter to cast to
an image of floating point pixels.
On Fri, Dec 3, 2010 at 2:40 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
> 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
> >
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101203/e72567bf/attachment.htm>
More information about the Insight-users
mailing list