SimpleITK  2.0.0rc2.post17
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 {
33  namespace simple {
34 
43  public:
45 
48 
52 
55 \
56 
60  SITK_RETURN_SELF_TYPE_HEADER SetSeedList ( std::vector< std::vector<unsigned int> > SeedList ) { this->m_SeedList = std::move(SeedList); return *this; }
61 
65  std::vector< std::vector< unsigned int > > GetSeedList() const { return this->m_SeedList; }
67  SITK_RETURN_SELF_TYPE_HEADER AddSeed( std::vector< unsigned int > point ) { this->m_SeedList.push_back(std::move(point)); return *this;}
69  SITK_RETURN_SELF_TYPE_HEADER ClearSeeds( ) { this->m_SeedList.clear(); return *this;}
70 \
71 
75  SITK_RETURN_SELF_TYPE_HEADER SetLower ( double Lower ) { this->m_Lower = Lower; return *this; }
76 
80  double GetLower() const { return this->m_Lower; }\
81 
85  SITK_RETURN_SELF_TYPE_HEADER SetUpper ( double Upper ) { this->m_Upper = Upper; return *this; }
86 
90  double GetUpper() const { return this->m_Upper; }\
91 
95  SITK_RETURN_SELF_TYPE_HEADER SetRadius ( std::vector<unsigned int> Radius ) { this->m_Radius = std::move(Radius); return *this; }
96 
98  SITK_RETURN_SELF_TYPE_HEADER SetRadius( unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value); return *this; }
99 
103  std::vector<unsigned int> GetRadius() const { return this->m_Radius; }\
104 
108  SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue ( double ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
109 
113  double GetReplaceValue() const { return this->m_ReplaceValue; }
114 
116  std::string GetName() const { return std::string ("NeighborhoodConnectedImageFilter"); }
117 
119  std::string ToString() const;
120 
121 
124  Image Execute ( const Image& image1 );
125 
126  private:
127 
130  using MemberFunctionType = Image (Self::*)( const Image& image1 );
131  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
132 
133 
135 
136  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
137 
138 
139  std::vector< std::vector<unsigned int> > m_SeedList{std::vector< std::vector<unsigned int > >()};
140 
141  double m_Lower{0};
142 
143  double m_Upper{1};
144 
145  /* Radius of the neighborhood used to compute the median */
146  std::vector<unsigned int> m_Radius{std::vector<unsigned int>(3, 1)};
147 
148  /* Pixels that lie within Lower and Upper (inclusive)
149  will be replaced with this value. The default is 1. */
150  double m_ReplaceValue{1};
151 
152 
153  };
154 
165  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 );
166 
168  }
169 }
170 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::NeighborhoodConnectedImageFilter::SetReplaceValue
Self & SetReplaceValue(double ReplaceValue)
Definition: sitkNeighborhoodConnectedImageFilter.h:108
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:60
itk::simple::NeighborhoodConnectedImageFilter
Label pixels that are connected to a seed and lie within a neighborhood.
Definition: sitkNeighborhoodConnectedImageFilter.h:42
itk::simple::NeighborhoodConnectedImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkNeighborhoodConnectedImageFilter.h:54
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::NeighborhoodConnectedImageFilter::SetRadius
Self & SetRadius(std::vector< unsigned int > Radius)
Definition: sitkNeighborhoodConnectedImageFilter.h:95
itk::simple::BasicPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:53
sitkImageFilter.h
itk::simple::NeighborhoodConnectedImageFilter::SetLower
Self & SetLower(double Lower)
Definition: sitkNeighborhoodConnectedImageFilter.h:75
itk::simple::NeighborhoodConnectedImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkNeighborhoodConnectedImageFilter.h:136
itk::simple::NeighborhoodConnectedImageFilter::AddSeed
Self & AddSeed(std::vector< unsigned int > point)
Add SeedList point.
Definition: sitkNeighborhoodConnectedImageFilter.h:67
itk::simple::NeighborhoodConnectedImageFilter::GetReplaceValue
double GetReplaceValue() const
Definition: sitkNeighborhoodConnectedImageFilter.h:113
itk::simple::NeighborhoodConnectedImageFilter::SetRadius
Self & SetRadius(unsigned int value)
Definition: sitkNeighborhoodConnectedImageFilter.h:98
itk::simple::NeighborhoodConnectedImageFilter::GetSeedList
std::vector< std::vector< unsigned int > > GetSeedList() const
Get list of seeds.
Definition: sitkNeighborhoodConnectedImageFilter.h:65
itk::simple::NeighborhoodConnectedImageFilter::GetName
std::string GetName() const
Definition: sitkNeighborhoodConnectedImageFilter.h:116
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::NeighborhoodConnectedImageFilter::GetLower
double GetLower() const
Definition: sitkNeighborhoodConnectedImageFilter.h:80
itk::simple::NeighborhoodConnectedImageFilter::MemberFunctionType
Image(Self::*)(const Image &image1) MemberFunctionType
Definition: sitkNeighborhoodConnectedImageFilter.h:130
itk
itk::simple::NeighborhoodConnectedImageFilter::GetUpper
double GetUpper() const
Definition: sitkNeighborhoodConnectedImageFilter.h:90
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
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:26
itk::simple::NeighborhoodConnectedImageFilter::ClearSeeds
Self & ClearSeeds()
Remove all SeedList points.
Definition: sitkNeighborhoodConnectedImageFilter.h:69
itk::simple::NeighborhoodConnectedImageFilter::SetUpper
Self & SetUpper(double Upper)
Definition: sitkNeighborhoodConnectedImageFilter.h:85
itk::simple::NeighborhoodConnectedImageFilter::GetRadius
std::vector< unsigned int > GetRadius() const
Definition: sitkNeighborhoodConnectedImageFilter.h:103