ITK  4.8.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_EXPORT CannyEdgesDistanceFeatureGenerator : public FeatureGenerator<NDimension>
63 {
64 public:
70 
72  itkNewMacro(Self);
73 
76 
78  itkStaticConstMacro(Dimension, unsigned int, NDimension);
79 
82  typedef signed short InputPixelType;
86  typedef typename Superclass::SpatialObjectType 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:
119  void PrintSelf(std::ostream& os, Indent indent) const;
120 
123  void GenerateData ();
124 
125 private:
126  CannyEdgesDistanceFeatureGenerator(const Self&); //purposely not implemented
127  void operator=(const Self&); //purposely not implemented
128 
129  typedef float InternalPixelType;
131 
134 
136 
137  typedef CastImageFilter<
143 
147 
151 
154 
157 };
158 
159 } // end namespace itk
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 # include "itkCannyEdgesDistanceFeatureGenerator.hxx"
163 #endif
164 
165 #endif
Light weight base class for most itk classes.
CastImageFilter< InputImageType, InternalImageType > CastFilterType
NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
ImageSpatialObject< NDimension, OutputPixelType > OutputImageSpatialObjectType
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...
FixedArray< ScalarRealType, itkGetStaticConstMacro(Dimension) > SigmaArrayType
SignedMaurerDistanceMapImageFilter< InternalImageType, InternalImageType > DistanceMapFilterType
CannyEdgeDetectionRecursiveGaussianImageFilter< InternalImageType, InternalImageType > CannyEdgeFilterType
InputImageSpatialObjectType::Pointer InputImageSpatialObjectPointer
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
ImageSpatialObject< NDimension, InputPixelType > InputImageSpatialObjectType
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.