18 #ifndef __itkFEMRegistrationFilter_h
19 #define __itkFEMRegistrationFilter_h
42 #include "vnl/vnl_vector.h"
43 #include "vnl/vnl_math.h"
44 #include "vnl/vnl_vector_fixed.h"
105 template<
class TMovingImage,
class TFixedImage>
126 itkStaticConstMacro(ImageDimension,
unsigned int,
127 FixedImageType::ImageDimension);
132 enum Sign { positive = 1, negative = -1 };
174 #ifdef USEIMAGEMETRIC
187 bool ReadConfigFile(
const char*);
191 void RunRegistration(
void);
196 void WriteWarpedImage(
const char* fn);
203 void MultiResSolve();
209 int WriteDisplacementField(
unsigned int index);
212 int WriteDisplacementFieldMultiComponent();
216 void SetMovingFile(
const char* r)
221 std::string GetMovingFile()
223 return m_MovingFileName;
235 void SetMovingImage(MovingImageType* R);
238 void SetFixedImage(FixedImageType* T);
251 void ComputeJacobian(
float sign=1.0, FieldType* field=
NULL ,
float smooth=0.0);
269 void SetLandmarkFile(
const char* l)
271 m_LandmarkFileName=l;
275 void UseLandmarks(
bool b)
287 void EnforceDiffeomorphism(
float thresh , SolverType& S ,
bool onlywriteimages);
294 void SetResultsFile(
const char* r)
299 void SetResultsFileName (
const char* f)
304 std::string GetResultsFileName ()
306 return m_ResultsFileName;
310 void SetDisplacementsFile(
const char* r)
312 m_DisplacementsFileName=r;
321 void SetMeshPixelsPerElementAtEachResolution(
unsigned int i,
unsigned int which=0)
323 m_MeshPixelsPerElementAtEachResolution[which]=i;
329 void SetNumberOfIntegrationPoints(
unsigned int i,
unsigned int which=0)
331 m_NumberOfIntegrationPoints[which]=i;
339 void SetWidthOfMetricRegion(
unsigned int i,
unsigned int which=0)
341 m_MetricWidth[which]=i;
343 unsigned int GetWidthOfMetricRegion(
unsigned int which=0)
345 return m_MetricWidth[which];
352 void SetMaximumIterations(
unsigned int i,
unsigned int which)
372 void SetEnergyReductionFactor(
Float i)
374 m_EnergyReductionFactor=i;
378 void SetElasticity(
Float i,
unsigned int which=0)
384 Float GetElasticity(
unsigned int which=0)
390 void SetRho(
Float r,
unsigned int which=0)
396 void SetGamma(
Float r,
unsigned int which=0)
402 void SetDescentDirectionMinimize()
404 m_DescentDirection=positive;
408 void SetDescentDirectionMaximize()
410 m_DescentDirection=negative;
415 void DoLineSearch(
unsigned int b)
417 m_DoLineSearchOnImageEnergy=b;
421 void DoMultiRes(
bool b)
427 void EmployRegridding(
unsigned int b)
429 m_EmployRegridding=b;
433 void SetLineSearchMaximumIterations(
unsigned int f)
435 m_LineSearchMaximumIterations=f;
439 void SetWriteDisplacements(
bool b)
441 m_WriteDisplacementField=b;
445 bool GetWriteDisplacements()
447 return m_WriteDisplacementField;
464 void ChooseMetric(
float whichmetric);
472 void PrintVectorField(
unsigned int modnum=1000);
512 void CreateLinearSystemSolver();
516 Float EvaluateEnergy();
552 void PrintSelf(std::ostream& os,
Indent indent)
const;
556 void InitializeField();
559 void operator=(
const Self&);
651 #ifndef ITK_MANUAL_INSTANTIATION