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
23namespace itk
24{
51template <typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
52class ITK_TEMPLATE_EXPORT BinaryCrossStructuringElement : public Neighborhood<TPixel, VDimension, TAllocator>
53{
54public:
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 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
118
119protected:
120private:
121};
122} // namespace itk
123
124#ifndef ITK_MANUAL_INSTANTIATION
125# include "itkBinaryCrossStructuringElement.hxx"
126#endif
127
128#endif
Pixel-wise addition of two images.
A Neighborhood that represents a cross structuring element with binary elements.
typename OffsetType::OffsetValueType OffsetValueType
~BinaryCrossStructuringElement() override=default
typename AllocatorType::const_iterator ConstIterator
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...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86
long OffsetValueType
Definition: itkIntTypes.h:97