ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLevelSetNeighborhoodExtractor.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 itkLevelSetNeighborhoodExtractor_h
19#define itkLevelSetNeighborhoodExtractor_h
20
22#include "itkLevelSet.h"
23#include "itkIndex.h"
24
25namespace itk
26{
54template <typename TLevelSet>
55class ITK_TEMPLATE_EXPORT LevelSetNeighborhoodExtractor : public LightProcessObject
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(LevelSetNeighborhoodExtractor);
59
65
67 itkNewMacro(Self);
68
70 itkOverrideGetNameOfClassMacro(LevelSetNeighborhoodExtractor);
71
81
83 static constexpr unsigned int SetDimension = LevelSetType::SetDimension;
84
87
89 itkSetConstObjectMacro(InputLevelSet, LevelSetImageType);
90 itkGetConstObjectMacro(InputLevelSet, LevelSetImageType);
92
94 itkSetMacro(LevelSetValue, double);
95
97 itkGetConstMacro(LevelSetValue, double);
98
100 itkSetClampMacro(NarrowBandwidth, double, 0.0, NumericTraits<double>::max());
101
103 itkGetConstMacro(NarrowBandwidth, double);
104
106 itkSetMacro(NarrowBanding, bool);
107
109 itkGetConstMacro(NarrowBanding, bool);
110 itkBooleanMacro(NarrowBanding);
112
115 void
117 itkGetModifiableObjectMacro(InputNarrowBand, NodeContainer);
119
124 {
125 return m_InsidePoints;
126 }
127
130 NodeContainerPointer
132 {
133 return m_OutsidePoints;
134 }
135
138 void
140
141protected:
143 ~LevelSetNeighborhoodExtractor() override = default;
144 void
145 PrintSelf(std::ostream & os, Indent indent) const override;
146
147 typename LevelSetImageType::PixelType
149 {
150 return m_LargeValue;
151 }
152
153 const NodeType &
154 GetNodeUsedInCalculation(unsigned int idx) const
155 {
156 return m_NodesUsed[idx];
157 }
158
159 virtual void
161
162 virtual double
164
165 void
166 GenerateData() override;
167
168 bool
170 {
171 return m_LastPointIsInside;
172 }
173
174private:
175 void
177
178 void
180
181 double m_LevelSetValue{ 0.0 };
182
185
187
188 bool m_NarrowBanding{ false };
189 double m_NarrowBandwidth{ 12.0 };
191
192 typename LevelSetImageType::RegionType m_ImageRegion{};
193 typename LevelSetImageType::PixelType m_LargeValue{};
194
195 std::vector<NodeType> m_NodesUsed{};
196
197 bool m_LastPointIsInside{ false };
198};
199} // namespace itk
200
201#ifndef ITK_MANUAL_INSTANTIATION
202# include "itkLevelSetNeighborhoodExtractor.hxx"
203#endif
204
205#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
void PrintSelf(std::ostream &os, Indent indent) const override
LevelSetImageType::PixelType GetLargeValue() const
void SetInputNarrowBand(NodeContainer *ptr)
typename LevelSetType::NodeContainer NodeContainer
const NodeType & GetNodeUsedInCalculation(unsigned int idx) const
~LevelSetNeighborhoodExtractor() override=default
typename LevelSetType::LevelSetImageType LevelSetImageType
typename LevelSetType::NodeContainerPointer NodeContainerPointer
typename LevelSetType::LevelSetPointer LevelSetPointer
virtual double CalculateDistance(IndexType &index)
typename LevelSetType::LevelSetConstPointer LevelSetConstPointer
Level set type information.
Definition itkLevelSet.h:41
LevelSetNode< PixelType, Self::SetDimension > NodeType
Definition itkLevelSet.h:58
typename TLevelSet::PixelType PixelType
Definition itkLevelSet.h:55
typename TLevelSet::ConstPointer LevelSetConstPointer
Definition itkLevelSet.h:52
typename NodeContainer::Pointer NodeContainerPointer
Definition itkLevelSet.h:64
static constexpr unsigned int SetDimension
Definition itkLevelSet.h:48
VectorContainer< unsigned int, NodeType > NodeContainer
Definition itkLevelSet.h:61
typename TLevelSet::Pointer LevelSetPointer
Definition itkLevelSet.h:51
static constexpr T max(const T &)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional index in a n-dimensional image.
Definition itkIndex.h:69