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.in to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
31
32namespace itk::simple {
33
42 public:
44
47
51
54\
55
59 SITK_RETURN_SELF_TYPE_HEADER SetSeedList ( std::vector< std::vector<unsigned int> > SeedList ) { this->m_SeedList = std::move(SeedList); return *this; }
60
64 std::vector< std::vector< unsigned int > > GetSeedList() const { return this->m_SeedList; }
66 SITK_RETURN_SELF_TYPE_HEADER AddSeed( std::vector< unsigned int > point ) { this->m_SeedList.push_back(std::move(point)); return *this;}
68 SITK_RETURN_SELF_TYPE_HEADER ClearSeeds( ) { this->m_SeedList.clear(); return *this;}
69\
70
74 SITK_RETURN_SELF_TYPE_HEADER SetLower ( double Lower ) { this->m_Lower = Lower; return *this; }
75
79 double GetLower() const { return this->m_Lower; }\
80
84 SITK_RETURN_SELF_TYPE_HEADER SetUpper ( double Upper ) { this->m_Upper = Upper; return *this; }
85
89 double GetUpper() const { return this->m_Upper; }\
90
94 SITK_RETURN_SELF_TYPE_HEADER SetRadius ( std::vector<unsigned int> Radius ) { this->m_Radius = std::move(Radius); return *this; }
95
97 SITK_RETURN_SELF_TYPE_HEADER SetRadius( unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value); return *this; }
98
102 std::vector<unsigned int> GetRadius() const { return this->m_Radius; }\
103
107 SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue ( double ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
108
112 double GetReplaceValue() const { return this->m_ReplaceValue; }
113
115 std::string GetName() const { return std::string ("NeighborhoodConnectedImageFilter"); }
116
118 std::string ToString() const;
119
120
122
123 Image Execute ( const Image& image1 );
124
125 private:
126
128
129 using MemberFunctionType = Image (Self::*)( const Image& image1 );
130 template <class TImageType> Image ExecuteInternal ( const Image& image1 );
131
132
134
135 std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
136
137
138 std::vector< std::vector<unsigned int> > m_SeedList{std::vector< std::vector<unsigned int > >()};
139
140 double m_Lower{0};
141
142 double m_Upper{1};
143
144 /* Radius of the neighborhood used to compute the median */
145 std::vector<unsigned int> m_Radius{std::vector<unsigned int>(3, 1)};
146
147 /* Pixels that lie within Lower and Upper (inclusive)
148 will be replaced with this value. The default is 1. */
149 double m_ReplaceValue{1};
150
151
152 };
153
163
164 SITKBasicFilters_EXPORT 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 );
165
167}
168#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
std::vector< std::vector< unsigned int > > GetSeedList() const
Get list of seeds.
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Image ExecuteInternal(const Image &image1)
Self & AddSeed(std::vector< unsigned int > point)
Add SeedList point.
Self & SetSeedList(std::vector< std::vector< unsigned int > > SeedList)
Set list of image indexes for seeds.
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
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
#define SITKBasicFilters_EXPORT