ITK  4.4.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 
24 namespace itk
25 {
26 namespace fem
27 {
38 {
39 public:
40 
46 
50 
52  itkSimpleNewMacro(Self);
53 
55  itkTypeMacro(LoadNoisyLandmark, LoadLandmark);
56 
58  void SetOutlier(bool outlier)
59  {
60  m_IsOutlier = outlier;
61  }
62 
63  bool IsOutlier() const
64  {
65  return m_IsOutlier;
66  }
67 
69  void SetErrorNorm(float errorNorm)
70  {
71  m_ErrorNorm = errorNorm;
72  }
73 
74  float GetErrorNorm() const
75  {
76  return m_ErrorNorm;
77  }
78 
80  void SetConfidence(float confidence)
81  {
82  m_Confidence = confidence;
83  }
84 
85  float GetConfidence() const
86  {
87  return m_Confidence;
88  }
89 
91  void SetRealDisplacement(const VectorType & displacement)
92  {
93  m_RealDisplacement = displacement;
94  }
95 
97  {
98  return m_RealDisplacement;
99  }
100 
102  void SetSimulatedDisplacement(const VectorType & displacement)
103  {
104  m_SimulatedDisplacement = displacement;
105  }
106 
108  {
110  }
111 
113  void SetShape(const VectorType & shape)
114  {
115  m_Shape = shape;
116  }
117 
118  const VectorType & GetShape() const
119  {
120  return m_Shape;
121  }
122 
124  void SetIsOutOfMesh(bool out)
125  {
126  m_IsOutOfMesh = out;
127  }
128 
129  bool IsOutOfMesh() const
130  {
131  return m_IsOutOfMesh;
132  }
133 
135  void SetStructureTensor(const MatrixType& structureTensor)
136  {
137  m_StructureTensor = structureTensor;
138  m_HasStructureTensor = true;
139  }
140 
142  {
143  return m_StructureTensor;
144  }
145 
146  bool HasStructureTensor() const
147  {
148  return m_HasStructureTensor;
149  }
150 
152  void SetLandmarkTensor(const MatrixType& landmarkTensor)
153  {
154  m_LandmarkTensor = landmarkTensor;
155  }
156 
158  {
159  return m_LandmarkTensor;
160  }
161 
162 protected:
163 
168  {
169  m_IsOutlier = false;
170  m_Confidence = 1.0;
171  m_HasStructureTensor = false;
172  m_IsOutOfMesh = false;
173  this->m_Element.resize(1);
174  }
176 
177  virtual void PrintSelf(std::ostream& os, Indent indent) const;
178 
179 private:
180 
185 
190 
195 
200 
204  float m_ErrorNorm;
205 
210 
215 
220 
225 
231 
232 };
233 
234 }
235 } // end namespace itk::fem
236 
237 #endif
238