[Insight-users] NaryFunctorImageFilter Bug?

Sah Rayman sahrayman at yahoo.com
Wed, 25 Feb 2004 02:09:20 -0800 (PST)


Seems I have trouble make NaryFunctorImageFilter
working on 3 or more inputs.

------------- Here are the code ---------------

    typedef int PixelType;
    typedef itk::Image< PixelType, 3> ImageType;

    class TestFunctor3 {
    public:
        inline PixelType operator() (const PixelType
&in1, 
            const PixelType &in2,
            const PixelType &in3) {
                
                return 1;
            }

    };

    class TestFunctor2 {
    public:
        inline PixelType operator() (const PixelType
&in1, 
            const PixelType &in2) {
                
                return 1;
            }

    };


    typedef itk::NaryFunctorImageFilter< ImageType,
ImageType, TestFunctor2> 
        TestFilterType;

    TestFilterType::Pointer myFilter;
------------- End of the code ---------------

Above code compiles fine. 
But if we replace 
typedef itk::NaryFunctorImageFilter< ImageType,
ImageType, TestFunctor2> 
        TestFilterType;
with 
typedef itk::NaryFunctorImageFilter< ImageType,
ImageType, TestFunctor3> 
        TestFilterType;

the compiler will complain:
InsightToolkit-1.6.0\Code\BasicFilters\itkNaryFunctorImageFilter.txx(81)
: error C2064: term does not evaluate to a function
taking 2 arguments

Can someone confirm this is a bug or let me know if I
did something incorrect?

Thanks!




__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools