[Insight-users] c++ question

salah salah@gris.uni-tuebingen.de
Thu, 24 Apr 2003 17:42:53 +0200


Hi all,

May be this question is silly.=20

I have defined a 4x4 matrix as follows

 typedef itk::Matrix<float, 4, 4>  TransformationType;


I tried then to define a function in my templated class to generate a =
matrix=20
an return it as result

I need to call something like:

TransformationType  T;

T =3D GenerateTheMatrix (... ..);

I have defined the function GenerateTheMatrix as follows:

template <class TInputImage, class TOutputImage>
TransformationType      CSGenerator<TInputImage,TOutputImage>
::GenerateTheMatrix(IndexType m_WinCenter, VectorType m_Normal)
{  =20
    TransformationType      R; =20
     R[0]=3D ...;        R[1]=3D  ...;  ......
     return R;
}
=20
The compiler did not accept this and reported an error.

Can anybody please tell me what is wrong with that and how to go around=20
this problem??

Many Thanks

Zein=20

->8<------------->8<------------->8<------------->8<------------->8<-----=
-------->8<-
Zein I. Salah=20
University of T=FCbingen, WSI-GRIS, Sand 14, 72076 T=FCbingen=20
Email: salah@gris.uni-tuebingen.de
Tel.: (07071) 29 75465 (GRIS),           Fax: (07071) 29 54 66