[Insight-users] FunctionBase wrapper for classes in itk::Function::

Matthew McCormick (thewtex) matt at mmmccormick.com
Sun Sep 12 14:18:17 EDT 2010


Hi Luis,

On Sun, Sep 12, 2010 at 11:54 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

>
> Hi Matthew,
>
> I'm not sure I understand your question.
>
> So, let me sketch it in code,...
>
> It seems that you want something like:
>
>
> class MyClass
> {
> public:
>
>    class MyFunction
>      {
>      public:
>     };
>
> };
>
>
I was thinking more like

class MyClass
{
public:

private
   FunctionBaseType::Pointer MyFunction;

};



>
> where MyFunction should be any of the functions
> in the itk::Function namespace....
>
> Could you cite an example ?
>
>
>
I made a class and example here
http://gitorious.org/itk-repos/itk-function-base-wrapper
, but I think the more direct approach you suggest below is better, so I
will go with that.  Thanks for the tip!

Matt



> ---
>
> Any reason for not using the Functor approach ?
>
> where your class MyClass is templated over the
> function type.
>
> As in the UnaryFunctorImageFilter ?
>
> template < class TFunctor>
> class MyClass
> {
> public:
>
>     TFunctor MyFunction;
> };
>
>
>
> Please let us know,
>
>
>      Thanks
>
>
>             Luis
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100912/b0eee873/attachment.htm>


More information about the Insight-users mailing list