[Insight-developers] Sun Compiler changes and VC7

Lorensen, William E (Research) lorensen at crd.ge.com
Thu Nov 11 07:31:38 EST 2004


Bill,

VC7 is complaining about the new declarations. It wants the class name to
include the template parameters. Since we define Self in each class, the
following compiles fine on VC7.

template <class TInputImage,class TOutputImage,class TDeformationField>
void
WarpImageFilter<TInputImage,TOutputImage,TDeformationField>
::SetOutputOrigin(
  const double origin[Self::ImageDimension] )
{
  PointType p(origin);
  this->SetOutputOrigin(p);
}

I think this is better than

template <class TInputImage,class TOutputImage,class TDeformationField>
void
WarpImageFilter<TInputImage,TOutputImage,TDeformationField>
::SetOutputOrigin(
  const double
origin[WarpImageFilter<TInputImage,TOutputImageSelf,TDeformationField>::Imag
eDimension] )
{
  PointType p(origin);
  this->SetOutputOrigin(p);
}

Can you see if this works on the Sun compiler?


Bill


More information about the Insight-developers mailing list