[Insight-developers] template over index and point in ImageBase.h

Luis Ibanez luis.ibanez at kitware.com
Sat Oct 16 14:55:52 EDT 2010


Hi Gang,

This looks reasonable.

It would have to complemented with the
implementation of the casting inside of the
methods.

Would you like to prepare a patch and submit it ?


    Thanks


          Luis


-------------------------------------------
On Wed, Oct 13, 2010 at 6:07 PM, gang song <songgang97 at gmail.com> wrote:

> Hi,
>
> I have a question about the prototype of some member function  in ImageBase.h
>
> Is it better to set template over index and point separately, in order to avoid call index.CastFrom() / point.CastFrom() ? There are a bunch of such functions.
>
> Example:
>
> change from
>
>   template<class TCoordRep>
>   void TransformContinuousIndexToPhysicalPoint(
>             const ContinuousIndex<TCoordRep, VImageDimension>& index,
>             Point<TCoordRep, VImageDimension>& point        ) const
>
> to
>
>   template<class TCoordRep1, class TTCoordRep2>
>
>   void TransformContinuousIndexToPhysicalPoint(
>             const ContinuousIndex<TCoordRep1, VImageDimension>& index,
>             Point<TCoordRep2, VImageDimension>& point        ) const
>
>
> Thanks
>
> -Gang
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20101016/fc260856/attachment.htm>


More information about the Insight-developers mailing list