ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkJointHistogramMutualInformationComputeJointPDFThreaderBase.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 itkJointHistogramMutualInformationComputeJointPDFThreaderBase_h
19 #define itkJointHistogramMutualInformationComputeJointPDFThreaderBase_h
20 
21 #include "itkDomainThreader.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
26 
35 template < typename TDomainPartitioner, typename TJointHistogramMetric >
37  : public DomainThreader< TDomainPartitioner, TJointHistogramMetric >
38 {
39 public:
41 
47 
49 
51  using DomainType = typename Superclass::DomainType;
52  using AssociateType = typename Superclass::AssociateType;
53 
55  using JointHistogramMetricType = TJointHistogramMetric;
56  using VirtualImageType = typename JointHistogramMetricType::VirtualImageType;
57  using VirtualIndexType = typename JointHistogramMetricType::VirtualIndexType;
58  using VirtualPointType = typename JointHistogramMetricType::VirtualPointType;
59  using JointPDFType = typename JointHistogramMetricType::JointPDFType;
60  using JointPDFIndexType = typename JointHistogramMetricType::JointPDFIndexType;
61  using JointPDFPointType = typename JointHistogramMetricType::JointPDFPointType;
62  using JointPDFValueType = typename JointHistogramMetricType::JointPDFValueType;
63 
64  using InternalComputationValueType = typename JointHistogramMetricType::InternalComputationValueType;
65 
66 protected:
69 
71  void BeforeThreadedExecution() override;
72 
74  virtual void ProcessPoint( const VirtualIndexType & virtualIndex,
75  const VirtualPointType & virtualPoint,
76  const ThreadIdType threadId );
77 
79  void AfterThreadedExecution() override;
80 
82  //TODO: This needs updating
84  {
87  };
88  itkPadStruct( ITK_CACHE_LINE_ALIGNMENT, JointHistogramMIPerThreadStruct,
89  PaddedJointHistogramMIPerThreadStruct);
90  itkAlignedTypedef( ITK_CACHE_LINE_ALIGNMENT, PaddedJointHistogramMIPerThreadStruct,
91  AlignedJointHistogramMIPerThreadStruct );
92  AlignedJointHistogramMIPerThreadStruct * m_JointHistogramMIPerThreadVariables;
93 };
94 
95 } // end namespace itk
96 
97 #endif
98 
99 #ifndef ITK_MANUAL_INSTANTIATION
100 #include "itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx"
101 #endif
Light weight base class for most itk classes.
Multi-threaded processing on a domain by processing sub-domains per thread.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
Templated n-dimensional image class.
Definition: itkImage.h:75