SimpleITK  1.0.1
sitkConfidenceConnectedImageFilter.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 sitkConfidenceConnectedImageFilter_h
19 #define sitkConfidenceConnectedImageFilter_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 
53  public:
55 
59 
62 
65 
66 
67 
71  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( unsigned int NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
72 
76  unsigned int GetNumberOfIterations() const { return this->m_NumberOfIterations; }
77 
81  SITK_RETURN_SELF_TYPE_HEADER SetMultiplier ( double Multiplier ) { this->m_Multiplier = Multiplier; return *this; }
82 
86  double GetMultiplier() const { return this->m_Multiplier; }
87 
91  SITK_RETURN_SELF_TYPE_HEADER SetInitialNeighborhoodRadius ( unsigned int InitialNeighborhoodRadius ) { this->m_InitialNeighborhoodRadius = InitialNeighborhoodRadius; return *this; }
92 
96  unsigned int GetInitialNeighborhoodRadius() const { return this->m_InitialNeighborhoodRadius; }
97 
101  SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue ( uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
102 
106  uint8_t GetReplaceValue() const { return this->m_ReplaceValue; }
113  double GetMean() const { return this->m_Mean; };
114 
121  double GetVariance() const { return this->m_Variance; };
122 
124  SITK_RETURN_SELF_TYPE_HEADER SetSeedList ( const std::vector< std::vector<unsigned int> > &t )
125  {
126  this->m_SeedList = t; return *this;
127  }
128 
130  std::vector< std::vector<unsigned int> > GetSeedList() const
131  {
132  return this->m_SeedList;
133  }
134 
136  SITK_RETURN_SELF_TYPE_HEADER ClearSeeds( )
137  {
138  this->m_SeedList.clear();
139  return *this;
140  }
141 
143  SITK_RETURN_SELF_TYPE_HEADER SetSeed( const std::vector<unsigned int> &idx )
144  {
145  this->m_SeedList.clear();
146  this->m_SeedList.push_back(idx);
147  return *this;
148  }
149 
151  SITK_RETURN_SELF_TYPE_HEADER AddSeed( const std::vector<unsigned int> &idx )
152  {
153  this->m_SeedList.push_back(idx);
154  return *this;
155  }
156 
158  std::string GetName() const { return std::string ("ConfidenceConnectedImageFilter"); }
159 
161  std::string ToString() const;
162 
163 
165  Image Execute ( const Image& image1 );
166 
167 
169  Image Execute ( const Image& image1, const std::vector< std::vector<unsigned int> > &seedList, unsigned int numberOfIterations, double multiplier, unsigned int initialNeighborhoodRadius, uint8_t replaceValue );
170 
171  private:
172 
175  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
176  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
177 
178 
179 
180  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
181 
182  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
183 
184 
185  unsigned int m_NumberOfIterations;
186  double m_Multiplier;
189  /* Some global documentation */
190  double m_Mean;
191  /* Some global documentation */
192  double m_Variance;
193 
194 
196  std::vector< std::vector<unsigned int> > m_SeedList;
197 
198  };
199 
200 
207 Image SITKBasicFilters_EXPORT ConfidenceConnected ( const Image& image1, const std::vector< std::vector<unsigned int> > &seedList, unsigned int numberOfIterations = 4u, double multiplier = 4.5, unsigned int initialNeighborhoodRadius = 1u, uint8_t replaceValue = 1u );
208 
209 
210  } // end namespace simple
211 } // end namespace itk
212 #endif
Self & AddSeed(const std::vector< unsigned int > &idx)
Self & SetInitialNeighborhoodRadius(unsigned int InitialNeighborhoodRadius)
#define SITKBasicFilters_EXPORT
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
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 & SetSeedList(const std::vector< std::vector< unsigned int > > &t)
std::vector< std::vector< unsigned int > > m_SeedList
Segment pixels with similar statistics using connectivity.
::uint8_t uint8_t
Image ConfidenceConnected(const Image &image1, const std::vector< std::vector< unsigned int > > &seedList, unsigned int numberOfIterations=4u, double multiplier=4.5, unsigned int initialNeighborhoodRadius=1u, uint8_t replaceValue=1u)
std::vector< std::vector< unsigned int > > GetSeedList() const
The main Image class for SimpleITK.
Definition: sitkImage.h:54
Self & SetNumberOfIterations(unsigned int NumberOfIterations)
Self & SetSeed(const std::vector< unsigned int > &idx)
The base interface for SimpleITK filters that take one input image.