[Insight-users] Question about ItkAndImageFilter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Mar 13 02:22:47 EST 2007


Hi,

It seem that your AndImageFilter is used with a float pixel type. float  
doesn't support the & operator in c++.
You may want to use the MaskImageFilter instead, or cast your image to an  
integral pixel type with CastImageFilter.

Regards,

Gaetan



Le Mon, 12 Mar 2007 10:05:29 +0100, <qxue at jouy.inra.fr> a écrit:

> Hello, everyone:
>
>    I am using the "ItkAndImageFilter" in VC6.0 in Windows XP by  
> CMake2.4. When I
> add the ITKAndImageFilter to my program, there are errors as following:
>
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(64)  
> :
> error C2296: '&' : illegal, left operand has type 'const float'
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(63)
> : while compiling class-template member function 'float __thiscall
> itk::Functor::AND<float,float,float>::operator ()(const float &,const  
> float &)'
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(64)  
> :
> error C2297: '&' : illegal, right operand has type 'const float'
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(63)
> : while compiling class-template member function 'float __thiscall
> itk::Functor::AND<float,float,float>::operator ()(const float &,const  
> float &)'
> CellularSegmentationApplication.cxx
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(64)  
> :
> error C2296: '&' : illegal, left operand has type 'const float'
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(63)
> : while compiling class-template member function 'float __thiscall
> itk::Functor::AND<float,float,float>::operator ()(const float &,const  
> float &)'
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(64)  
> :
> error C2297: '&' : illegal, right operand has type 'const float'
> C:\DOCUME~1\qxue\MESDOC~1\ITK\INSIGH~1.0\Code\BASICF~1\itkAndImageFilter.h(63)
> : while compiling class-template member function 'float __thiscall
> itk::Functor::AND<float,float,float>::operator ()(const float &,const  
> float &)'
>
>       I have used other filters from ITK and there are fine.
>
>       Who can give me a help to resolve it?
>
>       Best regards,
> XueQuan
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-users mailing list