SimpleITK  
sitkConnectedThresholdImageFilter.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 sitkConnectedThresholdImageFilter_h
19#define sitkConnectedThresholdImageFilter_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 SetReplaceValue ( uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
95
99 uint8_t GetReplaceValue() const { return this->m_ReplaceValue; }
100
101 typedef enum {FaceConnectivity,FullConnectivity} ConnectivityType;\
102
106 SITK_RETURN_SELF_TYPE_HEADER SetConnectivity ( ConnectivityType Connectivity ) { this->m_Connectivity = Connectivity; return *this; }
107
112
114 std::string GetName() const { return std::string ("ConnectedThresholdImageFilter"); }
115
117 std::string ToString() const;
118
119
121
122 Image Execute ( const Image& image1 );
123
124 private:
125
127
128 using MemberFunctionType = Image (Self::*)( const Image& image1 );
129 template <class TImageType> Image ExecuteInternal ( const Image& image1 );
130
131
133
134 std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
135
136
137 std::vector< std::vector<unsigned int> > m_SeedList{std::vector< std::vector<unsigned int > >()};
138
139 double m_Lower{0};
140
141 double m_Upper{1};
142
143 /* Pixels that lie within Lower and Upper (inclusive)
144will be replaced with this value. The default is 1. */
145 uint8_t m_ReplaceValue{1u};
146
148
149
150 };
151
161
162 SITKBasicFilters_EXPORT Image ConnectedThreshold ( const Image& image1, std::vector< std::vector<unsigned int> > seedList = std::vector< std::vector<unsigned int > >(), double lower = 0, double upper = 1, uint8_t replaceValue = 1u, ConnectedThresholdImageFilter::ConnectivityType connectivity = itk::simple::ConnectedThresholdImageFilter::FaceConnectivity );
163
165}
166#endif
Self & AddSeed(std::vector< unsigned int > point)
Add SeedList point.
std::vector< std::vector< unsigned int > > GetSeedList() const
Get list of seeds.
std::vector< std::vector< unsigned int > > m_SeedList
Self & SetSeedList(std::vector< std::vector< unsigned int > > SeedList)
Set list of image indexes for seeds.
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Image ExecuteInternal(const Image &image1)
Image Execute(const Image &image1)
The Image class for SimpleITK.
Definition sitkImage.h:77
Image ConnectedThreshold(const Image &image1, std::vector< std::vector< unsigned int > > seedList=std::vector< std::vector< unsigned int > >(), double lower=0, double upper=1, uint8_t replaceValue=1u, ConnectedThresholdImageFilter::ConnectivityType connectivity=itk::simple::ConnectedThresholdImageFilter::FaceConnectivity)
Label pixels that are connected to a seed and lie within a range of values.
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