If you're interested in a workaround, you can use CastImageFilter to cast to an image of floating point pixels.<div><div><br><div class="gmail_quote">On Fri, Dec 3, 2010 at 2:40 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We try to protect the user. It was a design decision by the itk developers.<br>
<br>
Not sure why you got that error.<br>
<div><div></div><div><br>
On Fri, Dec 3, 2010 at 2:29 PM, David Doria <<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>> wrote:<br>
> On Fri, Dec 3, 2010 at 2:04 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:<br>
>> All of the edge detection filters require "float" data types. I assume<br>
>> this os because edge detection is sensitive to noise (and probably<br>
>> truncation errors). As a test you could turn off concept checking and<br>
>> compare an unsigned char result with a float result.<br>
><br>
> Even with concept checking off, I get errors. Shouldn't it be the<br>
> user's responsibility to be aware of the truncation errors you<br>
> mentioned?<br>
><br>
> typedef itk::Image< float, 2 > FloatImageType;<br>
> typedef itk::Image< unsigned char, 2 > UnsignedCharImageType;<br>
> typedef itk::LaplacianImageFilter<<br>
> UnsignedCharImageType, FloatImageType > filterType;<br>
><br>
> /media/portable/Examples/c++/src/ITK/LaplacianImageFilter/LaplacianImageFilter.cxx:112:<br>
> instantiated from here<br>
> /home/doriad/src/ITK/Code/BasicFilters/itkLaplacianImageFilter.txx:123:<br>
> error: no matching function for call to<br>
> ‘itk::NeighborhoodOperatorImageFilter<itk::Image<unsigned char, 2u>,<br>
> itk::Image<float, 2u>,<br>
> float>::OverrideBoundaryCondition(itk::ZeroFluxNeumannBoundaryCondition<itk::Image<float,<br>
> 2u> >*)’<br>
> /home/doriad/src/ITK/Code/BasicFilters/itkNeighborhoodOperatorImageFilter.h:114:<br>
> note: candidates are: void<br>
> itk::NeighborhoodOperatorImageFilter<TInputImage, TOutputImage,<br>
> TOperatorValueType>::OverrideBoundaryCondition(itk::ImageBoundaryCondition<TImage>*)<br>
> [with TInputImage = itk::Image<unsigned char, 2u>, TOutputImage =<br>
> itk::Image<float, 2u>, TOperatorValueType = float]<br>
><br>
> David<br>
><br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br>
</div></div>