ITK  4.13.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:
45 
47 
49  typedef typename Superclass::DomainType DomainType;
50  typedef typename Superclass::AssociateType AssociateType;
51 
53  typedef TJointHistogramMetric JointHistogramMetricType;
54  typedef typename JointHistogramMetricType::VirtualImageType VirtualImageType;
55  typedef typename JointHistogramMetricType::VirtualIndexType VirtualIndexType;
56  typedef typename JointHistogramMetricType::VirtualPointType VirtualPointType;
57  typedef typename JointHistogramMetricType::JointPDFType JointPDFType;
58  typedef typename JointHistogramMetricType::JointPDFIndexType JointPDFIndexType;
59  typedef typename JointHistogramMetricType::JointPDFPointType JointPDFPointType;
60  typedef typename JointHistogramMetricType::JointPDFValueType JointPDFValueType;
61 
62  typedef typename JointHistogramMetricType::InternalComputationValueType InternalComputationValueType;
63 
64 protected:
67 
69  virtual void BeforeThreadedExecution() ITK_OVERRIDE;
70 
72  virtual void ProcessPoint( const VirtualIndexType & virtualIndex,
73  const VirtualPointType & virtualPoint,
74  const ThreadIdType threadId );
75 
77  virtual void AfterThreadedExecution() ITK_OVERRIDE;
78 
80  //TODO: This needs updating
82  {
84  SizeValueType JointHistogramCount;
85  };
86  itkPadStruct( ITK_CACHE_LINE_ALIGNMENT, JointHistogramMIPerThreadStruct,
87  PaddedJointHistogramMIPerThreadStruct);
88  itkAlignedTypedef( ITK_CACHE_LINE_ALIGNMENT, PaddedJointHistogramMIPerThreadStruct,
89  AlignedJointHistogramMIPerThreadStruct );
90  AlignedJointHistogramMIPerThreadStruct * m_JointHistogramMIPerThreadVariables;
91 
92 private:
94 };
95 
96 } // end namespace itk
97 
98 #endif
99 
100 #ifndef ITK_MANUAL_INSTANTIATION
101 #include "itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx"
102 #endif
Multi-threaded processing on a domain by processing sub-domains per thread.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Templated n-dimensional image class.
Definition: itkImage.h:75