[Insight-developers] vector images

Lydia Ng lng at statsci.com
Thu Oct 5 22:06:50 EDT 2000


Hi,

I get a compilation error (in VC++6.0) when I try to define a vector image
via:

  typedef itk::Image<itk::Vector<float,2>,3> ImageT;
  ImageT::Pointer image = ImageT::New();


The error I get is:

f:\lng\projects\insight\insight\code\common\itkpixeltraits.h(54) : error
C2039: 'ScalarValueType' : is not a member of 'Vector<float,2>'
        f:\lng\projects\insight\insight\code\common\itkimage.h(96) : see
reference to class template instantiation 'itk::ScalarTraits<class
itk::Vector<float,2> >' being compiled

The error occurs in the defintion of the ScalarTraits<class T>
(line 54 itkPixelTraits.h):
  static typename NumericTraits<typename T::ScalarValueType>::ValueType&
    GetScalar(T& v) {return v.GetScalar();}

This used to work when the template parameter for NumericsTraits
was T::ValueType instead of T::ScalarValueType.

Perhaps it is suppose to be ScalarValueType instead of T::ScalarValueType?

Cheers,
Lydia







More information about the Insight-developers mailing list