ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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{
50
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 constexpr auto radius = MakeFilled<RadiusType>(1);
93 Self::SetRadius(radius);
95 }
96
98 ~BinaryCrossStructuringElement() override = default;
99
102 : Neighborhood<TPixel, VDimension, TAllocator>(other)
103 {}
104
106 Self &
107 operator=(const Self & other)
108 {
110 return *this;
111 }
112
114 void
116
117protected:
118private:
119};
120} // namespace itk
121
122#ifndef ITK_MANUAL_INSTANTIATION
123# include "itkBinaryCrossStructuringElement.hxx"
124#endif
125
126#endif
typename OffsetType::OffsetValueType OffsetValueType
Neighborhood< TPixel, VDimension, TAllocator > Superclass
~BinaryCrossStructuringElement() override=default
typename AllocatorType::const_iterator ConstIterator
Neighborhood()=default
void SetRadius(const SizeType &)
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....
constexpr TContainer MakeFilled(typename TContainer::const_reference value)
itk::OffsetValueType OffsetValueType
Definition itkOffset.h:77