SimpleITK  1.0.1
sitkConnectedThresholdImageFilter.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 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 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 
49 
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 SetReplaceValue ( uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
82 
86  uint8_t GetReplaceValue() const { return this->m_ReplaceValue; }
87 
88  typedef enum {FaceConnectivity,FullConnectivity} ConnectivityType;
89 
93  SITK_RETURN_SELF_TYPE_HEADER SetConnectivity ( ConnectivityType Connectivity ) { this->m_Connectivity = Connectivity; return *this; }
94 
98  ConnectivityType GetConnectivity() const { return this->m_Connectivity; }
100  SITK_RETURN_SELF_TYPE_HEADER SetSeedList ( const std::vector< std::vector<unsigned int> > &t )
101  {
102  this->m_SeedList = t; return *this;
103  }
104 
106  std::vector< std::vector<unsigned int> > GetSeedList() const
107  {
108  return this->m_SeedList;
109  }
110 
112  SITK_RETURN_SELF_TYPE_HEADER ClearSeeds( )
113  {
114  this->m_SeedList.clear();
115  return *this;
116  }
117 
119  SITK_RETURN_SELF_TYPE_HEADER SetSeed( const std::vector<unsigned int> &idx )
120  {
121  this->m_SeedList.clear();
122  this->m_SeedList.push_back(idx);
123  return *this;
124  }
125 
127  SITK_RETURN_SELF_TYPE_HEADER AddSeed( const std::vector<unsigned int> &idx )
128  {
129  this->m_SeedList.push_back(idx);
130  return *this;
131  }
132 
134  std::string GetName() const { return std::string ("ConnectedThresholdImageFilter"); }
135 
137  std::string ToString() const;
138 
139 
141  Image Execute ( const Image& image1 );
142 
143 
145  Image Execute ( const Image& image1, const std::vector< std::vector<unsigned int> > &seedList, double lower, double upper, uint8_t replaceValue, ConnectedThresholdImageFilter::ConnectivityType connectivity );
146 
147  private:
148 
151  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
152  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
153 
154 
155 
156  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
157 
158  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
159 
160 
161  double m_Lower;
162  double m_Upper;
163  /* Pixels that lie within Lower and Upper (inclusive)
164 will be replaced with this value. The default is 1. */
167 
169  std::vector< std::vector<unsigned int> > m_SeedList;
170 
171  };
172 
173 
180 Image SITKBasicFilters_EXPORT ConnectedThreshold ( const Image& image1, const std::vector< std::vector<unsigned int> > &seedList, double lower = 0, double upper = 1, uint8_t replaceValue = 1u, ConnectedThresholdImageFilter::ConnectivityType connectivity = itk::simple::ConnectedThresholdImageFilter::FaceConnectivity );
181 
182 
183  } // end namespace simple
184 } // end namespace itk
185 #endif
std::vector< std::vector< unsigned int > > m_SeedList
#define SITKBasicFilters_EXPORT
Image ConnectedThreshold(const Image &image1, const std::vector< std::vector< unsigned int > > &seedList, double lower=0, double upper=1, uint8_t replaceValue=1u, ConnectedThresholdImageFilter::ConnectivityType connectivity=itk::simple::ConnectedThresholdImageFilter::FaceConnectivity)
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
Self & AddSeed(const std::vector< unsigned int > &idx)
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
std::vector< std::vector< unsigned int > > GetSeedList() const
::uint8_t uint8_t
The main Image class for SimpleITK.
Definition: sitkImage.h:54
Self & SetSeedList(const std::vector< std::vector< unsigned int > > &t)
Self & SetConnectivity(ConnectivityType Connectivity)
Label pixels that are connected to a seed and lie within a range of values.
The base interface for SimpleITK filters that take one input image.
Self & SetSeed(const std::vector< unsigned int > &idx)