ITK  5.3.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 typename Superclass::DomainType;
51  using typename Superclass::AssociateType;
52 
53  using typename Superclass::ImageToImageMetricv4Type;
54  using typename Superclass::VirtualPointType;
55  using typename Superclass::VirtualIndexType;
56  using typename Superclass::FixedImagePointType;
57  using typename Superclass::FixedImagePixelType;
58  using typename Superclass::FixedImageGradientType;
59  using typename Superclass::MovingImagePointType;
60  using typename Superclass::MovingImagePixelType;
61  using typename Superclass::MovingImageGradientType;
62  using typename Superclass::MeasureType;
63  using typename Superclass::DerivativeType;
64  using typename Superclass::DerivativeValueType;
65  using typename Superclass::InternalComputationValueType;
66  using typename Superclass::NumberOfParametersType;
67  using 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 & fixedImageValue,
88  const FixedImageGradientType & fixedImageGradient,
89  const MovingImagePointType & mappedMovingPoint,
90  const MovingImagePixelType & movingImageValue,
91  const MovingImageGradientType & movingImageGradient,
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::ImageToImageMetricv4GetValueAndDerivativeThreader
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:44
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::DemonsImageToImageMetricv4GetValueAndDerivativeThreader
DemonsImageToImageMetricv4GetValueAndDerivativeThreader()
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:70
itkImageToImageMetricv4GetValueAndDerivativeThreader.h
itk::SmartPointer< Self >
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader::m_DemonsAssociate
TDemonsMetric * m_DemonsAssociate
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:99
itk::DemonsImageToImageMetricv4GetValueAndDerivativeThreader
Processes points for DemonsImageToImageMetricv4 GetValueAndDerivative.
Definition: itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h:33