ITK  5.2.0
Insight Toolkit
itkBinaryCrossStructuringElement.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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, typename TAllocator = NeighborhoodAllocator<TPixel>>
52 class ITK_TEMPLATE_EXPORT BinaryCrossStructuringElement : public Neighborhood<TPixel, VDimension, TAllocator>
53 {
54 public:
58 
60  using AllocatorType = TAllocator;
61 
63  static constexpr unsigned int NeighborhoodDimension = VDimension;
64 
66  using PixelType = TPixel;
67 
71  using Iterator = typename AllocatorType::iterator;
72  using ConstIterator = typename AllocatorType::const_iterator;
73 
75  using SizeType = typename Superclass::SizeType;
77 
81 
84 
87 
90  {
91  // Default structuring element is defined to be 3x3x3...
92  RadiusType radius;
93  radius.Fill(1);
94  Self::SetRadius(radius);
95  Self::CreateStructuringElement();
96  }
98 
100  ~BinaryCrossStructuringElement() override = default;
101 
104  : Neighborhood<TPixel, VDimension, TAllocator>(other)
105  {}
106 
108  Self &
109  operator=(const Self & other)
110  {
111  Superclass::operator=(other);
112  return *this;
113  }
115 
117  void
118  CreateStructuringElement();
119 
120 protected:
121 private:
122 };
123 } // namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 # include "itkBinaryCrossStructuringElement.hxx"
127 #endif
128 
129 #endif
itk::Size
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition: itkSize.h:69
itk::SliceIterator
A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel access through oper...
Definition: itkSliceIterator.h:48
itk::BinaryCrossStructuringElement::BinaryCrossStructuringElement
BinaryCrossStructuringElement()
Definition: itkBinaryCrossStructuringElement.h:89
itk::Neighborhood
A light-weight container object for storing an N-dimensional neighborhood of values.
Definition: itkNeighborhood.h:54
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::BinaryCrossStructuringElement::OffsetValueType
typename OffsetType::OffsetValueType OffsetValueType
Definition: itkBinaryCrossStructuringElement.h:80
itkNeighborhood.h
itk::Neighborhood::SizeValueType
typename SizeType::SizeValueType SizeValueType
Definition: itkNeighborhood.h:80
itk::Neighborhood::AllocatorType
TAllocator AllocatorType
Definition: itkNeighborhood.h:61
itk::Size::Fill
void Fill(SizeValueType value)
Definition: itkSize.h:211
itk::BinaryCrossStructuringElement::BinaryCrossStructuringElement
BinaryCrossStructuringElement(const Self &other)
Definition: itkBinaryCrossStructuringElement.h:103
itk::BinaryCrossStructuringElement
A Neighborhood that represents a cross structuring element with binary elements.
Definition: itkBinaryCrossStructuringElement.h:52
itk::Neighborhood::Iterator
typename AllocatorType::iterator Iterator
Definition: itkNeighborhood.h:75
itk::Neighborhood::PixelType
TPixel PixelType
Definition: itkNeighborhood.h:70
itk::Neighborhood::ConstIterator
typename AllocatorType::const_iterator ConstIterator
Definition: itkNeighborhood.h:76
itk::Offset
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
Definition: itkOffset.h:67
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::OffsetValueType
signed long OffsetValueType
Definition: itkIntTypes.h:94
itk::BinaryCrossStructuringElement::operator=
Self & operator=(const Self &other)
Definition: itkBinaryCrossStructuringElement.h:109
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83