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 
26 namespace itk
27 {
28 
37 template <typename TDomainPartitioner, typename TJointHistogramMetric>
39  : public DomainThreader<TDomainPartitioner, TJointHistogramMetric>
40 {
41 public:
43 
49 
50  itkOverrideGetNameOfClassMacro(JointHistogramMutualInformationComputeJointPDFThreaderBase);
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 
68 protected:
71 
73  void
74  BeforeThreadedExecution() override;
75 
77  virtual void
78  ProcessPoint(const VirtualIndexType & virtualIndex,
79  const VirtualPointType & virtualPoint,
80  const ThreadIdType threadId);
81 
83  void
84  AfterThreadedExecution() override;
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
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::JointPDFType
typename JointHistogramMetricType::JointPDFType JointPDFType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:61
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::InternalComputationValueType
typename JointHistogramMetricType::InternalComputationValueType InternalComputationValueType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:66
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::JointPDFPointType
typename JointHistogramMetricType::JointPDFPointType JointPDFPointType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:63
itkImage.h
itk::SmartPointer< Self >
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase
Compute the JointPDF image.
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:38
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:102
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::JointHistogramMetricType
TJointHistogramMetric JointHistogramMetricType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:57
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::VirtualPointType
typename JointHistogramMetricType::VirtualPointType VirtualPointType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:60
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::VirtualImageType
typename JointHistogramMetricType::VirtualImageType VirtualImageType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:58
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase::JointHistogramMIPerThreadStruct::JointHistogramCount
SizeValueType JointHistogramCount
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:91
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::JointPDFValueType
typename JointHistogramMetricType::JointPDFValueType JointPDFValueType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:64
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::VirtualIndexType
typename JointHistogramMetricType::VirtualIndexType VirtualIndexType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:59
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >::JointPDFIndexType
typename JointHistogramMetricType::JointPDFIndexType JointPDFIndexType
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:62
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase::m_JointHistogramMIPerThreadVariables
std::unique_ptr< AlignedJointHistogramMIPerThreadStruct[]> m_JointHistogramMIPerThreadVariables
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:97
itk::DomainThreader
Multi-threaded processing on a domain by processing sub-domains per thread.
Definition: itkDomainThreader.h:66
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase::JointHistogramMIPerThreadStruct
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:88
itk::JointHistogramMutualInformationComputeJointPDFThreaderBase::JointHistogramMIPerThreadStruct::JointHistogram
JointHistogramType::Pointer JointHistogram
Definition: itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h:90
itkDomainThreader.h
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:86