<div dir="ltr"><div>Hi Bill, <br><br>thanks for your interest in this issue, <br></div>here the code that reproduces the problem<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Nicolás Gallego-Ortiz<br>
Université catholique de Louvain, Belgium<br></div></div>
<br><br><div class="gmail_quote">2014-07-02 18:46 GMT+02:00 Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you post a complete, compilable example that illustrates the error?<br>
<div><div class="h5"><br>
<br>
On Wed, Jul 2, 2014 at 12:11 PM, Nicolas Gallego <<a href="mailto:nicgallego@gmail.com">nicgallego@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I wrote a program that performs an inner product opperation between a<br>
> neighborhood and a kernel.<br>
><br>
> typedef itk::ConstNeighborhoodIterator< ImageType ><br>
> NeighborhoodIteratorType;<br>
> typedef itk::ImageKernelOperator< TPixel, Dimension > OperatorType;<br>
><br>
> But when I change the boundary condition as in example [1] as<br>
><br>
> typedef itk::ConstantBoundaryCondition< ImageType > BoundaryConditionType;<br>
> typedef itk::ConstNeighborhoodIterator< ImageType, BoundaryConditionType ><br>
> NeighborhoodIteratorType;<br>
> typedef itk::ImageKernelOperator< TPixel, Dimension > OperatorType;<br>
><br>
> I get the following compilation error ( windows 7, itk 4.5, compiler cl<br>
> Version 16.00.40219.01 for x64, compilation type Debug)<br>
><br>
> -----------------------------------------------------------------------------------<br>
> erreur : C2664: 'float itk::NeighborhoodInnerProduct<TImage>::operator<br>
> ()(const itk::Neighborhood<TPixel,VDimension> &,const<br>
> itk::Neighborhood<TPixel,VDimension> &) const' : cannot convert parameter 1<br>
> from 'NeighborhoodIteratorType' to 'const<br>
> itk::Neighborhood<TPixel,VDimension> &'<br>
> with<br>
> [<br>
>     TImage=itk::Image<PixelType,3>,<br>
>     TPixel=float,<br>
>     VDimension=3<br>
> ]<br>
> and<br>
> [<br>
>     TPixel=float,<br>
>     VDimension=3<br>
> ]<br>
> Reason: cannot convert from 'NeighborhoodIteratorType' to 'const<br>
> itk::Neighborhood<TPixel,VDimension>'<br>
> with<br>
> [<br>
>     TPixel=float,<br>
>     VDimension=3<br>
> ]<br>
> No user-defined-conversion operator available that can perform this<br>
> conversion, or the operator cannot be called<br>
> ----------------------------------------------------------------------------------------<br>
><br>
> Refering to the context were the actual inner product is performed<br>
><br>
> typename NeighborhoodInnerProduct< ImageType > innerProduct;<br>
><br>
> typedef itk::ImageKernelOperator< TPixel, Dimension > OperatorType;<br>
><br>
><br>
> OperatorType imageOperator;<br>
><br>
>         // image operator configuration<br>
><br>
> for loop on image iterators<br>
><br>
> outIt.Set( innerProduct( it, imageOperator) );<br>
><br>
><br>
> Any ideas about this issue?<br>
><br>
> [1] <a href="http://www.itk.org/Wiki/ITK/Examples/Iterators/ConstantBoundaryCondition" target="_blank">http://www.itk.org/Wiki/ITK/Examples/Iterators/ConstantBoundaryCondition</a><br>
><br>
> Nicolás Gallego-Ortiz<br>
> Université catholique de Louvain, Belgium<br>
><br>
</div></div>> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org">Community@itk.org</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br></div>