19 #ifndef itkFEMRobustSolver_h
20 #define itkFEMRobustSolver_h
83 template <
unsigned int VDimension = 3>
101 typedef typename Superclass::Float
Float;
111 itkStaticConstMacro(FEMDimension,
unsigned int, VDimension);
124 itkSetMacro(ApproximationSteps,
unsigned int);
125 itkGetMacro(ApproximationSteps,
unsigned int);
131 itkSetMacro(OutlierRejectionSteps,
unsigned int);
132 itkGetMacro(OutlierRejectionSteps,
unsigned int);
140 itkSetMacro(ToleranceToLargestDisplacement,
double);
141 itkGetMacro(ToleranceToLargestDisplacement,
double);
150 itkSetMacro(TradeOffImageMeshEnergy,
double);
151 itkGetMacro(TradeOffImageMeshEnergy,
double);
158 itkSetMacro(FractionErrorRejected,
double);
159 itkGetMacro(FractionErrorRejected,
double);
167 itkSetMacro(UseInterpolationGrid,
bool);
168 itkGetMacro(UseInterpolationGrid,
bool);
183 virtual
void GenerateData() ITK_OVERRIDE;
186 virtual
void RunSolver(
void) ITK_OVERRIDE;
189 void Initialization();
197 void InitializeInterpolationGrid();
203 void InitializeLandmarks();
209 void AssembleMeshStiffnessMatrix();
215 virtual
void AssembleElementMatrixWithID(const
Element::
Pointer &
e,
unsigned int matrixIndex);
221 void AssembleLandmarkStiffnessMatrix();
224 void AssembleGlobalMatrixFromLandmarksAndMeshMatrices();
233 void IncrementalSolverWithOutlierRejection();
239 void IncrementalSolverWithoutOutlierRejection();
249 void ComputeLandmarkSimulatedDisplacementAndWeightedError();
255 void ComputeLandmarkTensor();
258 float GetLandmarkTensorPonderation() const;
265 void NthElementWRTDisplacementError(
unsigned int numberOfRejectedBlocksPerStep);
273 void UnselectLandmarks(
unsigned int numberOfRejectedBlocksPerStep);
279 void RemoveUnselectedLandmarkContributionInPointStiffnessMatrix();
285 void DeleteFromLandmarkBeginning(
unsigned int numberOfRejectedLandmarksPerStep);
288 void DeleteLandmarksOutOfMesh();
297 void RescaleLandmarkStiffnessMatrix(
double oldPointTensorPonderation);
303 void CalculateExternalForces();
309 void AddExternalForcesToSetMeshZeroEnergy();
319 unsigned int m_OutlierRejectionSteps;
324 unsigned int m_ApproximationSteps;
330 FEMIndexType m_ForceIndex;
331 FEMIndexType m_LandmarkForceIndex;
332 FEMIndexType m_ExternalForceIndex;
333 FEMIndexType m_SolutionIndex;
334 FEMIndexType m_MeshStiffnessMatrixIndex;
335 FEMIndexType m_LandmarkStiffnessMatrixIndex;
336 FEMIndexType m_StiffnessMatrixIndex;
338 double m_TradeOffImageMeshEnergy;
340 double m_ToleranceToLargestDisplacement;
341 double m_ConjugateGradientPrecision;
342 double m_FractionErrorRejected;
350 bool m_UseInterpolationGrid;
362 public std::binary_function<const
Load::Pointer &, const
Load::Pointer &,
bool>
378 #ifndef ITK_MANUAL_INSTANTIATION
379 #include "itkFEMRobustSolver.hxx"
Light weight base class for most itk classes.
unsigned int FEMIndexType
Superclass::FEMObjectType FEMObjectType
Superclass::InterpolationGridSpacingType InterpolationGridSpacingType
Superclass::InterpolationGridIndexType InterpolationGridIndexType
float GetErrorNorm() const
ObjectType * GetPointer() const
FEMObjectType::LoadContainerIterator LoadContainerIterator
FEMObjectType::LoadContainerType LoadContainerType
vnl_matrix< Float > MatrixType
ImageBaseType::SpacingType VectorType
SmartPointer< Self > Pointer
ImageBaseType::DirectionType DirectionType
Superclass::VectorType VectorType
Superclass::InterpolationGridPointerType InterpolationGridPointerType
FEM solver used to generate a solution for a FE formulation.
Abstract base element class.
bool operator()(const Load::Pointer &L1, const Load::Pointer &L2)
Element::MatrixType MatrixType
General abstract load base class.
InterpolationGridType::DirectionType InterpolationGridDirectionType
LinearSystemWrapper class that uses Itpack numeric library functions to define and solve a sparse lin...
Superclass::InterpolationGridSizeType InterpolationGridSizeType
static ITK_CONSTEXPR_VAR double e
The base of the natural logarithm or Euler's number
Superclass::InterpolationGridType InterpolationGridType
FEMObjectType::NodeContainerType NodeContainerType
Superclass::InterpolationGridRegionType InterpolationGridRegionType
Superclass::InterpolationGridPointType InterpolationGridPointType
SmartPointer< const Self > ConstPointer
Solver< VDimension > Superclass