ITK  5.2.0
Insight Toolkit
itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.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 itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader_h
19 #define itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader_h
20 
22 
23 namespace itk
24 {
25 
32 template <typename TDomainPartitioner, typename TImageToImageMetric, typename TDemonsMetric>
34  : public ImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner, TImageToImageMetric>
35 {
36 public:
38 
44 
47 
48  itkNewMacro(Self);
49 
50  using DomainType = typename Superclass::DomainType;
51  using AssociateType = typename Superclass::AssociateType;
52 
53  using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type;
54  using VirtualPointType = typename Superclass::VirtualPointType;
55  using VirtualIndexType = typename Superclass::VirtualIndexType;
56  using FixedImagePointType = typename Superclass::FixedImagePointType;
57  using FixedImagePixelType = typename Superclass::FixedImagePixelType;
58  using FixedImageGradientType = typename Superclass::FixedImageGradientType;
59  using MovingImagePointType = typename Superclass::MovingImagePointType;
60  using MovingImagePixelType = typename Superclass::MovingImagePixelType;
61  using MovingImageGradientType = typename Superclass::MovingImageGradientType;
62  using MeasureType = typename Superclass::MeasureType;
63  using DerivativeType = typename Superclass::DerivativeType;
64  using DerivativeValueType = typename Superclass::DerivativeValueType;
65  using InternalComputationValueType = typename Superclass::InternalComputationValueType;
66  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
67  using ImageDimensionType = typename Superclass::ImageDimensionType;
68 
69 protected:
71  : m_DemonsAssociate(nullptr)
72  {}
73 
77  void
78  BeforeThreadedExecution() override;
79 
83  bool
84  ProcessPoint(const VirtualIndexType & virtualIndex,
85  const VirtualPointType & virtualPoint,
86  const FixedImagePointType & mappedFixedPoint,
87  const FixedImagePixelType & mappedFixedPixelValue,
88  const FixedImageGradientType & mappedFixedImageGradient,
89  const MovingImagePointType & mappedMovingPoint,
90  const MovingImagePixelType & mappedMovingPixelValue,
91  const MovingImageGradientType & mappedMovingImageGradient,
92  MeasureType & metricValueReturn,
93  DerivativeType & localDerivativeReturn,
94  const ThreadIdType threadId) const override;
95 
96 private:
99  TDemonsMetric * m_DemonsAssociate;
100 };
101 
102 } // end namespace itk
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 # include "itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
106 #endif
107 
108 #endif
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::NumberOfParametersType
typename Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:66
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::FixedImagePointType
typename Superclass::FixedImagePointType FixedImagePointType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:56
itk::ImageToImageMetricv4GetValueAndDerivativeThreader
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:44
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::DemonsImageToImageMetricv4GetValueAndDerivativeThreader
DemonsImageToImageMetricv4GetValueAndDerivativeThreader()
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:70
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::FixedImagePixelType
typename Superclass::FixedImagePixelType FixedImagePixelType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:57
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::MovingImagePixelType
typename Superclass::MovingImagePixelType MovingImagePixelType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:60
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::AssociateType
typename Superclass::AssociateType AssociateType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:51
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::DomainType
typename Superclass::DomainType DomainType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:50
itkImageToImageMetricv4GetValueAndDerivativeThreader.h
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:63
itk::SmartPointer< Self >
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::VirtualPointType
typename Superclass::VirtualPointType VirtualPointType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:54
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::MovingImageGradientType
typename Superclass::MovingImageGradientType MovingImageGradientType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:61
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:62
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::VirtualIndexType
typename Superclass::VirtualIndexType VirtualIndexType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:55
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::ImageDimensionType
typename Superclass::ImageDimensionType ImageDimensionType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:67
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::InternalComputationValueType
typename Superclass::InternalComputationValueType InternalComputationValueType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:65
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::MovingImagePointType
typename Superclass::MovingImagePointType MovingImagePointType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:59
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::m_DemonsAssociate
TDemonsMetric * m_DemonsAssociate
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:99
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader
Processes points for DemonsImageToImageMetricv4 GetValueAndDerivative.
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:33
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::ImageToImageMetricv4Type
typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:53
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::DerivativeValueType
typename Superclass::DerivativeValueType DerivativeValueType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:64
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::FixedImageGradientType
typename Superclass::FixedImageGradientType FixedImageGradientType
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:58