SimpleITK  1.1.0
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 
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 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  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
156 
157  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
158 
159 
160  double m_Lower;
161  double m_Upper;
162  /* Pixels that lie within Lower and Upper (inclusive)
163 will be replaced with this value. The default is 1. */
166 
168  std::vector< std::vector<unsigned int> > m_SeedList;
169 
170  };
171 
172 
179 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 );
180 
181 
182  } // end namespace simple
183 } // end namespace itk
184 #endif
Connectivity
itk::simple::Image
The main Image class for SimpleITK.
Definition: sitkImage.h:54
itk::simple::ConnectedThresholdImageFilter::ClearSeeds
Self & ClearSeeds()
Definition: sitkConnectedThresholdImageFilter.h:112
itk::simple::ConnectedThresholdImageFilter::GetLower
double GetLower() const
Definition: sitkConnectedThresholdImageFilter.h:66
sitkBasicFilters.h
itk::uint8_t
::uint8_t uint8_t
itk::simple::ConnectedThresholdImageFilter::GetSeedList
std::vector< std::vector< unsigned int > > GetSeedList() const
Definition: sitkConnectedThresholdImageFilter.h:106
itk::simple::ConnectedThresholdImageFilter::SetLower
Self & SetLower(double Lower)
Definition: sitkConnectedThresholdImageFilter.h:61
itk::simple::ConnectedThresholdImageFilter::SetSeedList
Self & SetSeedList(const std::vector< std::vector< unsigned int > > &t)
Definition: sitkConnectedThresholdImageFilter.h:100
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::ConnectedThresholdImageFilter::SetReplaceValue
Self & SetReplaceValue(uint8_t ReplaceValue)
Definition: sitkConnectedThresholdImageFilter.h:81
itk::simple::ConnectedThresholdImageFilter::m_SeedList
std::vector< std::vector< unsigned int > > m_SeedList
Definition: sitkConnectedThresholdImageFilter.h:168
itk::simple::ConnectedThresholdImageFilter::GetReplaceValue
uint8_t GetReplaceValue() const
Definition: sitkConnectedThresholdImageFilter.h:86
itk::simple::ConnectedThreshold
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)
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::ConnectedThresholdImageFilter::Self
ConnectedThresholdImageFilter Self
Definition: sitkConnectedThresholdImageFilter.h:44
itk::simple::ConnectedThresholdImageFilter::SetSeed
Self & SetSeed(const std::vector< unsigned int > &idx)
Definition: sitkConnectedThresholdImageFilter.h:119
itk::simple::ConnectedThresholdImageFilter::FaceConnectivity
@ FaceConnectivity
Definition: sitkConnectedThresholdImageFilter.h:88
itk::simple::ConnectedThresholdImageFilter::m_Connectivity
ConnectivityType m_Connectivity
Definition: sitkConnectedThresholdImageFilter.h:165
itk::simple::ConnectedThresholdImageFilter::m_Lower
double m_Lower
Definition: sitkConnectedThresholdImageFilter.h:160
itk::simple::ConnectedThresholdImageFilter::m_MemberFactory
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkConnectedThresholdImageFilter.h:157
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:50
itk::simple::ConnectedThresholdImageFilter::GetName
std::string GetName() const
Definition: sitkConnectedThresholdImageFilter.h:134
itk::simple::ConnectedThresholdImageFilter
Label pixels that are connected to a seed and lie within a range of values.
Definition: sitkConnectedThresholdImageFilter.h:42
itk::simple::ConnectedThresholdImageFilter::ConnectivityType
ConnectivityType
Definition: sitkConnectedThresholdImageFilter.h:88
itk::simple::ConnectedThresholdImageFilter::SetConnectivity
Self & SetConnectivity(ConnectivityType Connectivity)
Definition: sitkConnectedThresholdImageFilter.h:93
itk::simple::ConnectedThresholdImageFilter::SetUpper
Self & SetUpper(double Upper)
Definition: sitkConnectedThresholdImageFilter.h:71
itk::simple::ConnectedThresholdImageFilter::GetUpper
double GetUpper() const
Definition: sitkConnectedThresholdImageFilter.h:76
itk
itk::simple::ConnectedThresholdImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkConnectedThresholdImageFilter.h:54
itk::simple::ConnectedThresholdImageFilter::GetConnectivity
ConnectivityType GetConnectivity() const
Definition: sitkConnectedThresholdImageFilter.h:98
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::ConnectedThresholdImageFilter::AddSeed
Self & AddSeed(const std::vector< unsigned int > &idx)
Definition: sitkConnectedThresholdImageFilter.h:127
itk::simple::ConnectedThresholdImageFilter::m_ReplaceValue
uint8_t m_ReplaceValue
Definition: sitkConnectedThresholdImageFilter.h:164
itk::simple::ConnectedThresholdImageFilter::m_Upper
double m_Upper
Definition: sitkConnectedThresholdImageFilter.h:161