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 RadiusType radius;
93 radius.Fill(1);
94 Self::SetRadius(radius);
95 Self::CreateStructuringElement();
96 }
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 }
117 void
119
120protected:
121private:
122};
123} // namespace itk
124
125#ifndef ITK_MANUAL_INSTANTIATION
126# include "itkBinaryCrossStructuringElement.hxx"
127#endif
128
129#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
void Fill(SizeValueType value)
Definition: itkSize.h:211