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 
32 namespace 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 
123  Image Execute ( const Image& image1 );
124 
125  private:
126 
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 
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
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
itk::simple::NeighborhoodConnectedImageFilter::SetReplaceValue
Self & SetReplaceValue(double ReplaceValue)
Definition: sitkNeighborhoodConnectedImageFilter.h:107
sitkBasicFilters.h
itk::simple::NeighborhoodConnectedImageFilter::SetSeedList
Self & SetSeedList(std::vector< std::vector< unsigned int > > SeedList)
Set list of image indexes for seeds.
Definition: sitkNeighborhoodConnectedImageFilter.h:59
itk::simple::NeighborhoodConnectedImageFilter
Label pixels that are connected to a seed and lie within a neighborhood.
Definition: sitkNeighborhoodConnectedImageFilter.h:41
itk::simple::NeighborhoodConnectedImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkNeighborhoodConnectedImageFilter.h:53
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::NeighborhoodConnectedImageFilter::SetRadius
Self & SetRadius(std::vector< unsigned int > Radius)
Definition: sitkNeighborhoodConnectedImageFilter.h:94
itk::simple::BasicPixelIDTypeList
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
Definition: sitkPixelIDTypeLists.h:51
sitkImageFilter.h
itk::simple::NeighborhoodConnectedImageFilter::SetLower
Self & SetLower(double Lower)
Definition: sitkNeighborhoodConnectedImageFilter.h:74
itk::point
*par Constraints *The filter requires an 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
itk::simple::NeighborhoodConnectedImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkNeighborhoodConnectedImageFilter.h:135
itk::simple::NeighborhoodConnectedImageFilter::AddSeed
Self & AddSeed(std::vector< unsigned int > point)
Add SeedList point.
Definition: sitkNeighborhoodConnectedImageFilter.h:66
itk::simple::NeighborhoodConnectedImageFilter::GetReplaceValue
double GetReplaceValue() const
Definition: sitkNeighborhoodConnectedImageFilter.h:112
itk::simple::NeighborhoodConnectedImageFilter::SetRadius
Self & SetRadius(unsigned int value)
Definition: sitkNeighborhoodConnectedImageFilter.h:97
itk::simple::NeighborhoodConnectedImageFilter::GetSeedList
std::vector< std::vector< unsigned int > > GetSeedList() const
Get list of seeds.
Definition: sitkNeighborhoodConnectedImageFilter.h:64
itk::simple::NeighborhoodConnectedImageFilter::GetName
std::string GetName() const
Definition: sitkNeighborhoodConnectedImageFilter.h:115
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::NeighborhoodConnectedImageFilter::GetLower
double GetLower() const
Definition: sitkNeighborhoodConnectedImageFilter.h:79
itk::simple::NeighborhoodConnectedImageFilter::MemberFunctionType
Image(Self::*)(const Image &image1) MemberFunctionType
Definition: sitkNeighborhoodConnectedImageFilter.h:129
itk::simple::NeighborhoodConnectedImageFilter::GetUpper
double GetUpper() const
Definition: sitkNeighborhoodConnectedImageFilter.h:89
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::simple::NeighborhoodConnected
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.
itk::Image
Definition: sitkPixelIDTypes.h:28
itk::simple::NeighborhoodConnectedImageFilter::ClearSeeds
Self & ClearSeeds()
Remove all SeedList points.
Definition: sitkNeighborhoodConnectedImageFilter.h:68
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::NeighborhoodConnectedImageFilter::SetUpper
Self & SetUpper(double Upper)
Definition: sitkNeighborhoodConnectedImageFilter.h:84
itk::simple::NeighborhoodConnectedImageFilter::GetRadius
std::vector< unsigned int > GetRadius() const
Definition: sitkNeighborhoodConnectedImageFilter.h:102