ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkThreadedDomainPartitioner_h 00019 #define __itkThreadedDomainPartitioner_h 00020 00021 #include "itkIntTypes.h" 00022 #include "itkMultiThreader.h" 00023 #include "itkObject.h" 00024 00025 namespace itk 00026 { 00027 00048 template <class TDomain > 00049 class ITK_EXPORT ThreadedDomainPartitioner : public Object 00050 { 00051 public: 00053 typedef ThreadedDomainPartitioner Self; 00054 typedef Object Superclass; 00055 typedef SmartPointer<Self> Pointer; 00056 typedef SmartPointer<const Self> ConstPointer; 00057 00059 itkTypeMacro(ThreadedDomainPartitioner, Object); 00060 00062 typedef TDomain DomainType; 00063 00075 virtual 00076 ThreadIdType PartitionDomain(const ThreadIdType threadID, 00077 const ThreadIdType requestedTotal, 00078 const DomainType& completeDomain, 00079 DomainType& subdomain) const = 0; 00080 00081 protected: 00082 ThreadedDomainPartitioner(){} 00083 ~ThreadedDomainPartitioner(){} 00084 00085 private: 00086 ThreadedDomainPartitioner(const Self&); //purposely not implemented 00087 void operator=(const Self&); //purposely not implemented 00088 }; 00089 00090 } // end namespace itk 00091 00092 #endif 00093