SimpleITK  1.2.4
sitkIsolatedWatershedImageFilter.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 sitkIsolatedWatershedImageFilter_h
19 #define sitkIsolatedWatershedImageFilter_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 
57 
61  SITK_RETURN_SELF_TYPE_HEADER SetSeed1 ( const std::vector<uint32_t> & Seed1 ) { this->m_Seed1 = Seed1; return *this; }
62 
66  std::vector<uint32_t> GetSeed1() const { return this->m_Seed1; }
67 
71  SITK_RETURN_SELF_TYPE_HEADER SetSeed2 ( const std::vector<uint32_t> & Seed2 ) { this->m_Seed2 = Seed2; return *this; }
72 
76  std::vector<uint32_t> GetSeed2() const { return this->m_Seed2; }
77 
81  SITK_RETURN_SELF_TYPE_HEADER SetThreshold ( double Threshold ) { this->m_Threshold = Threshold; return *this; }
82 
86  double GetThreshold() const { return this->m_Threshold; }
87 
91  SITK_RETURN_SELF_TYPE_HEADER SetUpperValueLimit ( double UpperValueLimit ) { this->m_UpperValueLimit = UpperValueLimit; return *this; }
92 
96  double GetUpperValueLimit() const { return this->m_UpperValueLimit; }
97 
101  SITK_RETURN_SELF_TYPE_HEADER SetIsolatedValueTolerance ( double IsolatedValueTolerance ) { this->m_IsolatedValueTolerance = IsolatedValueTolerance; return *this; }
102 
106  double GetIsolatedValueTolerance() const { return this->m_IsolatedValueTolerance; }
107 
111  SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue1 ( uint8_t ReplaceValue1 ) { this->m_ReplaceValue1 = ReplaceValue1; return *this; }
112 
116  uint8_t GetReplaceValue1() const { return this->m_ReplaceValue1; }
117 
121  SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue2 ( uint8_t ReplaceValue2 ) { this->m_ReplaceValue2 = ReplaceValue2; return *this; }
122 
126  uint8_t GetReplaceValue2() const { return this->m_ReplaceValue2; }
128  std::string GetName() const { return std::string ("IsolatedWatershedImageFilter"); }
129 
131  std::string ToString() const;
132 
133 
135  Image Execute ( const Image& image1 );
136 
137 
139  Image Execute ( const Image& image1, const std::vector<uint32_t> & seed1, const std::vector<uint32_t> & seed2, double threshold, double upperValueLimit, double isolatedValueTolerance, uint8_t replaceValue1, uint8_t replaceValue2 );
140 
141  private:
142 
145  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
146  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
147 
148 
149  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
150 
151  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
152 
153 
154  /* */
155  std::vector<uint32_t> m_Seed1;
156  /* */
157  std::vector<uint32_t> m_Seed2;
158  double m_Threshold;
163  };
164 
165 
174  SITKBasicFilters_EXPORT Image IsolatedWatershed ( const Image& image1, const std::vector<uint32_t> & seed1 = std::vector<uint32_t>(3, 0), const std::vector<uint32_t> & seed2 = std::vector<uint32_t>(3, 0), double threshold = 0.0, double upperValueLimit = 1.0, double isolatedValueTolerance = 0.001, uint8_t replaceValue1 = 1u, uint8_t replaceValue2 = 2u );
175 
176  }
177 }
178 #endif
#define SITKBasicFilters_EXPORT
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 & SetSeed1(const std::vector< uint32_t > &Seed1)
Self & SetIsolatedValueTolerance(double IsolatedValueTolerance)
::uint8_t uint8_t
Image Threshold(const Image &image1, double lower=0.0, double upper=1.0, double outsideValue=0.0)
Set image values to a user-specified value if they are below, above, or between simple threshold valu...
Image IsolatedWatershed(const Image &image1, const std::vector< uint32_t > &seed1=std::vector< uint32_t >(3, 0), const std::vector< uint32_t > &seed2=std::vector< uint32_t >(3, 0), double threshold=0.0, double upperValueLimit=1.0, double isolatedValueTolerance=0.001, uint8_t replaceValue1=1u, uint8_t replaceValue2=2u)
Isolate watershed basins using two seeds.
The Image class for SimpleITK.
Definition: sitkImage.h:78
Self & SetSeed2(const std::vector< uint32_t > &Seed2)
Isolate watershed basins using two seeds.
The base interface for SimpleITK filters that take one input image.
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory