ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFEMLoadNoisyLandmark.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef itkFEMLoadNoisyLandmark_h
20 #define itkFEMLoadNoisyLandmark_h
21 
22 #include "itkFEMLoadLandmark.h"
23 #include "ITKFEMExport.h"
24 
25 namespace itk
26 {
27 namespace fem
28 {
38 class ITKFEM_EXPORT LoadNoisyLandmark : public LoadLandmark
39 {
40 public:
41 
47 
51 
53  itkSimpleNewMacro(Self);
54 
56  itkTypeMacro(LoadNoisyLandmark, LoadLandmark);
57 
59  void SetOutlier(bool outlier)
60  {
61  m_IsOutlier = outlier;
62  }
63 
64  bool IsOutlier() const
65  {
66  return m_IsOutlier;
67  }
68 
70  void SetErrorNorm(float errorNorm)
71  {
72  m_ErrorNorm = errorNorm;
73  }
74 
75  float GetErrorNorm() const
76  {
77  return m_ErrorNorm;
78  }
79 
81  void SetConfidence(float confidence)
82  {
83  m_Confidence = confidence;
84  }
85 
86  float GetConfidence() const
87  {
88  return m_Confidence;
89  }
90 
92  void SetRealDisplacement(const VectorType & displacement)
93  {
94  m_RealDisplacement = displacement;
95  }
96 
98  {
99  return m_RealDisplacement;
100  }
101 
103  void SetSimulatedDisplacement(const VectorType & displacement)
104  {
105  m_SimulatedDisplacement = displacement;
106  }
107 
109  {
110  return m_SimulatedDisplacement;
111  }
112 
114  void SetShape(const VectorType & shape)
115  {
116  m_Shape = shape;
117  }
118 
119  const VectorType & GetShape() const
120  {
121  return m_Shape;
122  }
123 
125  void SetIsOutOfMesh(bool out)
126  {
127  m_IsOutOfMesh = out;
128  }
129 
130  bool IsOutOfMesh() const
131  {
132  return m_IsOutOfMesh;
133  }
134 
136  void SetStructureTensor(const MatrixType& structureTensor)
137  {
138  m_StructureTensor = structureTensor;
139  m_HasStructureTensor = true;
140  }
141 
143  {
144  return m_StructureTensor;
145  }
146 
147  bool HasStructureTensor() const
148  {
149  return m_HasStructureTensor;
150  }
151 
153  void SetLandmarkTensor(const MatrixType& landmarkTensor)
154  {
155  m_LandmarkTensor = landmarkTensor;
156  }
157 
159  {
160  return m_LandmarkTensor;
161  }
162 
163 protected:
164 
169  m_Confidence(1.0),
170  m_ErrorNorm(0.0),
171  m_IsOutlier(false),
172  m_IsOutOfMesh(false),
173  m_HasStructureTensor(false)
174  {
175  this->m_Element.resize(1);
176  }
177 
178  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
179 
180 private:
181 
186 
191 
196 
201 
205  float m_ErrorNorm;
206 
211 
216 
221 
226 
232 
233 };
234 
235 }
236 } // end namespace itk::fem
237 
238 #endif
Light weight base class for most itk classes.
void SetRealDisplacement(const VectorType &displacement)
const VectorType & GetRealDisplacement() const
void SetStructureTensor(const MatrixType &structureTensor)
const MatrixType & GetLandmarkTensor() const
void SetConfidence(float confidence)
vnl_matrix< Float > MatrixType
SmartPointer< const Self > ConstPointer
This load is derived from the motion of a specific landmark.
void SetLandmarkTensor(const MatrixType &landmarkTensor)
vnl_vector< Float > VectorType
const VectorType & GetSimulatedDisplacement() const
const MatrixType & GetStructureTensor() const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void SetSimulatedDisplacement(const VectorType &displacement)
void SetShape(const VectorType &shape)
void SetErrorNorm(float errorNorm)
const VectorType & GetShape() const