Hi Luis,<br><br><div class="gmail_quote">On Sun, Sep 12, 2010 at 11:54 AM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>Hi Matthew,<br><br>I'm not sure I understand your question.<br><br>So, let me sketch it in code,...<br><br>It seems that you want something like:<br><br><br>class MyClass <br>{<br>public:<br><br> class MyFunction<br>
{<br> public:<br> };<br><br>};<br><br></blockquote><div><br></div><div>I was thinking more like</div><div><br></div><div><div>class MyClass </div><div>{</div><div>public:</div><div><br></div><div>private</div>
<div> FunctionBaseType::Pointer MyFunction;</div><div><br></div><div>};</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>where MyFunction should be any of the functions<br>
in the itk::Function namespace....<br><br>Could you cite an example ?<br><br><br></blockquote><div><br></div><div>I made a class and example here</div><div><a href="http://gitorious.org/itk-repos/itk-function-base-wrapper">http://gitorious.org/itk-repos/itk-function-base-wrapper</a></div>
<div>, but I think the more direct approach you suggest below is better, so I will go with that. Thanks for the tip!</div><div><br></div><div>Matt</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
---<br><br>Any reason for not using the Functor approach ?<br>
<br>where your class MyClass is templated over the<br>function type.<br><br>As in the UnaryFunctorImageFilter ?<br><br>template < class TFunctor><br>class MyClass<br>{<br>public:<br><br> TFunctor MyFunction;<br>
};<br>
<br><br><br>Please let us know,<br><br><br> Thanks<br><br><br> Luis<br><br><br><br>
</blockquote></div><br>