19 #ifndef itkFEMRegistrationFilter_h
20 #define itkFEMRegistrationFilter_h
45 #include "vnl/vnl_vector.h"
46 #include "vnl/vnl_math.h"
47 #include "vnl/vnl_vector_fixed.h"
117 template <
typename TMovingImage,
typename TFixedImage,
typename TFemObjectType>
141 FixedImageType::ImageDimension);
339 itkSetMacro(TimeStep,
Float);
340 itkGetMacro(TimeStep,
Float);
347 itkSetMacro(Alpha,
Float);
348 itkGetMacro(Alpha,
Float);
354 itkSetMacro(UseLandmarks,
bool);
355 itkGetMacro(UseLandmarks,
bool);
370 itkSetMacro(UseMassMatrix,
bool);
371 itkGetMacro(UseMassMatrix,
bool);
377 itkSetMacro(EnergyReductionFactor,
Float);
378 itkGetMacro(EnergyReductionFactor,
Float);
421 itkSetMacro(DoLineSearchOnImageEnergy,
unsigned int);
422 itkGetMacro(DoLineSearchOnImageEnergy,
unsigned int);
430 itkSetMacro(UseNormalizedGradient,
bool);
431 itkGetMacro(UseNormalizedGradient,
bool);
446 itkSetMacro(EmployRegridding,
unsigned int);
447 itkGetMacro(EmployRegridding,
unsigned int);
454 itkSetMacro(LineSearchMaximumIterations,
unsigned int);
455 itkGetMacro(LineSearchMaximumIterations,
unsigned int);
511 itkGetMacro(MaxLevel,
unsigned int);
518 itkSetMacro(CreateMeshFromImage,
bool);
527 itkGetMacro(CreateMeshFromImage,
bool);
549 itkSetMacro(MaximumKernelWidth,
unsigned int);
550 itkGetConstMacro(MaximumKernelWidth,
unsigned int);
555 itkSetMacro(MaximumError,
double);
556 itkGetConstMacro(MaximumError,
double);
630 void operator=(const
Self &) ITK_DELETE_FUNCTION;
722 #ifndef ITK_MANUAL_INSTANTIATION
723 #include "itkFEMRegistrationFilter.hxx"
FixedImageType * GetFixedImage()
void SetElasticity(Float i, unsigned int which=0)
InterpolationGridType::SizeType InterpolationGridSizeType
vnl_vector< Float > m_Rho
void SetCreateMeshFromImageOn()
void FindBracketingTriplet(SolverType *mySolver, Float *a, Float *b, Float *c)
Image< float, itkGetStaticConstMacro(ImageDimension)> FloatImageType
Light weight base class for most itk classes.
FieldPointer ExpandVectorField(ExpandFactorsType *expandFactors, FieldType *f)
unsigned int m_EmployRegridding
FieldType::Pointer m_TotalField
SmartPointer< const Self > ConstPointer
itk::Image< Element::ConstPointer, ImageDimension > InterpolationGridType
SmartPointer< Self > Pointer
void GetLandmark(unsigned int i, PointType &source, PointType &target)
unsigned int m_LineSearchMaximumIterations
LandmarkArrayType m_LandmarkArray
Represent the size (bounds) of a n-dimensional image.
Float m_EnergyReductionFactor
FixedImageType::IndexType m_Windex
void SetMeshPixelsPerElementAtEachResolution(unsigned int i, unsigned int which=0)
itk::Image< VectorType, itkGetStaticConstMacro(ImageDimension)> FieldType
void PrintVectorField(unsigned int modnum=1000)
virtual const RegionType & GetLargestPossibleRegion() const
FieldType::Pointer m_Field
FieldType::SizeType m_FieldSize
Element::Pointer m_Element
MaterialType::Pointer m_Material
vnl_vector< Float > m_Gamma
itk::VectorIndexSelectionCastImageFilter< FieldType, FloatImageType > IndexSelectCasterType
FEM Solver for time dependent problems; uses Crank-Nicolson implicit discretization scheme...
unsigned int m_CurrentLevel
ImageSizeType m_ImageOrigin
FieldType::Pointer FieldPointer
WarperType::Pointer m_Warper
InterpolationGridType::PointType InterpolationGridPointType
FixedImageType::SizeType m_CurrentLevelImageSize
TMovingImage MovingImageType
itk::ImageRegionIteratorWithIndex< FloatImageType > FloatImageIterator
void SetNumberOfIntegrationPoints(unsigned int i, unsigned int which=0)
FEMRegistrationFilter Self
Generate a rectilinar mesh from an image. The result is stored in a FEMObject.
ImageSizeType m_FullImageSize
TFemObjectType FEMObjectType
void SetMovingImage(MovingImageType *R)
FEMObjectType * GetInputFEMObject(unsigned int level=0)
static const double e
The base of the natural logarithm or Euler's number
void SetWidthOfMetricRegion(unsigned int i, unsigned int which=0)
FixedArray< double, ImageDimension > StandardDeviationsType
FixedImageType::RegionType m_Wregion
Float GetElasticity(unsigned int which=0)
FixedImageType::PointType PointType
itk::fem::ImageToRectilinearFEMObjectFilter< TMovingImage > ImageToMeshType
Load::ArrayType LoadArray
vnl_vector< unsigned int > m_MeshPixelsPerElementAtEachResolution
void ChooseMetric(unsigned int whichmetric)
itk::Vector< float, itkGetStaticConstMacro(ImageDimension)> VectorType
unsigned int m_MaximumKernelWidth
itk::VectorExpandImageFilter< FieldType, FieldType > ExpanderType
FloatImageType * GetJacobianImage()
FixedImageType * GetWarpedImage()
ImageSizeType GetImageSize()
void SetRho(Float r, unsigned int which=0)
void AddLandmark(PointType source, PointType target)
Expand the size of a vector image by an integer factor in each dimension.
InterpolatorPointer m_Interpolator
Linear elasticity material class.
void ApplyImageLoads(MovingImageType *i1, FixedImageType *i2)
TFixedImage FixedImageType
FixedImageType::Pointer m_WarpedImage
vnl_vector< unsigned int > m_NumberOfIntegrationPoints
void SetMaxLevel(unsigned int level)
void SetElement(Element::Pointer e)
void ApplyLoads(ImageSizeType Isz, double *spacing=nullptr)
ExpanderType::ExpandFactorsType ExpandFactorsType
FieldType::RegionType m_FieldRegion
General image pair load that uses the itkFiniteDifferenceFunctions.
FieldType * GetDisplacementField()
FEMObjectType::Pointer m_FEMObject
A templated class holding a n-Dimensional vector.
unsigned int m_TotalIterations
MaterialLinearElasticity MaterialType
FixedImageType::PixelType PixelType
FloatImageType * GetMetricImage(FieldType *F)
FixedImageType::SizeType ImageSizeType
void SetMaterial(MaterialType::Pointer m)
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
InterpolatorType::Pointer InterpolatorPointer
void CreateMesh(unsigned int ElementsPerSide, SolverType *solver)
ImageToImageFilter< TMovingImage, TFixedImage > Superclass
FiniteDifferenceFunctionLoad< MovingImageType, FixedImageType > ImageMetricLoadType
ImageSizeType m_ImageScaling
void InterpolateVectorField(SolverType *S)
const SizeType & GetSize() const
Warps an image using an input displacement field.
ImageSizeType m_CurrentImageScaling
FEM Image registration filter. The image registration problem is modelled here with the finite elemen...
VectorInterpolateImageFunction< FieldType, CoordRepType > InterpolatorType
vnl_vector< unsigned int > m_Maxiters
Float EvaluateResidual(SolverType *mySolver, Float t)
void WarpImage(const MovingImageType *R)
void SetDescentDirectionMaximize()
itk::ImageRegionIteratorWithIndex< FixedImageType > ImageIterator
SolverCrankNicolson< ImageDimension > SolverType
unsigned int GetWidthOfMetricRegion(unsigned int which=0)
void SetCreateMeshFromImageOff()
virtual void SetStandardDeviations(StandardDeviationsType _arg)
void IterativeSolve(SolverType *S)
unsigned int m_DoLineSearchOnImageEnergy
unsigned int m_WhichMetric
void SetDisplacementField(FieldType *F)
MovingImageType::Pointer m_MovingImage
Abstract base element class.
MovingImageType::Pointer m_OriginalMovingImage
itk::WarpImageFilter< MovingImageType, FixedImageType, FieldType > WarperType
void CreateLinearSystemSolver()
void InsertLandmark(unsigned int i, PointType source, PointType target)
VectorLinearInterpolateImageFunction< FieldType, CoordRepType > DefaultInterpolatorType
MetricBaseTypePointer m_Metric
void SetDescentDirectionMinimize()
Float GoldenSection(SolverType *mySolver, Float tol=0.01, unsigned int MaxIters=25)
Base class for filters that take an image as input and produce an image as output.
bool m_CreateMeshFromImage
static const unsigned int ImageDimension
MovingImageType * GetMovingImage()
itk::ImageRegionIteratorWithIndex< FieldType > FieldIterator
LinearSystemWrapperItpack LinearSystemSolverType
Control indentation during Print() invocation.
void SetFixedImage(FixedImageType *T)
Base class for all vector image interpolaters.
Extracts the selected index of the vector that is the input pixel type.
void SetUseNormalizedGradientOff()
General abstract load base class.
bool m_UseNormalizedGradient
MovingImageType * GetOriginalMovingImage()
ImageMetricLoadType::Pointer m_Load
StandardDeviationsType m_StandardDeviations
void DeleteLandmark(unsigned int i)
FloatImageType::Pointer m_FloatImage
LinearSystemWrapper class that uses Itpack numeric library functions to define and solve a sparse lin...
virtual void SetCreateMeshFromImage(bool _arg)
MetricBaseType::Pointer MetricBaseTypePointer
void SetUseLandmarksOff()
virtual void SetUseNormalizedGradient(bool _arg)
std::vector< typename LoadLandmark::Pointer > LandmarkArrayType
void SetInputFEMObject(FEMObjectType *F, unsigned int level=0)
void SetGamma(Float r, unsigned int which=0)
void SampleVectorFieldAtNodes(SolverType *S)
void SetUseNormalizedGradientOn()
void SetMaximumIterations(unsigned int i, unsigned int which)
virtual void SetUseLandmarks(bool _arg)
void SmoothDisplacementField()
FixedImageType::Pointer m_FixedImage
Templated n-dimensional image class.
void PrintSelf(std::ostream &os, Indent indent) const override
PDEDeformableRegistrationFunction< FixedImageType, MovingImageType, FieldType > MetricBaseType
void EnforceDiffeomorphism(float thresh, SolverType *S, bool onlywriteimages)
Linearly interpolate a vector image at specified positions.
unsigned int GetMetricType()
vnl_vector< unsigned int > m_MetricWidth