ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.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 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:
42 
44 
45  itkNewMacro( Self );
46 
47  typedef typename Superclass::DomainType DomainType;
48  typedef typename Superclass::AssociateType AssociateType;
49 
50  typedef typename Superclass::ImageToImageMetricv4Type ImageToImageMetricv4Type;
51  typedef typename Superclass::VirtualPointType VirtualPointType;
52  typedef typename Superclass::VirtualIndexType VirtualIndexType;
53  typedef typename Superclass::FixedImagePointType FixedImagePointType;
54  typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
55  typedef typename Superclass::FixedImageGradientType FixedImageGradientType;
56  typedef typename Superclass::MovingImagePointType MovingImagePointType;
57  typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
58  typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
59  typedef typename Superclass::MeasureType MeasureType;
60  typedef typename Superclass::DerivativeType DerivativeType;
61  typedef typename Superclass::DerivativeValueType DerivativeValueType;
62  typedef typename Superclass::InternalComputationValueType InternalComputationValueType;
63  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
64  typedef typename Superclass::ImageDimensionType ImageDimensionType;
65 
66 protected:
68  m_DemonsAssociate(ITK_NULLPTR)
69  {}
70 
74  virtual void BeforeThreadedExecution() ITK_OVERRIDE;
75 
79  virtual bool ProcessPoint(
80  const VirtualIndexType & virtualIndex,
81  const VirtualPointType & virtualPoint,
82  const FixedImagePointType & mappedFixedPoint,
83  const FixedImagePixelType & mappedFixedPixelValue,
84  const FixedImageGradientType & mappedFixedImageGradient,
85  const MovingImagePointType & mappedMovingPoint,
86  const MovingImagePixelType & mappedMovingPixelValue,
87  const MovingImageGradientType & mappedMovingImageGradient,
88  MeasureType & metricValueReturn,
89  DerivativeType & localDerivativeReturn,
90  const ThreadIdType threadId ) const ITK_OVERRIDE;
91 
92 private:
93  DemonsImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
94  void operator=( const Self & ); // purposely not implemented
95 
98  TDemonsMetric * m_DemonsAssociate;
99 };
100 
101 } // end namespace itk
102 
103 #ifndef ITK_MANUAL_INSTANTIATION
104 #include "itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
105 #endif
106 
107 #endif
Processes points for DemonsImageToImageMetricv4 GetValueAndDerivative.
virtual bool ProcessPoint(const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const FixedImagePointType &mappedFixedPoint, const FixedImagePixelType &mappedFixedPixelValue, const FixedImageGradientType &mappedFixedImageGradient, const MovingImagePointType &mappedMovingPoint, const MovingImagePixelType &mappedMovingPixelValue, const MovingImageGradientType &mappedMovingImageGradient, MeasureType &metricValueReturn, DerivativeType &localDerivativeReturn, const ThreadIdType threadId) const override
ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric > Superclass
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.