ITK
4.3.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkThreadedIteratorRangePartitioner.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 __itkThreadedIteratorRangePartitioner_h
19
#define __itkThreadedIteratorRangePartitioner_h
20
21
#include "
itkThreadedDomainPartitioner.h
"
22
23
namespace
itk
24
{
25
26
template
<
class
TIterator >
27
class
ThreadedIteratorRangePartitioner
;
28
36
template
<
class
TIterator >
37
class
ThreadedIteratorRangePartitionerDomain
38
{
39
public
:
40
typedef
TIterator
IteratorType
;
41
typedef
ThreadedIteratorRangePartitionerDomain
Self
;
42
43
ThreadedIteratorRangePartitionerDomain
() {}
44
45
ThreadedIteratorRangePartitionerDomain
(
const
IteratorType
& begin,
const
IteratorType
& end )
46
{
47
this->
m_Begin
= begin;
48
this->
m_End
= end;
49
}
50
51
ThreadedIteratorRangePartitionerDomain
(
const
Self
& rhs )
52
{
53
this->
m_Begin
= rhs.
m_Begin
;
54
this->
m_End
= rhs.
m_End
;
55
}
56
57
void
operator=
(
const
Self
& rhs )
58
{
59
if
(
this
== & rhs )
60
{
61
return
;
62
}
63
this->
m_Begin
= rhs.
m_Begin
;
64
this->
m_End
= rhs.
m_End
;
65
}
66
67
const
IteratorType
&
Begin
()
const
68
{
69
return
this->
m_Begin
;
70
}
71
const
IteratorType
&
End
()
const
72
{
73
return
this->
m_End
;
74
}
75
76
private
:
77
friend
class
ThreadedIteratorRangePartitioner
<
IteratorType
>;
78
IteratorType
m_Begin
;
79
IteratorType
m_End
;
80
};
81
103
template
<
class
TIterator >
104
class
ITK_EXPORT
ThreadedIteratorRangePartitioner
105
:
public
ThreadedDomainPartitioner
< ThreadedIteratorRangePartitionerDomain< TIterator > >
106
{
107
public
:
109
typedef
ThreadedIteratorRangePartitioner
Self
;
110
typedef
ThreadedDomainPartitioner< ThreadedIteratorRangePartitionerDomain< TIterator >
>
Superclass
;
111
typedef
SmartPointer< Self >
Pointer
;
112
typedef
SmartPointer< const Self >
ConstPointer
;
113
115
itkNewMacro(
Self
);
116
118
itkTypeMacro(
ThreadedIteratorRangePartitioner
,
ThreadedDomainPartitioner
);
119
121
typedef
typename
Superclass::DomainType
DomainType
;
122
123
typedef
TIterator
IteratorType
;
124
131
virtual
132
ThreadIdType
PartitionDomain(
const
ThreadIdType
i,
133
const
ThreadIdType
requestedTotal,
134
const
DomainType
& completeDomain,
135
DomainType
& subdomain)
const
;
136
137
protected
:
138
ThreadedIteratorRangePartitioner
();
139
virtual
~
ThreadedIteratorRangePartitioner
();
140
141
private
:
142
ThreadedIteratorRangePartitioner
(
const
Self
&);
//purposely not implemented
143
void
operator=(
const
Self
&);
//purposely not implemented
144
145
};
146
147
}
// end namespace itk
148
149
#ifndef ITK_MANUAL_INSTANTIATION
150
#include "itkThreadedIteratorRangePartitioner.hxx"
151
#endif
152
153
#endif
154
Generated on Sun Dec 9 2012 01:28:35 for ITK by
1.8.2