[Insight-developers] Re: [Insight-users] Importing itk module generated by WrapITK is slow

Zachary Pincus zpincus at stanford.edu
Tue Apr 4 10:59:58 EDT 2006


ITK Devs -

Are we still holding off on checkins to ITK CVS for any reason? Kent  
found a minor bug in the coverage of NumericTraits (see below) that  
would be good to get into the CVS because folks trying out WrapITK  
seem to be running into this limitation somewhat frequently.

Zach


On Mar 28, 2006, at 4:02 PM, Kent Williams wrote:

> I ran into the WRAP_rgb_unsigned_short problem with WrapITK and TCL  
> Wrapping.  This is fixable with a simple patch, included below. I  
> haven't checked it into ITK CVS yet because I guess we're supposed  
> to be holding off on checkins.
>
>
> cvs diff -c2 itkNumericTraits*
> Index: itkNumericTraitsRGBPixel.cxx
> ===================================================================
> RCS file: /cvsroot/Insight/Insight/Code/Common/ 
> itkNumericTraitsRGBPixel.cxx,v
> retrieving revision 1.3
> diff -c -2 -r1.3 itkNumericTraitsRGBPixel.cxx
> *** itkNumericTraitsRGBPixel.cxx    9 Jan 2005 15:58:08 -0000    1.3
> --- itkNumericTraitsRGBPixel.cxx    28 Mar 2006 21:59:34 -0000
> ***************
> *** 22,25 ****
> --- 22,27 ----
>  const RGBPixel<unsigned char>  NumericTraits<RGBPixel<unsigned  
> char> >::Zero = RGBPixel<unsigned char>( NumericTraits<unsigned  
> char>::Zero );
>  const RGBPixel<unsigned char>  NumericTraits<RGBPixel<unsigned  
> char> >::One = RGBPixel<unsigned char>( NumericTraits<unsigned  
> char>::One );
> + const RGBPixel<unsigned short>  NumericTraits<RGBPixel<unsigned  
> short> >::Zero = RGBPixel<unsigned short>( NumericTraits<unsigned  
> short>::Zero );
> + const RGBPixel<unsigned short>  NumericTraits<RGBPixel<unsigned  
> short> >::One = RGBPixel<unsigned short>( NumericTraits<unsigned  
> short>::One );
>   } // end namespace itk
> cvs diff: I know nothing about itkNumericTraitsRGBPixel.cxx.~1.3.~
> Index: itkNumericTraitsRGBPixel.h
> ===================================================================
> RCS file: /cvsroot/Insight/Insight/Code/Common/ 
> itkNumericTraitsRGBPixel.h,v
> retrieving revision 1.8
> diff -c -2 -r1.8 itkNumericTraitsRGBPixel.h
> *** itkNumericTraitsRGBPixel.h    8 Aug 2005 19:18:22 -0000    1.8
> --- itkNumericTraitsRGBPixel.h    28 Mar 2006 21:59:34 -0000
> ***************
> *** 43,46 ****
> --- 43,65 ----
>    };
> + /** \class NumericTraits<RGBPixel<unsigned short> >
> +  * \brief Define traits for type RGBPixel<unsigned char>.
> +  * \ingroup DataRepresentation
> +  */
> + template <>
> + class NumericTraits<RGBPixel<unsigned short> > {
> + public:
> +   typedef RGBPixel<unsigned char> ValueType;
> +   typedef RGBPixel<unsigned char> PrintType;
> +   typedef RGBPixel<unsigned char> AbsType;
> +   typedef RGBPixel<unsigned short> AccumulateType;
> +   typedef RGBPixel<double> RealType;
> +   typedef double           ScalarRealType;
> +   typedef RGBPixel<float>  FloatType;
> +   static const RGBPixel<unsigned short> ITKCommon_EXPORT Zero;
> +   static const RGBPixel<unsigned short> ITKCommon_EXPORT One;
> +   static ValueType ZeroValue() { return Zero; }
> +  + };
>  } // end namespace itk
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-developers mailing list