[Insight-users] Borland 6 Build error

John Biddiscombe John Biddiscombe" <jbiddiscombe@skippingmouse.co.uk
Mon, 25 Nov 2002 10:16:37 -0000


Luis,

> I guess we can replace this line in itkImageRegion.h
> without much trouble. We'll see what other compilers say...

One thing pops into my mind...
we've replaced
typedef ImageRegion<itkGetStaticConstMacro(SliceDimension)> SliceRegion;
with
typedef ImageRegion< VImageDimension-1 > SliceRegion;
but the define for SliceDimension says
VImageDimension-(VImageDimension-1>1)
so the new line will givezero for 1d instead of 1. Shouldn't we use

typedef ImageRegion< VImageDimension-(VImageDimension-1) > SliceRegion;
???

OK. Next phase. I've replaced the InputPointType, OutputPointType and
MatrixType as you suggested and this fixed several errors (and yes, the
parameter i munged in the error text, no doubt the compiler is dumping some
internal referece instead of the correct name).

All is well for now, I hhad to replace a few more macros with the int
version, Input and OutputVector and vnlVector types were causing trouble
too, see this excerpt for the full list

  /** Standard vector type for this class   */
  typedef Vector<TScalarType,
                 NDimensions>  InputVectorType;
  typedef Vector<TScalarType,
                 NDimensions>  OutputVectorType;
//  typedef Vector<TScalarType,
//                 itkGetStaticConstMacro(SpaceDimension)>  InputVectorType;
//  typedef Vector<TScalarType,
//                 itkGetStaticConstMacro(SpaceDimension)>
OutputVectorType;

  /** Standard covariant vector type for this class   */
  typedef CovariantVector<TScalarType,
                          NDimensions>  InputCovariantVectorType;
  typedef CovariantVector<TScalarType,
                          NDimensions>  OutputCovariantVectorType;
//  typedef CovariantVector<TScalarType,
//                          itkGetStaticConstMacro(SpaceDimension)>
InputCovariantVectorType;
//  typedef CovariantVector<TScalarType,
//                          itkGetStaticConstMacro(SpaceDimension)>
OutputCovariantVectorType;

  /** Standard vnl_vector type for this class   */
  typedef vnl_vector_fixed<TScalarType,
                           NDimensions> InputVnlVectorType;
  typedef vnl_vector_fixed<TScalarType,
                           NDimensions> OutputVnlVectorType;
//  typedef vnl_vector_fixed<TScalarType,
//                           itkGetStaticConstMacro(SpaceDimension)>
InputVnlVectorType;
//  typedef vnl_vector_fixed<TScalarType,
//                           itkGetStaticConstMacro(SpaceDimension)>
OutputVnlVectorType;

  /** Standard coordinate point type for this class   */
  typedef Superclass::InputPointType   InputPointType;
  typedef Superclass::OutputPointType   OutputPointType;
//  typedef Point<TScalarType,
//                itkGetStaticConstMacro(SpaceDimension)> InputPointType;
//  typedef Point<TScalarType,
//                itkGetStaticConstMacro(SpaceDimension)> OutputPointType;

  /** Standard matrix type for this class   */
  typedef Matrix< TScalarType, NDimensions, NDimensions > MatrixType;
//  typedef Matrix<TScalarType, itkGetStaticConstMacro(SpaceDimension),
//                 itkGetStaticConstMacro(SpaceDimension)> MatrixType;

This leaves me with just one error (for now) which is

[C++ Error] itkAffineTransform.txx(487): E2316
'AffineTransform<TScalarType,NDimensions>::Inverse() const' is not a member
of 'AffineTransform<TScalarType,NDimensions>'

And Pointer is SmartPointer<self> Not sure what to do about this one. I'll
play, but I expect you'll think of something before I do. Must get on with
some work this morning....

many thanks

JB