SimpleITK  
sitkLandmarkBasedTransformInitializerFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 #ifndef sitkLandmarkBasedTransformInitializerFilter_h
19 #define sitkLandmarkBasedTransformInitializerFilter_h
20 
21 #include <memory>
22 
23 #include "sitkBasicFilters.h"
24 #include "sitkImageFilter.h"
25 
26 namespace itk::simple
27 {
28 
74 {
75 public:
77 
80 
81 
85 
87  using PixelIDTypeList = typelist2::typelist<BasicPixelID<float>>;
88 
89 
93  SITK_RETURN_SELF_TYPE_HEADER
94  SetFixedLandmarks(const std::vector<double> & FixedLandmarks)
95  {
96  this->m_FixedLandmarks = FixedLandmarks;
97  return *this;
98  }
99 
103  std::vector<double>
105  {
106  return this->m_FixedLandmarks;
107  }
108 
112  SITK_RETURN_SELF_TYPE_HEADER
113  SetMovingLandmarks(const std::vector<double> & MovingLandmarks)
114  {
115  this->m_MovingLandmarks = MovingLandmarks;
116  return *this;
117  }
118 
122  std::vector<double>
124  {
125  return this->m_MovingLandmarks;
126  }
127 
131  SITK_RETURN_SELF_TYPE_HEADER
132  SetLandmarkWeight(const std::vector<double> & LandmarkWeight)
133  {
134  this->m_LandmarkWeight = LandmarkWeight;
135  return *this;
136  }
137 
141  std::vector<double>
143  {
144  return this->m_LandmarkWeight;
145  }
146 
150  SITK_RETURN_SELF_TYPE_HEADER
151  SetReferenceImage(const Image & ReferenceImage)
152  {
153  this->m_ReferenceImage = ReferenceImage;
154  return *this;
155  }
156 
159  Image
161  {
162  return this->m_ReferenceImage;
163  }
164 
168  SITK_RETURN_SELF_TYPE_HEADER
169  SetBSplineNumberOfControlPoints(unsigned int BSplineNumberOfControlPoints)
170  {
171  this->m_BSplineNumberOfControlPoints = BSplineNumberOfControlPoints;
172  return *this;
173  }
174 
178  unsigned int
180  {
181  return this->m_BSplineNumberOfControlPoints;
182  }
184  std::string
185  GetName() const override
186  {
187  return std::string("LandmarkBasedTransformInitializerFilter");
188  }
189 
191  std::string
192  ToString() const override;
193 
194 
196  Transform
197  Execute(const Transform & transform);
198 
199 
200 private:
203  typedef Transform (Self::*MemberFunctionType)(const Transform * transform);
204  template <class TImageType>
205  Transform
206  ExecuteInternal(const Transform * transform);
207 
208 
209  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
210 
211  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType>> m_MemberFactory;
212 
213 
214  /* */
215  std::vector<double> m_FixedLandmarks;
216  /* */
217  std::vector<double> m_MovingLandmarks;
218  /* */
219  std::vector<double> m_LandmarkWeight;
220 
223 };
224 
225 
236  const std::vector<double> & fixedLandmarks = std::vector<double>(),
237  const std::vector<double> & movingLandmarks = std::vector<double>(),
238  const std::vector<double> & landmarkWeight = std::vector<double>(),
239  const Image & referenceImage = Image(),
240  unsigned int numberOfControlPoints = 4u);
241 
242 } // namespace itk::simple
243 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::LandmarkBasedTransformInitializerFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkLandmarkBasedTransformInitializerFilter.h:211
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:86
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::LandmarkBasedTransformInitializerFilter::m_FixedLandmarks
std::vector< double > m_FixedLandmarks
Definition: sitkLandmarkBasedTransformInitializerFilter.h:215
itk::simple::LandmarkBasedTransformInitializerFilter::GetFixedLandmarks
std::vector< double > GetFixedLandmarks() const
Definition: sitkLandmarkBasedTransformInitializerFilter.h:104
itk::simple::LandmarkBasedTransformInitializerFilter::SetMovingLandmarks
Self & SetMovingLandmarks(const std::vector< double > &MovingLandmarks)
Definition: sitkLandmarkBasedTransformInitializerFilter.h:113
itk::simple::LandmarkBasedTransformInitializerFilter::GetLandmarkWeight
std::vector< double > GetLandmarkWeight() const
Definition: sitkLandmarkBasedTransformInitializerFilter.h:142
sitkImageFilter.h
itk::simple::LandmarkBasedTransformInitializerFilter::GetName
std::string GetName() const override
Definition: sitkLandmarkBasedTransformInitializerFilter.h:185
itk::simple::LandmarkBasedTransformInitializer
Transform LandmarkBasedTransformInitializer(const Transform &transform, const std::vector< double > &fixedLandmarks=std::vector< double >(), const std::vector< double > &movingLandmarks=std::vector< double >(), const std::vector< double > &landmarkWeight=std::vector< double >(), const Image &referenceImage=Image(), unsigned int numberOfControlPoints=4u)
itk::simple::LandmarkBasedTransformInitializerFilter Procedural Interface
itk::simple::LandmarkBasedTransformInitializerFilter::PixelIDTypeList
typelist2::typelist< BasicPixelID< float > > PixelIDTypeList
Definition: sitkLandmarkBasedTransformInitializerFilter.h:87
itk::simple::LandmarkBasedTransformInitializerFilter::m_BSplineNumberOfControlPoints
unsigned int m_BSplineNumberOfControlPoints
Definition: sitkLandmarkBasedTransformInitializerFilter.h:222
itk::simple::LandmarkBasedTransformInitializerFilter::GetBSplineNumberOfControlPoints
unsigned int GetBSplineNumberOfControlPoints() const
Definition: sitkLandmarkBasedTransformInitializerFilter.h:179
itk::simple::LandmarkBasedTransformInitializerFilter::SetBSplineNumberOfControlPoints
Self & SetBSplineNumberOfControlPoints(unsigned int BSplineNumberOfControlPoints)
Definition: sitkLandmarkBasedTransformInitializerFilter.h:169
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::LandmarkBasedTransformInitializerFilter::SetFixedLandmarks
Self & SetFixedLandmarks(const std::vector< double > &FixedLandmarks)
Definition: sitkLandmarkBasedTransformInitializerFilter.h:94
itk::simple::LandmarkBasedTransformInitializerFilter::SetReferenceImage
Self & SetReferenceImage(const Image &ReferenceImage)
Definition: sitkLandmarkBasedTransformInitializerFilter.h:151
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::simple::LandmarkBasedTransformInitializerFilter::m_LandmarkWeight
std::vector< double > m_LandmarkWeight
Definition: sitkLandmarkBasedTransformInitializerFilter.h:219
itk::simple::LandmarkBasedTransformInitializerFilter::SetLandmarkWeight
Self & SetLandmarkWeight(const std::vector< double > &LandmarkWeight)
Definition: sitkLandmarkBasedTransformInitializerFilter.h:132
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::LandmarkBasedTransformInitializerFilter::m_MovingLandmarks
std::vector< double > m_MovingLandmarks
Definition: sitkLandmarkBasedTransformInitializerFilter.h:217
itk::simple::LandmarkBasedTransformInitializerFilter::m_ReferenceImage
Image m_ReferenceImage
Definition: sitkLandmarkBasedTransformInitializerFilter.h:221
itk::simple::LandmarkBasedTransformInitializerFilter
Definition: sitkLandmarkBasedTransformInitializerFilter.h:73
itk::simple::LandmarkBasedTransformInitializerFilter::GetMovingLandmarks
std::vector< double > GetMovingLandmarks() const
Definition: sitkLandmarkBasedTransformInitializerFilter.h:123
itk::simple::LandmarkBasedTransformInitializerFilter::GetReferenceImage
Image GetReferenceImage() const
Definition: sitkLandmarkBasedTransformInitializerFilter.h:160