ITK  6.0.0
Insight Toolkit
itkJointHistogramMutualInformationComputeJointPDFThreaderBase.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 * https://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#include <memory> // For unique_ptr.
25
26namespace itk
27{
28
37template <typename TDomainPartitioner, typename TJointHistogramMetric>
39 : public DomainThreader<TDomainPartitioner, TJointHistogramMetric>
40{
41public:
43
49
51
53 using typename Superclass::DomainType;
54 using typename Superclass::AssociateType;
55
57 using JointHistogramMetricType = TJointHistogramMetric;
58 using VirtualImageType = typename JointHistogramMetricType::VirtualImageType;
59 using VirtualIndexType = typename JointHistogramMetricType::VirtualIndexType;
60 using VirtualPointType = typename JointHistogramMetricType::VirtualPointType;
61 using JointPDFType = typename JointHistogramMetricType::JointPDFType;
62 using JointPDFIndexType = typename JointHistogramMetricType::JointPDFIndexType;
63 using JointPDFPointType = typename JointHistogramMetricType::JointPDFPointType;
64 using JointPDFValueType = typename JointHistogramMetricType::JointPDFValueType;
65
66 using InternalComputationValueType = typename JointHistogramMetricType::InternalComputationValueType;
67
68protected:
71
73 void
75
77 virtual void
78 ProcessPoint(const VirtualIndexType & virtualIndex,
79 const VirtualPointType & virtualPoint,
80 const ThreadIdType threadId);
81
83 void
85
87 // TODO: This needs updating
89 {
92 };
93 itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, JointHistogramMIPerThreadStruct, PaddedJointHistogramMIPerThreadStruct);
94 itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT,
95 PaddedJointHistogramMIPerThreadStruct,
96 AlignedJointHistogramMIPerThreadStruct);
97 std::unique_ptr<AlignedJointHistogramMIPerThreadStruct[]> m_JointHistogramMIPerThreadVariables;
98};
99
100} // end namespace itk
101
102#ifndef ITK_MANUAL_INSTANTIATION
103# include "itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx"
104#endif
105
106#endif
Multi-threaded processing on a domain by processing sub-domains per thread.
Templated n-dimensional image class.
Definition: itkImage.h:89
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedJointHistogramMIPerThreadStruct, AlignedJointHistogramMIPerThreadStruct)
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, JointHistogramMIPerThreadStruct, PaddedJointHistogramMIPerThreadStruct)
virtual void ProcessPoint(const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
Light weight base class for most itk classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
Definition: itkIntTypes.h:102
unsigned long SizeValueType
Definition: itkIntTypes.h:86