[Insight-developers] Link errors and itk::NumericTraits on Windows

Karthik Krishnan Karthik.Krishnan at kitware.com
Thu Apr 6 16:19:31 EDT 2006


Zachary Pincus wrote:

>> Zach,
>>
>> Please replace line 20 in itkRGBPixel.h with
>> #include "itkNumericTraitsRGBPixel.h"
>>
>> and let us know if that fixes your wrapping issue.
>
>   Thus, everything will break badly if explicit  template 
> instantiations are provided (preventing the txx files from  being 
> included by default).

Yes. I did not consider that. Thanks
Then  the fix is to

include it in the header file after the class declaration.

as in

Pixel.h:
  class Pixel{  ... };
  #include "itkNumericTraitsVariableLengthVectorPixel.h"
  #ifndef ITK_MANUAL_INSTANTIATION
  #include "itkVariableLengthVector.txx"
  #endif

-------------

I agree with Kent that including all the Numeric traits is to shoot 
yourself in the foot as far as compile times go.. The Numeric traits 
files are usually very long 1000 lines.. ( trying to define traits for 
every pixel type and every dimension, every length of the vector.. )

-karthik

>
> I propose therefore that I will make the header files of all of the  
> compound pixel types #include the appropriate NumericTraitsXXXPixel.h  
> headers. Does this seem OK?
>
> Zach
>
>
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list