SimpleITK  
sitkNeighborhoodConnectedImageFilter.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* http://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 sitkNeighborhoodConnectedImageFilter_h
19#define sitkNeighborhoodConnectedImageFilter_h
20
21/*
22 * WARNING: DO NOT EDIT THIS FILE!
23 * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24 * Please look at sitkImageFilterTemplate.h.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
32
33namespace itk::simple {
34
45public:
47
50
54
57
58
59
60
64 void
65 SetSeedList(std::vector< std::vector<unsigned int> > SeedList )
66 { this->m_SeedList = std::move(SeedList); }
67
70 std::vector< std::vector< unsigned int > >
71 GetSeedList() const { return this->m_SeedList; }
73 void
74 AddSeed( std::vector< unsigned int > point ) { this->m_SeedList.push_back(std::move(point));}
76 void
77 ClearSeeds( ) { this->m_SeedList.clear();}
78
79
83 void
84 SetLower(double Lower )
85 { this->m_Lower = Lower; }
86
89 double
90 GetLower() const { return this->m_Lower; }
91
92
96 void
97 SetUpper(double Upper )
98 { this->m_Upper = Upper; }
99
102 double
103 GetUpper() const { return this->m_Upper; }
104
105
109 void
110 SetRadius(std::vector<unsigned int> Radius )
111 { this->m_Radius = std::move(Radius); }
112
114 void
115 SetRadius( unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value); }
119 std::vector<unsigned int>
120 GetRadius() const { return this->m_Radius; }
121
122
127 void
128 SetReplaceValue(double ReplaceValue )
129 { this->m_ReplaceValue = ReplaceValue; }
130
134 double
135 GetReplaceValue() const { return this->m_ReplaceValue; }
136
137
139 std::string GetName() const { return std::string("NeighborhoodConnectedImageFilter"); }
140
142 std::string ToString() const;
143
144
146 Image Execute(const Image &image1);
147
148
149private:
151 using MemberFunctionType = Image (Self::*)(const Image &image1);
152 template <class TImageType> Image ExecuteInternal(const Image &image1);
155
156
157 std::vector< std::vector<unsigned int> > m_SeedList{ std::vector< std::vector<unsigned int > >() };
158
159 double m_Lower{ 0 };
160
161 double m_Upper{ 1 };
162
163 /* Radius of the neighborhood used to compute the median */
164 std::vector<unsigned int> m_Radius{ std::vector<unsigned int>(3, 1) };
165
166 /* Pixels that lie within Lower and Upper (inclusive)
167 will be replaced with this value. The default is 1. */
168 double m_ReplaceValue{ 1 };
169
170
171
172
173
174
175
176};
177
178
188 const Image &image1, std::vector< std::vector<unsigned int> > seedList = std::vector< std::vector<unsigned int > >(), double lower = 0, double upper = 1, std::vector<unsigned int> radius = std::vector<unsigned int>(3, 1), double replaceValue = 1
189);
190
192
193}
194#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
std::vector< std::vector< unsigned int > > GetSeedList() const
Get list of seeds.
void AddSeed(std::vector< unsigned int > point)
Add SeedList point.
Image ExecuteInternal(const Image &image1)
void SetSeedList(std::vector< std::vector< unsigned int > > SeedList)
Set list of image indexes for seeds.
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
A class used to instantiate and generate function object to templated member functions.
Image NeighborhoodConnected(const Image &image1, std::vector< std::vector< unsigned int > > seedList=std::vector< std::vector< unsigned int > >(), double lower=0, double upper=1, std::vector< unsigned int > radius=std::vector< unsigned int >(3, 1), double replaceValue=1)
Label pixels that are connected to a seed and lie within a neighborhood.
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
#define SITKBasicFilters_EXPORT