SimpleITK  1.1.0
sitkNeighborhoodConnectedImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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 sitkRegionGrowingImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkImageFilter.h"
30 #include "sitkBasicFilters.h"
31 
32 namespace itk {
33  namespace simple {
34 
43  public:
45 
48 
52 
55 
56 
57 
61  SITK_RETURN_SELF_TYPE_HEADER SetLower ( double Lower ) { this->m_Lower = Lower; return *this; }
62 
66  double GetLower() const { return this->m_Lower; }
67 
71  SITK_RETURN_SELF_TYPE_HEADER SetUpper ( double Upper ) { this->m_Upper = Upper; return *this; }
72 
76  double GetUpper() const { return this->m_Upper; }
77 
81  SITK_RETURN_SELF_TYPE_HEADER SetRadius ( const std::vector<unsigned int> & Radius ) { this->m_Radius = Radius; return *this; }
82 
84  SITK_RETURN_SELF_TYPE_HEADER SetRadius( unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value); return *this; }
85 
86 
90  std::vector<unsigned int> GetRadius() const { return this->m_Radius; }
91 
95  SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue ( double ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
96 
100  double GetReplaceValue() const { return this->m_ReplaceValue; }
102  SITK_RETURN_SELF_TYPE_HEADER SetSeedList ( const std::vector< std::vector<unsigned int> > &t )
103  {
104  this->m_SeedList = t; return *this;
105  }
106 
108  std::vector< std::vector<unsigned int> > GetSeedList() const
109  {
110  return this->m_SeedList;
111  }
112 
114  SITK_RETURN_SELF_TYPE_HEADER ClearSeeds( )
115  {
116  this->m_SeedList.clear();
117  return *this;
118  }
119 
121  SITK_RETURN_SELF_TYPE_HEADER SetSeed( const std::vector<unsigned int> &idx )
122  {
123  this->m_SeedList.clear();
124  this->m_SeedList.push_back(idx);
125  return *this;
126  }
127 
129  SITK_RETURN_SELF_TYPE_HEADER AddSeed( const std::vector<unsigned int> &idx )
130  {
131  this->m_SeedList.push_back(idx);
132  return *this;
133  }
134 
136  std::string GetName() const { return std::string ("NeighborhoodConnectedImageFilter"); }
137 
139  std::string ToString() const;
140 
141 
143  Image Execute ( const Image& image1 );
144 
145 
147  Image Execute ( const Image& image1, const std::vector< std::vector<unsigned int> > &seedList, double lower, double upper, const std::vector<unsigned int> & radius, double replaceValue );
148 
149  private:
150 
153  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
154  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
155 
156 
157  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
158 
159  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
160 
161 
162  double m_Lower;
163  double m_Upper;
164  /* Radius of the neighborhood used to compute the median */
165  std::vector<unsigned int> m_Radius;
166  /* Pixels that lie within Lower and Upper (inclusive)
167  will be replaced with this value. The default is 1. */
169 
171  std::vector< std::vector<unsigned int> > m_SeedList;
172 
173  };
174 
175 
182 Image SITKBasicFilters_EXPORT NeighborhoodConnected ( const Image& image1, const std::vector< std::vector<unsigned int> > &seedList, double lower = 0, double upper = 1, const std::vector<unsigned int> & radius = std::vector<unsigned int>(3, 1), double replaceValue = 1 );
183 
184 
185  } // end namespace simple
186 } // end namespace itk
187 #endif
itk::simple::Image
The main Image class for SimpleITK.
Definition: sitkImage.h:54
itk::simple::NeighborhoodConnectedImageFilter::SetReplaceValue
Self & SetReplaceValue(double ReplaceValue)
Definition: sitkNeighborhoodConnectedImageFilter.h:95
sitkBasicFilters.h
itk::simple::NeighborhoodConnectedImageFilter
Label pixels that are connected to a seed and lie within a neighborhood.
Definition: sitkNeighborhoodConnectedImageFilter.h:42
itk::simple::NeighborhoodConnectedImageFilter::GetSeedList
std::vector< std::vector< unsigned int > > GetSeedList() const
Definition: sitkNeighborhoodConnectedImageFilter.h:108
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::NeighborhoodConnectedImageFilter::m_Lower
double m_Lower
Definition: sitkNeighborhoodConnectedImageFilter.h:162
itk::simple::NeighborhoodConnectedImageFilter::SetSeedList
Self & SetSeedList(const std::vector< std::vector< unsigned int > > &t)
Definition: sitkNeighborhoodConnectedImageFilter.h:102
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::SetRadius
Self & SetRadius(const std::vector< unsigned int > &Radius)
Definition: sitkNeighborhoodConnectedImageFilter.h:81
itk::simple::NeighborhoodConnectedImageFilter::Self
NeighborhoodConnectedImageFilter Self
Definition: sitkNeighborhoodConnectedImageFilter.h:44
itk::simple::NeighborhoodConnectedImageFilter::SetLower
Self & SetLower(double Lower)
Definition: sitkNeighborhoodConnectedImageFilter.h:61
itk::simple::NeighborhoodConnectedImageFilter::AddSeed
Self & AddSeed(const std::vector< unsigned int > &idx)
Definition: sitkNeighborhoodConnectedImageFilter.h:129
itk::simple::NeighborhoodConnectedImageFilter::GetReplaceValue
double GetReplaceValue() const
Definition: sitkNeighborhoodConnectedImageFilter.h:100
itk::simple::NeighborhoodConnectedImageFilter::SetRadius
Self & SetRadius(unsigned int value)
Definition: sitkNeighborhoodConnectedImageFilter.h:84
itk::simple::NeighborhoodConnectedImageFilter::GetName
std::string GetName() const
Definition: sitkNeighborhoodConnectedImageFilter.h:136
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:50
itk::simple::NeighborhoodConnectedImageFilter::m_SeedList
std::vector< std::vector< unsigned int > > m_SeedList
Definition: sitkNeighborhoodConnectedImageFilter.h:171
itk::simple::NeighborhoodConnected
Image NeighborhoodConnected(const Image &image1, const std::vector< std::vector< unsigned int > > &seedList, double lower=0, double upper=1, const std::vector< unsigned int > &radius=std::vector< unsigned int >(3, 1), double replaceValue=1)
itk::simple::NeighborhoodConnectedImageFilter::SetSeed
Self & SetSeed(const std::vector< unsigned int > &idx)
Definition: sitkNeighborhoodConnectedImageFilter.h:121
itk::simple::NeighborhoodConnectedImageFilter::GetLower
double GetLower() const
Definition: sitkNeighborhoodConnectedImageFilter.h:66
itk::simple::NeighborhoodConnectedImageFilter::m_ReplaceValue
double m_ReplaceValue
Definition: sitkNeighborhoodConnectedImageFilter.h:168
itk
itk::simple::NeighborhoodConnectedImageFilter::GetUpper
double GetUpper() const
Definition: sitkNeighborhoodConnectedImageFilter.h:76
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:37
itk::simple::ProcessObject
Base class for SimpleITK classes based on ProcessObject.
Definition: sitkProcessObject.h:50
itk::simple::NeighborhoodConnectedImageFilter::m_MemberFactory
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkNeighborhoodConnectedImageFilter.h:159
itk::simple::NeighborhoodConnectedImageFilter::m_Radius
std::vector< unsigned int > m_Radius
Definition: sitkNeighborhoodConnectedImageFilter.h:165
itk::simple::NeighborhoodConnectedImageFilter::ClearSeeds
Self & ClearSeeds()
Definition: sitkNeighborhoodConnectedImageFilter.h:114
itk::simple::NeighborhoodConnectedImageFilter::SetUpper
Self & SetUpper(double Upper)
Definition: sitkNeighborhoodConnectedImageFilter.h:71
itk::simple::NeighborhoodConnectedImageFilter::m_Upper
double m_Upper
Definition: sitkNeighborhoodConnectedImageFilter.h:163
itk::simple::NeighborhoodConnectedImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkNeighborhoodConnectedImageFilter.h:54
itk::simple::NeighborhoodConnectedImageFilter::GetRadius
std::vector< unsigned int > GetRadius() const
Definition: sitkNeighborhoodConnectedImageFilter.h:90