[Insight-users] Borland 6 Build error

Luis Ibanez luis.ibanez@kitware.com
Mon, 25 Nov 2002 09:39:17 -0500


Hi John,

--

John Biddiscombe wrote:
> 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;
> ???



You are right. The definiton is not consistent now,
since we are just trying to see what kind of constructions
will be accepted by all the compilers. The last typedef you
mention should probably be the right approach:

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

Another way to do it will be to provide the explicit definition for
ImageRegion<1> as it is done in the Factorial meta-programming example.


> 
> 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
> 
... snip...



BTW we are not making any changes to the repository.
It is probably better to wait until the basic libraries
are building in your system.



> 
> 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....
>


The declaration in the header file may look suspect.
It is now:

  AffineTransform::Pointer Inverse(void) const;


Could you please try both of the two following
declarations in line 347 of itkAffineTransform  ?

1)  Pointer       Inverse(void) const;
2)  Self::Pointer Inverse(void) const;


Declaration (1) is more likely to be the right thing...
but we will see what borland 6 has to say.



Please let us know what you find.


  Thanks