ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkCannyEdgesFeatureGenerator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkCannyEdgesFeatureGenerator.h
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkCannyEdgesFeatureGenerator_h
18 #define __itkCannyEdgesFeatureGenerator_h
19 
20 #include "itkFeatureGenerator.h"
21 #include "itkImage.h"
22 #include "itkImageSpatialObject.h"
23 #include "itkCastImageFilter.h"
26 
27 namespace itk
28 {
29 
59 template <unsigned int NDimension>
60 class ITK_EXPORT CannyEdgesFeatureGenerator : public FeatureGenerator<NDimension>
61 {
62 public:
68 
70  itkNewMacro(Self);
71 
74 
76  itkStaticConstMacro(Dimension, unsigned int, NDimension);
77 
80  typedef signed short InputPixelType;
84  typedef typename Superclass::SpatialObjectType SpatialObjectType;
85 
88 
91  void SetInput( const SpatialObjectType * input );
92  const SpatialObjectType * GetInput() const;
94 
97  const SpatialObjectType * GetFeature() const;
98 
103  void SetSigmaArray( const SigmaArrayType & sigmas );
104  void SetSigma( ScalarRealType sigma );
105  SigmaArrayType GetSigmaArray() const;
106  ScalarRealType GetSigma() const;
108 
109  itkSetMacro( UpperThreshold, double );
110  itkGetMacro( UpperThreshold, double );
111  itkSetMacro( LowerThreshold, double );
112  itkGetMacro( LowerThreshold, double );
113 
114 protected:
116  virtual ~CannyEdgesFeatureGenerator();
117  void PrintSelf(std::ostream& os, Indent indent) const;
118 
121  void GenerateData ();
122 
123 private:
124  CannyEdgesFeatureGenerator(const Self&); //purposely not implemented
125  void operator=(const Self&); //purposely not implemented
126 
127  typedef float InternalPixelType;
129 
132 
134 
135  typedef CastImageFilter<
141 
145 
149 
152 
155 };
156 
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 # include "itkCannyEdgesFeatureGenerator.hxx"
161 #endif
162 
163 #endif
Light weight base class for most itk classes.
IntensityWindowingImageFilter< InternalImageType, InternalImageType > RescaleFilterType
NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
CannyEdgeDetectionRecursiveGaussianImageFilter< InternalImageType, InternalImageType > CannyEdgeFilterType
Generates a feature image by computing the inverse map to the canny edges in the image.
ImageSpatialObject< NDimension, OutputPixelType > OutputImageSpatialObjectType
InputImageSpatialObjectType::Pointer InputImageSpatialObjectPointer
FixedArray< ScalarRealType, itkGetStaticConstMacro(Dimension) > SigmaArrayType
CastImageFilter< InputImageType, InternalImageType > CastFilterType
ImageSpatialObject< NDimension, InputPixelType > InputImageSpatialObjectType
FeatureGenerator< NDimension > Superclass
Class that generates features (typically images) used as input for a segmentation method...
Applies a linear transformation to the intensity levels of the input Image that are inside a user-def...
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Superclass::SpatialObjectType SpatialObjectType
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Image< InputPixelType, Dimension > InputImageType
Image< InternalPixelType, Dimension > InternalImageType
CannyEdgeFilterType::Pointer CannyEdgeFilterPointer
Define additional traits for native types such as int or float.
RescaleFilterType::Pointer RescaleFilterPointer
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.