ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkPhysicsBasedNonRigidRegistrationMethod.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 itkPhysicsBasedNonRigidRegistrationMethod_h
20 #define itkPhysicsBasedNonRigidRegistrationMethod_h
21 
22 
26 #include "itkConceptChecking.h"
27 
28 
29 namespace itk
30 {
31 namespace fem
32 {
33 
60 template <typename TFixedImage, typename TMovingImage, typename TMaskImage, typename TMesh, typename TDeformationField>
61 class ITK_TEMPLATE_EXPORT PhysicsBasedNonRigidRegistrationMethod : public ImageToImageFilter<TMovingImage, TDeformationField>
62 {
63 public:
68 
70  itkNewMacro(Self);
71 
74 
75  typedef TMovingImage MovingImageType;
76  typedef TFixedImage FixedImageType;
77  typedef TMaskImage MaskImageType;
78  typedef TMesh MeshType;
79  typedef TDeformationField DeformationFieldType;
80 
81  itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension);
82 
87 
93  MeshType,
96  typename FeatureSelectionFilterType::FeaturePointsType // tensors are optional pixel values of feature points pointset
98 
100  itkSetMacro(SelectFraction, double);
101  itkGetConstMacro(SelectFraction, double);
103 
105  itkSetMacro(NonConnectivity, unsigned int);
106  itkGetConstMacro(NonConnectivity, unsigned int);
108 
110  itkSetMacro(BlockRadius, ImageSizeType);
111  itkGetConstReferenceMacro(BlockRadius, ImageSizeType);
113 
115  itkSetMacro(SearchRadius, ImageSizeType);
116  itkGetConstReferenceMacro(SearchRadius, ImageSizeType);
118 
120  itkSetMacro(ApproximationSteps, unsigned int);
121  itkGetMacro(ApproximationSteps, unsigned int);
123 
125  itkSetMacro(OutlierRejectionSteps, unsigned int);
126  itkGetMacro(OutlierRejectionSteps, unsigned int);
128 
130  itkSetInputMacro(FixedImage, FixedImageType);
131  itkGetInputMacro(FixedImage, FixedImageType);
133 
135  itkSetInputMacro(MovingImage, MovingImageType);
136  itkGetInputMacro(MovingImage, MovingImageType);
138 
140  itkSetInputMacro(MaskImage, MaskImageType);
141  itkGetInputMacro(MaskImage, MaskImageType);
143 
145  itkSetInputMacro(Mesh, MeshType);
146  itkGetInputMacro(Mesh, MeshType);
148 
150  itkGetConstObjectMacro(FEMFilter, FEMFilterType);
151 
152 #ifdef ITK_USE_CONCEPT_CHECKING
153  // Begin concept checking
154  /* Currently only the 3D implementation is available due to a narrow
155  definition of the filter in the original proposal
156  and lack of available resources. */
157  itkConceptMacro( FixedImageDimensionShouldBe3,
159  itkConceptMacro( MovingImageDimensionShouldBe3,
161  itkConceptMacro( MaskImageDimensionShouldBe3,
163  itkConceptMacro( MeshDimensionShouldBe3,
165  itkConceptMacro( DeformationFieldImageDimensionShouldBe3,
167  // End concept checking
168 #endif
169 
170 protected:
172  virtual ~PhysicsBasedNonRigidRegistrationMethod() ITK_OVERRIDE;
173  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
174  virtual void GenerateData() ITK_OVERRIDE;
175 
176 private:
177  ITK_DISALLOW_COPY_AND_ASSIGN(PhysicsBasedNonRigidRegistrationMethod);
178 
179  double m_SelectFraction;
180  unsigned int m_NonConnectivity;
181  ImageSizeType m_BlockRadius;
182  ImageSizeType m_SearchRadius;
183  unsigned int m_ApproximationSteps;
184  unsigned int m_OutlierRejectionSteps;
185 
186  typename FeatureSelectionFilterType::Pointer m_FeatureSelectionFilter;
187  typename BlockMatchingFilterType::Pointer m_BlockMatchingFilter;
188  typename FEMFilterType::Pointer m_FEMFilter;
189 };
190 
191 }
192 } // end namespace itk::fem
193 
194 #ifndef ITK_MANUAL_INSTANTIATION
195 #include "itkPhysicsBasedNonRigidRegistrationMethod.hxx"
196 #endif
197 
198 #endif
Perform a non-rigid registration of two 3D images using a set of feature points, block matching and l...
Light weight base class for most itk classes.
FEMScatteredDataPointSetToImageFilter< typename BlockMatchingFilterType::DisplacementsType, MeshType, DeformationFieldType, typename BlockMatchingFilterType::SimilaritiesType, typename FeatureSelectionFilterType::FeaturePointsType > FEMFilterType
An image region represents a structured region of data.
Implements the N-dimensional mesh structure.
Definition: itkMesh.h:108
Scattered data approximation to interpolation in the presence of outliers.
BlockMatchingImageFilter< FixedImageType, MovingImageType > BlockMatchingFilterType
ImageToImageFilter< TMovingImage, TDeformationField > Superclass
MaskFeaturePointSelectionFilter< MovingImageType, MaskImageType > FeatureSelectionFilterType
Generate a PointSet containing the feature points selected from a masked 3D input image...
Computes displacements of given points from a fixed image in a floating image.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:72