[Insight-users] VectorImage Registration Metric

Kevin H. Hobbs hobbsk at ohiou.edu
Fri May 2 14:26:15 EDT 2008


On Fri, 2008-05-02 at 10:37 -0400, Luis Ibanez wrote:
> Could you please try the following:
> 
> a) Insert at the top of your code
> 
>      #include itkNumericTraitsVariableLengthVectorPixel.h
> 
> b) And directly call the Macro:
> 
>     itkNumericTraitsVariableLengthVectorPixelMacro( PixelType );
> 
>     just after you define "PixelType"
> 
> 
> Please let us now if that section of the code compiles for you.
> 
> 
> -----
> 
> BTW,
> 
> a) What compiler are you using ?
> b) What ITK version are you using ?
> 

I'm using :

[kevin at gargon ~]$ g++ --version
g++ (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)

ITK is built nightly from CVS and is gargon.hooperlab on the dashboard.

What I get is :

[ 82%] Building CXX object CMakeFiles/align_rot_vect.dir/align_rot_vect.cxx.o
/home/kevin/Documents/stg_anatomy/align_rot_vect.cxx: In function ‘int main(int, char**)’:
/home/kevin/Documents/stg_anatomy/align_rot_vect.cxx:91: error: expected primary-expression before ‘template’
/home/kevin/Documents/stg_anatomy/align_rot_vect.cxx:91: error: expected `;' before ‘template’
/home/kevin/Documents/stg_anatomy/align_rot_vect.cxx:386: error: expected `}' at end of input
make[2]: *** [CMakeFiles/align_rot_vect.dir/align_rot_vect.cxx.o] Error 1
make[1]: *** [CMakeFiles/align_rot_vect.dir/all] Error 2
make: *** [all] Error 2

I was curious if there was anything that I could understand in the
preprocessed output so I told CMake to create a verbose makefile, copied
the compile command, changed the '-o' output file, changed -c to -E, and
so that I could find it in the output I changed PixelType to
PixelsdfjkbpsdfjbkajdfType;

This are the lines of the preprocessed output :

typedef unsigned char PixelsdfjkbpsdfjbkajdfType;

 template < _TEMPLATE_ARGUMENT_ > class NumericTraits<VariableLengthVector< PixelsdfjkbpsdfjbkajdfType > > { public: typedef PixelsdfjkbpsdfjbkajdfType ValueType; typedef _TYPENAME_ NumericTraits<PixelsdfjkbpsdfjbkajdfType>::AbsType ElementAbsType; typedef _TYPENAME_ NumericTraits<PixelsdfjkbpsdfjbkajdfType>::AccumulateType ElementAccumulateType; typedef _TYPENAME_ NumericTraits<PixelsdfjkbpsdfjbkajdfType>::FloatType ElementFloatType; typedef _TYPENAME_ NumericTraits<PixelsdfjkbpsdfjbkajdfType>::PrintType ElementPrintType; typedef _TYPENAME_ NumericTraits<PixelsdfjkbpsdfjbkajdfType>::RealType ElementRealType; typedef VariableLengthVector<PixelsdfjkbpsdfjbkajdfType> Self; typedef VariableLengthVector<ElementAbsType> AbsType; typedef VariableLengthVector<ElementAccumulateType> AccumulateType; typedef VariableLengthVector<ElementFloatType> FloatType; typedef VariableLengthVector<ElementPrintType> PrintType; typedef VariableLengthVector<ElementRealType> RealType; typedef ElementRealType ScalarRealType; static const RealType max( const Self & a ) { RealType b(a.Size()); b.Fill( NumericTraits< PixelsdfjkbpsdfjbkajdfType >::max() ); return b; } static const RealType min( const Self & a ) { RealType b(a.Size()); b.Fill( NumericTraits< PixelsdfjkbpsdfjbkajdfType >::min() ); return b; } static const Self Zero( const Self & a ) { Self b(a.Size()); b.Fill( NumericTraits< PixelsdfjkbpsdfjbkajdfType >::Zero ); return b; } static const Self One( const Self & a ) { Self b(a.Size()); b.Fill( NumericTraits< PixelsdfjkbpsdfjbkajdfType >::One ); return b; } };;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080502/ba4af8dc/attachment.pgp>


More information about the Insight-users mailing list