[ITK] Compilation error when changing boundary condition
Nicolas Gallego
nicgallego at gmail.com
Wed Jul 2 12:11:00 EDT 2014
Hi,
I wrote a program that performs an inner product opperation between a
neighborhood and a kernel.
typedef itk::ConstNeighborhoodIterator< ImageType >
NeighborhoodIteratorType;
typedef itk::ImageKernelOperator< TPixel, Dimension > OperatorType;
But when I change the boundary condition as in example [1] as
typedef itk::ConstantBoundaryCondition< ImageType > BoundaryConditionType;
typedef itk::ConstNeighborhoodIterator< ImageType, BoundaryConditionType >
NeighborhoodIteratorType;
typedef itk::ImageKernelOperator< TPixel, Dimension > OperatorType;
I get the following compilation error ( windows 7, itk 4.5, compiler cl
Version 16.00.40219.01 for x64, compilation type Debug)
-----------------------------------------------------------------------------------
erreur : C2664: 'float itk::NeighborhoodInnerProduct<TImage>::operator
()(const itk::Neighborhood<TPixel,VDimension> &,const
itk::Neighborhood<TPixel,VDimension> &) const' : cannot convert parameter 1
from 'NeighborhoodIteratorType' to 'const
itk::Neighborhood<TPixel,VDimension> &'
with
[
TImage=itk::Image<PixelType,3>,
TPixel=float,
VDimension=3
]
and
[
TPixel=float,
VDimension=3
]
Reason: cannot convert from 'NeighborhoodIteratorType' to 'const
itk::Neighborhood<TPixel,VDimension>'
with
[
TPixel=float,
VDimension=3
]
No user-defined-conversion operator available that can perform this
conversion, or the operator cannot be called
----------------------------------------------------------------------------------------
Refering to the context were the actual inner product is performed
typename NeighborhoodInnerProduct< ImageType > innerProduct;
typedef itk::ImageKernelOperator< TPixel, Dimension > OperatorType;
OperatorType imageOperator;
// image operator configuration
for loop on image iterators
outIt.Set( innerProduct( it, imageOperator) );
Any ideas about this issue?
[1] http://www.itk.org/Wiki/ITK/Examples/Iterators/ConstantBoundaryCondition
Nicolás Gallego-Ortiz
Université catholique de Louvain, Belgium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140702/8db30a4b/attachment.html>
More information about the Community
mailing list