[Insight-developers] Get vs. Compute

Luis Ibanez luis.ibanez at kitware.com
Sun May 29 09:04:40 EDT 2011


Hi Nick,

Is this for a Filter-like class ?
or for a Calculator-like class ?

In a Filter, you may want to stick to using "Get" only
to return values of (or references to) member variables.

In a Calculator, we have used "Get" in the past to do
both : trigger the computation, and return the outcome.

Note also, that now that the DataObjectDecorators
are available, there is less motivation for having
"Calculator" classes, and we could always have
"Filter" classes, since their output can now be
simple data types (decorated as objects).


    Luis


------------------------------------------------------------------
On Fri, May 27, 2011 at 2:00 PM, Nicholas Tustison <ntustison at gmail.com> wrote:
> Hi all,
>
> I remember seeing information somewhere about guidelines for
>  nomenclature of functions and I was hoping somebody could point
> me to it.  Or maybe i'm misremembering but I was hoping somebody
> could help me out.
>
> Specifically, for example, is there some guidelines as to whether or
> not one should name a function GetValue() vs. ComputeValue() vs.
> GenerateValue() vs. CalculateValue(), etc.?
>
> Thanks,
> Nick
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list