ITK  5.0.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_TEMPLATE_EXPORT CannyEdgesFeatureGenerator : public FeatureGenerator<NDimension>
61 {
62 public:
63  ITK_DISALLOW_COPY_AND_ASSIGN(CannyEdgesFeatureGenerator);
64 
70 
72  itkNewMacro(Self);
73 
76 
78  static constexpr unsigned int Dimension = NDimension;
79 
82  using InputPixelType = signed short;
86  using SpatialObjectType = typename Superclass::SpatialObjectType;
87 
90 
93  void SetInput( const SpatialObjectType * input );
94  const SpatialObjectType * GetInput() const;
96 
99  const SpatialObjectType * GetFeature() const;
100 
105  void SetSigmaArray( const SigmaArrayType & sigmas );
106  void SetSigma( ScalarRealType sigma );
107  SigmaArrayType GetSigmaArray() const;
108  ScalarRealType GetSigma() const;
110 
111  itkSetMacro( UpperThreshold, double );
112  itkGetMacro( UpperThreshold, double );
113  itkSetMacro( LowerThreshold, double );
114  itkGetMacro( LowerThreshold, double );
115 
116 protected:
118  ~CannyEdgesFeatureGenerator() override;
119  void PrintSelf(std::ostream& os, Indent indent) const override;
120 
123  void GenerateData () override;
124 
125 private:
126  using InternalPixelType = float;
128 
131 
133 
140 
144 
148 
151 
154 };
155 
156 } // end namespace itk
157 
158 #ifndef ITK_MANUAL_INSTANTIATION
159 # include "itkCannyEdgesFeatureGenerator.hxx"
160 #endif
161 
162 #endif
Light weight base class for most itk classes.
Define numeric traits for std::vector.
typename CannyEdgeFilterType::Pointer CannyEdgeFilterPointer
typename Superclass::SpatialObjectType SpatialObjectType
Generates a feature image by computing the inverse map to the canny edges in the image.
typename RescaleFilterType::Pointer RescaleFilterPointer
typename NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
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)
Protected method for setting indexed and named inputs.
Implementation of an image as spatial object.
typename CastFilterType::Pointer CastFilterPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename InputImageSpatialObjectType::Pointer InputImageSpatialObjectPointer
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.