SimpleITK  1.0.1
sitkCannyEdgeDetectionImageFilter.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 sitkCannyEdgeDetectionImageFilter_h
19 #define sitkCannyEdgeDetectionImageFilter_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 
65  public:
67 
71 
74 
77 
78 
79 
82  SITK_RETURN_SELF_TYPE_HEADER SetLowerThreshold ( double LowerThreshold ) { this->m_LowerThreshold = LowerThreshold; return *this; }
83 
86  double GetLowerThreshold() const { return this->m_LowerThreshold; }
87 
92  SITK_RETURN_SELF_TYPE_HEADER SetUpperThreshold ( double UpperThreshold ) { this->m_UpperThreshold = UpperThreshold; return *this; }
93 
96  double GetUpperThreshold() const { return this->m_UpperThreshold; }
97 
101  SITK_RETURN_SELF_TYPE_HEADER SetVariance ( const std::vector<double> & Variance ) { this->m_Variance = Variance; return *this; }
102 
104  SITK_RETURN_SELF_TYPE_HEADER SetVariance( double value ) { this->m_Variance = std::vector<double>(3, value); return *this; }
105 
106 
110  std::vector<double> GetVariance() const { return this->m_Variance; }
111 
115  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( const std::vector<double> & MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
116 
118  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError( double value ) { this->m_MaximumError = std::vector<double>(3, value); return *this; }
119 
120 
124  std::vector<double> GetMaximumError() const { return this->m_MaximumError; }
126  std::string GetName() const { return std::string ("CannyEdgeDetectionImageFilter"); }
127 
129  std::string ToString() const;
130 
131 
133  Image Execute ( const Image& image1 );
134 
135 
137  Image Execute ( const Image& image1, double lowerThreshold, double upperThreshold, const std::vector<double> & variance, const std::vector<double> & maximumError );
138 
139 
140  private:
141 
144  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
145  template <class TImageType> Image ExecuteInternal ( const Image& image1 );
146 
147 
148 
149  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
150 
151  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
152 
153 
156  /* */
157  std::vector<double> m_Variance;
158  /* */
159  std::vector<double> m_MaximumError;
160  };
161 
162 
163 
172  SITKBasicFilters_EXPORT Image CannyEdgeDetection ( const Image& image1, double lowerThreshold = 0.0, double upperThreshold = 0.0, const std::vector<double> & variance = std::vector<double>(3, 0.0), const std::vector<double> & maximumError = std::vector<double>(3, 0.01) );
173 
174  }
175 }
176 #endif
Self & SetMaximumError(const std::vector< double > &MaximumError)
#define SITKBasicFilters_EXPORT
Self & SetUpperThreshold(double UpperThreshold)
Set the Threshold value for detected edges. TODO: Document in the ITKv4 migration guide that the SetT...
This filter is an implementation of a Canny edge detector for scalar-valued images.
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
The main Image class for SimpleITK.
Definition: sitkImage.h:54
Image CannyEdgeDetection(const Image &image1, double lowerThreshold=0.0, double upperThreshold=0.0, const std::vector< double > &variance=std::vector< double >(3, 0.0), const std::vector< double > &maximumError=std::vector< double >(3, 0.01))
This filter is an implementation of a Canny edge detector for scalar-valued images.
Self & SetVariance(const std::vector< double > &Variance)
The base interface for SimpleITK filters that take one input image.