ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkBinaryCrossStructuringElement.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 itkBinaryCrossStructuringElement_h
19 #define itkBinaryCrossStructuringElement_h
20 
21 #include "itkNeighborhood.h"
22 
23 namespace itk
24 {
51 template< typename TPixel, unsigned int VDimension = 2,
52  typename TAllocator = NeighborhoodAllocator< TPixel > >
53 class ITK_TEMPLATE_EXPORT BinaryCrossStructuringElement:
54  public Neighborhood< TPixel, VDimension, TAllocator >
55 {
56 public:
60 
62  typedef TAllocator AllocatorType;
63 
65  itkStaticConstMacro(NeighborhoodDimension, unsigned int, VDimension);
66 
68  typedef TPixel PixelType;
69 
73  typedef typename AllocatorType::iterator Iterator;
74  typedef typename AllocatorType::const_iterator ConstIterator;
75 
77  typedef typename Superclass::SizeType SizeType;
79 
83 
85  typedef typename Superclass::RadiusType RadiusType;
86 
89 
92  {
93  // Default structuring element is defined to be 3x3x3...
94  RadiusType radius;
95  radius.Fill(1);
96  this->SetRadius(radius);
97  }
99 
102 
105  Neighborhood< TPixel, VDimension, TAllocator >(other)
106  {}
107 
109  Self & operator=(const Self & other)
110  {
111  Superclass::operator=(other);
112  return *this;
113  }
115 
117  void CreateStructuringElement();
118 
119 protected:
120 
121 private:
122 };
123 } // namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 #include "itkBinaryCrossStructuringElement.hxx"
127 #endif
128 
129 #endif
A light-weight container object for storing an N-dimensional neighborhood of values.
A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel access through oper...
Neighborhood< TPixel, VDimension, TAllocator > Superclass
SizeType::SizeValueType SizeValueType
A Neighborhood that represents a cross structuring element with binary elements.
itk::OffsetValueType OffsetValueType
Definition: itkOffset.h:70