ITK  6.0.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  * https://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 typename Superclass::SizeType;
76  using typename Superclass::SizeValueType;
77 
79  using typename Superclass::OffsetType;
81 
83  using typename Superclass::RadiusType;
84 
87 
90  {
91  // Default structuring element is defined to be 3x3x3...
92  constexpr auto radius = MakeFilled<RadiusType>(1);
93  Self::SetRadius(radius);
94  Self::CreateStructuringElement();
95  }
99  ~BinaryCrossStructuringElement() override = default;
100 
103  : Neighborhood<TPixel, VDimension, TAllocator>(other)
104  {}
105 
107  Self &
108  operator=(const Self & other)
109  {
110  Superclass::operator=(other);
111  return *this;
112  }
116  void
117  CreateStructuringElement();
118 
119 protected:
120 private:
121 };
122 } // namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 # include "itkBinaryCrossStructuringElement.hxx"
126 #endif
127 
128 #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::AllocatorType
TAllocator AllocatorType
Definition: itkNeighborhood.h:61
itk::BinaryCrossStructuringElement::BinaryCrossStructuringElement
BinaryCrossStructuringElement(const Self &other)
Definition: itkBinaryCrossStructuringElement.h:102
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::OffsetValueType
long OffsetValueType
Definition: itkIntTypes.h:97
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:66
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
AddImageFilter
Definition: itkAddImageFilter.h:81
itk::BinaryCrossStructuringElement::operator=
Self & operator=(const Self &other)
Definition: itkBinaryCrossStructuringElement.h:108
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:86