ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkCannyEdgesDistanceAdvectionFieldFeatureGenerator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkCannyEdgesDistanceAdvectionFieldFeatureGenerator.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 itkCannyEdgesDistanceAdvectionFieldFeatureGenerator_h
18 #define itkCannyEdgesDistanceAdvectionFieldFeatureGenerator_h
19 
20 #include "itkFeatureGenerator.h"
21 #include "itkImage.h"
22 #include "itkImageSpatialObject.h"
23 #include "itkCastImageFilter.h"
26 #include "itkGradientImageFilter.h"
27 #include "itkMultiplyImageFilter.h"
28 
29 namespace itk
30 {
31 
66 template <unsigned int NDimension>
67 class ITK_TEMPLATE_EXPORT CannyEdgesDistanceAdvectionFieldFeatureGenerator : public FeatureGenerator<NDimension>
68 {
69 public:
70  ITK_DISALLOW_COPY_AND_ASSIGN(CannyEdgesDistanceAdvectionFieldFeatureGenerator);
71 
77 
78  using InternalPixelType = float;
79 
81  itkNewMacro(Self);
82 
85 
87  static constexpr unsigned int Dimension = NDimension;
88 
91  using InputPixelType = signed short;
95  using SpatialObjectType = typename Superclass::SpatialObjectType;
96 
99  void SetInput( const SpatialObjectType * input );
100  const SpatialObjectType * GetInput() const;
102 
105  const SpatialObjectType * GetFeature() const;
106 
107  itkSetMacro( Sigma, double );
108  itkGetMacro( Sigma, double );
109  itkSetMacro( UpperThreshold, double );
110  itkGetMacro( UpperThreshold, double );
111  itkSetMacro( LowerThreshold, double );
112  itkGetMacro( LowerThreshold, double );
113 
114 protected:
117  void PrintSelf(std::ostream& os, Indent indent) const override;
118 
121  void GenerateData () override;
122 
123 private:
125 
132 
136 
141 
142  using OutputPixelType = typename CovariantVectorImageType::PixelType;
145 
150 
156 
159  double m_Sigma;
160 
161 };
162 
163 } // end namespace itk
164 
165 #ifndef ITK_MANUAL_INSTANTIATION
166 # include "itkCannyEdgesDistanceAdvectionFieldFeatureGenerator.hxx"
167 #endif
168 
169 #endif
Light weight base class for most itk classes.
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.
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Pixel-wise multiplication of two images.
Generates an advection feature field by computing the distance map to the canny edges in the image an...
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.
Computes the gradient of an image using directional derivatives.