ITK  4.6.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;
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();
70 
72  virtual void ProcessPoint( const VirtualIndexType & virtualIndex,
73  const VirtualPointType & virtualPoint,
74  const ThreadIdType threadId );
75 
77  virtual void AfterThreadedExecution();
78 
80  //TODO: This needs updating
82  {
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:
93  JointHistogramMutualInformationComputeJointPDFThreaderBase( const Self & ); // purposely not implemented
94  void operator=( const Self & ); // purposely not implemented
95 };
96 
97 } // end namespace itk
98 
99 #endif
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx"
103 #endif
Light weight base class for most itk classes.
Multi-threaded processing on a domain by processing sub-domains per thread.
virtual void ProcessPoint(const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
unsigned long SizeValueType
Definition: itkIntTypes.h:143
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, JointHistogramMIPerThreadStruct, PaddedJointHistogramMIPerThreadStruct)
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedJointHistogramMIPerThreadStruct, AlignedJointHistogramMIPerThreadStruct)
Templated n-dimensional image class.
Definition: itkImage.h:75
unsigned int ThreadIdType
Definition: itkIntTypes.h:159