ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkBinaryBallStructuringElement.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 __itkBinaryBallStructuringElement_h
19 #define __itkBinaryBallStructuringElement_h
20 
21 #include "itkNeighborhood.h"
22 
23 namespace itk
24 {
57 template< class TPixel, unsigned int VDimension = 2,
58  class TAllocator = NeighborhoodAllocator< TPixel > >
60  public Neighborhood< TPixel, VDimension, TAllocator >
61 {
62 public:
66 
68  typedef TAllocator AllocatorType;
69 
71  itkStaticConstMacro(NeighborhoodDimension, unsigned int, VDimension);
72 
74  typedef TPixel PixelType;
75 
79  typedef typename AllocatorType::iterator Iterator;
80  typedef typename AllocatorType::const_iterator ConstIterator;
81 
83  typedef typename Superclass::SizeType SizeType;
85 
87  typedef typename Superclass::RadiusType RadiusType;
88 
91 
94 
97 
100  Neighborhood< TPixel, VDimension, TAllocator >(other)
101  {}
102 
104  Self & operator=(const Self & other)
105  {
106  Superclass::operator=(other);
107  return *this;
108  }
110 
112  void CreateStructuringElement();
113 
114 protected:
115 private:
116 };
117 } // namespace itk
118 
119 // Define instantiation macro for this template.
120 #define ITK_TEMPLATE_BinaryBallStructuringElement(_, EXPORT, TypeX, TypeY) \
121  namespace itk \
122  { \
123  _( 2 ( class EXPORT BinaryBallStructuringElement< ITK_TEMPLATE_2 TypeX > ) ) \
124  namespace Templates \
125  { \
126  typedef BinaryBallStructuringElement< ITK_TEMPLATE_2 TypeX > \
127  BinaryBallStructuringElement##TypeY; \
128  } \
129  }
130 
131 #if ITK_TEMPLATE_EXPLICIT
132 #include "Templates/itkBinaryBallStructuringElement+-.h"
133 #endif
134 
135 #if ITK_TEMPLATE_TXX
136 #include "itkBinaryBallStructuringElement.hxx"
137 #endif
138 
139 #endif
140