ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.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 #ifndef itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
19 #define itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
20 
22 
24 
25 namespace itk {
26 
70 template<typename TPointSet, class TInternalComputationValueType = double>
72  public PointSetToPointSetMetricv4<TPointSet, TPointSet, TInternalComputationValueType>
73 {
74 public:
75  ITK_DISALLOW_COPY_AND_ASSIGN(JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4);
76 
79  using Superclass = PointSetToPointSetMetricv4<TPointSet, TPointSet,
80  TInternalComputationValueType>;
83 
85  itkSimpleNewMacro( Self );
86 
89 
90  using PointSetType = TPointSet;
91  using PointsContainer = typename PointSetType::PointsContainer;
92  using PointsContainerConstIterator = typename PointsContainer::ConstIterator;
93 
94  static constexpr unsigned int PointDimension = TPointSet::PointDimension;
95 
97  using MeasureType = typename Superclass::MeasureType;
98  using DerivativeType = typename Superclass::DerivativeType;
99  using DerivativeValueType = typename Superclass::DerivativeValueType;
100  using LocalDerivativeType = typename Superclass::LocalDerivativeType;
102  using PixelType = typename Superclass::PixelType;
103  using CoordRepType = typename Superclass::CoordRepType;
104  using PointIdentifier = typename Superclass::PointIdentifier;
105  using NeighborsIdentifierType = typename Superclass::NeighborsIdentifierType;
106  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
107 
108  using JacobianType = typename Superclass::JacobianType;
109  using FixedTransformJacobianType = typename Superclass::FixedTransformJacobianType;
110  using MovingTransformJacobianType = typename Superclass::MovingTransformJacobianType;
111 
113 
121 
124  void Initialize() override;
125 
135  itkSetClampMacro( Alpha, RealType, 1.0, 2.0 );
136 
140  itkGetConstMacro( Alpha, RealType );
141 
147  itkSetMacro( PointSetSigma, RealType );
148 
150  itkGetConstMacro( PointSetSigma, RealType );
151 
156  itkSetMacro( EvaluationKNeighborhood, unsigned int );
157 
162  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
163 
168  itkSetMacro( UseAnisotropicCovariances, bool );
169 
174  itkGetConstMacro( UseAnisotropicCovariances, bool );
175 
180  itkBooleanMacro( UseAnisotropicCovariances );
181 
187  itkSetMacro( CovarianceKNeighborhood, unsigned int );
188 
194  itkGetConstMacro( CovarianceKNeighborhood, unsigned int );
195 
203  itkSetMacro( KernelSigma, RealType );
204 
206  itkGetConstMacro( KernelSigma, RealType );
207 
208  MeasureType GetLocalNeighborhoodValue( const PointType & point,
209  const PixelType & pixel = 0 ) const override;
210 
211  void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType &,
212  LocalDerivativeType &, const PixelType & pixel = 0 ) const override;
213 
216  typename LightObject::Pointer InternalClone() const override;
217 
218 protected:
221 
222  void ComputeValueAndDerivative( const PointType & samplePoint, MeasureType & value,
223  LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative ) const;
224 
225  void PrintSelf( std::ostream& os, Indent indent ) const override;
226 
227 private:
229 
230  bool m_UseAnisotropicCovariances{ false };
231 
236 
238 
243 };
244 
245 
246 } // end namespace itk
247 
248 #ifndef ITK_MANUAL_INSTANTIATION
249 #include "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx"
250 #endif
251 
252 #endif
Light weight base class for most itk classes.
Computes similarity between two point sets.
Point set function based on n-dimensional parzen windowing.
typename Statistics::GaussianMembershipFunction< PointType > GaussianType
typename DerivativeType::ValueType DerivativeValueType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::DerivativeType DerivativeType
Implementation of the Jensen Havrda Charvat Tsallis Point Set metric.