ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkJointHistogramMutualInformationComputeJointPDFThreader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkJointHistogramMutualInformationComputeJointPDFThreader_h
00019 #define __itkJointHistogramMutualInformationComputeJointPDFThreader_h
00020 
00021 #include "itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h"
00022 #include "itkThreadedImageRegionPartitioner.h"
00023 #include "itkThreadedIndexedContainerPartitioner.h"
00024 
00025 namespace itk
00026 {
00027 
00043 template < class TDomainPartitioner, class TJointHistogramMetric >
00044 class JointHistogramMutualInformationComputeJointPDFThreader
00045 {};
00046 
00051 template < class TJointHistogramMetric >
00052 class JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >
00053   : public JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >
00054 {
00055 public:
00057   typedef JointHistogramMutualInformationComputeJointPDFThreader Self;
00058   typedef JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >
00059                                                                  Superclass;
00060   typedef SmartPointer< Self >                                   Pointer;
00061   typedef SmartPointer< const Self >                             ConstPointer;
00062 
00063   itkTypeMacro( JointHistogramMutualInformationComputeJointPDFThreader, JointHistogramMutualInformationComputeJointPDFThreaderBase );
00064 
00065   itkNewMacro( Self );
00066 
00068   typedef typename Superclass::DomainType    DomainType;
00069   typedef typename Superclass::AssociateType AssociateType;
00070 
00071   typedef typename Superclass::VirtualImageType VirtualImageType;
00072   typedef typename Superclass::VirtualIndexType VirtualIndexType;
00073   typedef typename Superclass::VirtualPointType VirtualPointType;
00074 
00075 protected:
00076   JointHistogramMutualInformationComputeJointPDFThreader() {}
00077 
00079   virtual void ThreadedExecution( const DomainType & subdomain,
00080                                   const ThreadIdType threadId );
00081 
00082 private:
00083   JointHistogramMutualInformationComputeJointPDFThreader( const Self & ); // purposely not implemented
00084   void operator=( const Self & ); // purposely not implemented
00085 };
00086 
00091 template < class TJointHistogramMetric >
00092 class JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >
00093   : public JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >
00094 {
00095 public:
00097   typedef JointHistogramMutualInformationComputeJointPDFThreader Self;
00098   typedef JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >
00099                                                                  Superclass;
00100   typedef SmartPointer< Self >                                   Pointer;
00101   typedef SmartPointer< const Self >                             ConstPointer;
00102 
00103   itkTypeMacro( JointHistogramMutualInformationComputeJointPDFThreader, JointHistogramMutualInformationComputeJointPDFThreaderBase );
00104 
00105   itkNewMacro( Self );
00106 
00108   typedef typename Superclass::DomainType    DomainType;
00109   typedef typename Superclass::AssociateType AssociateType;
00110 
00111   typedef typename Superclass::VirtualImageType VirtualImageType;
00112   typedef typename Superclass::VirtualIndexType VirtualIndexType;
00113   typedef typename Superclass::VirtualPointType VirtualPointType;
00114 
00115   typedef TJointHistogramMetric                                          JointHistogramMetricType;
00116   typedef typename JointHistogramMetricType::VirtualSampledPointSetType  VirtualSampledPointSetType;
00117 
00118 protected:
00119   JointHistogramMutualInformationComputeJointPDFThreader() {}
00120 
00122   virtual void ThreadedExecution( const DomainType & subdomain,
00123                                   const ThreadIdType threadId );
00124 
00125 private:
00126   JointHistogramMutualInformationComputeJointPDFThreader( const Self & ); // purposely not implemented
00127   void operator=( const Self & ); // purposely not implemented
00128 };
00129 } // end namespace itk
00130 
00131 #endif
00132 
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkJointHistogramMutualInformationComputeJointPDFThreader.hxx"
00135 #endif
00136