[Insight-users] Curvature Registration Algorithm

Vidya Rajagopalan vidyaraj at vt.edu
Tue Mar 18 18:15:53 EDT 2008


Hello Everyone,

I am trying to implement the curvature registration algorithm.

When I compile the code, I get the following errors:

In function `int curvature(int, char**)':
curvature.cxx:76: error: expected init-declarator before '<' token
curvature.cxx:76: error: expected `,' or `;' before '<' token
curvature.cxx:77: error: `RegistrationFilterType' has not been declared
curvature.cxx:77: error: `Pointer' undeclared (first use this function)
curvature.cxx:77: error: (Each undeclared identifier is reported only once for
each function it appears in.)
curvature.cxx:77: error: expected `;' before "filter"
curvature.cxx:78: error: `filter' undeclared (first use this function)


I understand the errors on line 77 and 78 are a consequence of the errors on 76.
I have pasted the relevant code block below:

#include "itkCurvatureRegistrationFilter.h"
#include "itkDemonsRegistrationFunction.h"

// setup the deformation field and filter
  typedef itk::Vector< float, Dimension > VectorPixelType;
  typedef itk::Image< VectorPixelType, Dimension > DeformationFieldType;
  typedef itk::DemonsRegistrationFunction< InternalImageType, InternalImageType,
DeformationFieldType > ForcesType;
  typedef itk::CurvatureRegistrationFilter< InternalImageType,
InternalImageType, DeformationFieldType, ForcesType > RegistrationFilterType;
  RegistrationFilterType::Pointer filter = RegistrationFilterType::New();
  filter->SetTimeStep( 1 );
  filter->SetConstraintWeight( 0.02 );

Is it possible that the compiler does not recognize itkCurvatureFilter.h? I do
not see any missing ; . I would appreciate it
if someone can throw some light on this problem.

Thank you.

Vidya Rajagopalan
Virginia Tech


More information about the Insight-users mailing list