ITK  4.3.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 < class TDomainPartitioner, class 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:
66 
68  virtual void BeforeThreadedExecution();
69 
71  virtual void ProcessPoint( const VirtualIndexType & virtualIndex,
72  const VirtualPointType & virtualPoint,
73  const ThreadIdType threadId );
74 
76  virtual void AfterThreadedExecution();
77 
79  std::vector< typename JointHistogramType::Pointer > m_JointHistogramPerThread;
80  std::vector< SizeValueType > m_JointHistogramCountPerThread;
81 
82 private:
83  JointHistogramMutualInformationComputeJointPDFThreaderBase( const Self & ); // purposely not implemented
84  void operator=( const Self & ); // purposely not implemented
85 };
86 
87 } // end namespace itk
88 
89 #endif
90 
91 #ifndef ITK_MANUAL_INSTANTIATION
92 #include "itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx"
93 #endif
94