[Insight-developers] Appropriateness of filter data types

Luis Ibanez ibanez@choroid.cs.unc.edu
Wed, 4 Apr 2001 13:28:00 -0400 (EDT)


> Doing manual instantiations with CABLE has underscored the fact that not
> all data types are really appropriate for our filters.  The stuff we are
> doing here at Utah assumes the precision of floats or doubles.  Supporting
> other data types directly is of dubious value and will potentially
> confuse the user.

Agree, we'll have the same limitation in registration.

I wonder if maybe the way to go is to specify in CABLE
which specific types make sense for each class.

That should allow to restrict the instantiation of some
classes just to floats and doubles.



>
> Don't yet know the mechanism of this conversion.  Ideally, we would use
> partial template specialization to implement filters for float and double
> types and then introduce copying for the default case.  VC++, of course,
> does not allow us to do this.  So we may have to fall back on a less
> optimal RTTI mechanism.  Any suggestions?  If others have a need for this
> capability, we could work out a common methodology.
>

Maybe the use of NumericTraits could provide this functionality,
something like:

   float   NumericTraits<myRealType>::GetFloat();
   double  NumericTraits<myRealType>::GetDouble();






Luis