ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkCannyEdgesDistanceFeatureGenerator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkCannyEdgesDistanceFeatureGenerator.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 itkCannyEdgesDistanceFeatureGenerator_h
18 #define itkCannyEdgesDistanceFeatureGenerator_h
19 
20 #include "itkFeatureGenerator.h"
21 #include "itkImage.h"
22 #include "itkImageSpatialObject.h"
23 #include "itkCastImageFilter.h"
26 #include "itkFixedArray.h"
27 #include "itkNumericTraits.h"
28 
29 namespace itk
30 {
31 
61 template <unsigned int NDimension>
62 class ITK_TEMPLATE_EXPORT CannyEdgesDistanceFeatureGenerator : public FeatureGenerator<NDimension>
63 {
64 public:
65  ITK_DISALLOW_COPY_AND_ASSIGN(CannyEdgesDistanceFeatureGenerator);
66 
72 
74  itkNewMacro(Self);
75 
78 
80  static constexpr unsigned int Dimension = NDimension;
81 
84  using InputPixelType = signed short;
88  using SpatialObjectType = typename Superclass::SpatialObjectType;
89 
92 
95  void SetInput( const SpatialObjectType * input );
96  const SpatialObjectType * GetInput() const;
98 
101  const SpatialObjectType * GetFeature() const;
102 
107  void SetSigmaArray( const SigmaArrayType & sigmas );
108  void SetSigma( ScalarRealType sigma );
109  SigmaArrayType GetSigmaArray() const;
110  ScalarRealType GetSigma() const;
112 
113  itkSetMacro( UpperThreshold, double );
114  itkGetMacro( UpperThreshold, double );
115  itkSetMacro( LowerThreshold, double );
116  itkGetMacro( LowerThreshold, double );
117 
118 protected:
121  void PrintSelf(std::ostream& os, Indent indent) const override;
122 
125  void GenerateData () override;
126 
127 private:
128  using InternalPixelType = float;
130 
133 
135 
142 
146 
150 
153 
156 };
157 
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 # include "itkCannyEdgesDistanceFeatureGenerator.hxx"
162 #endif
163 
164 #endif
Light weight base class for most itk classes.
Define numeric traits for std::vector.
typename InputImageSpatialObjectType::Pointer InputImageSpatialObjectPointer
typename NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
This filter calculates the Euclidean distance transform of a binary image in linear time for arbitrar...
Class that generates features (typically images) used as input for a segmentation method...
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
Generates a feature image by computing the distance map to the canny edges in the image...
typename Superclass::SpatialObjectType SpatialObjectType
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename CannyEdgeFilterType::Pointer CannyEdgeFilterPointer
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.
typename DistanceMapFilterType::Pointer DistanceMapFilterPointer