[Insight-users] NaryFunctorImageFilter Bug?
Sah Rayman
sahrayman at yahoo.com
Wed, 25 Feb 2004 16:16:29 -0800 (PST)
Lius,
In fact, I need something with 4 inputs. My personal
feeling is that iterator is much more easier to use in
this case.
Thanks for the help again.
Sah
--- Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
> Hi Sah,
>
>
> Thanks for pointing this out.
>
> This is actually a bug / design overlook.
>
> The simple solution in your case is to use
> the
>
>
> itkTernaryFunctorImageFilter
>
>
> which actually invokes the Functor with
> three arguments.
>
>
> As far as the itkNaryFunctorImageFitler is
> concerned we should probably make the signature
> of the functor to expect a FixedArray<> or an
> Array<> as input so we can pass arbitrary numbers
> of parameters to the functor.
>
> This issue has been entered in the Bug database
> as Bug #628.
>
>
http://www.itk.org/Bug/bug.php?op=show&bugid=628&pos=14
>
>
>
> Please let us know if you have further questions.
>
>
> Thanks
>
>
> Luis
>
>
>
> ----------------------
> Sah Rayman wrote:
>
> > 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
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools