ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSigmoidFeatureGenerator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkSigmoidFeatureGenerator.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 itkSigmoidFeatureGenerator_h
18 #define itkSigmoidFeatureGenerator_h
19 
20 #include "itkFeatureGenerator.h"
21 #include "itkImage.h"
22 #include "itkImageSpatialObject.h"
24 #include "itkSigmoidImageFilter.h"
25 
26 namespace itk
27 {
28 
42 template <unsigned int NDimension>
43 class ITK_TEMPLATE_EXPORT SigmoidFeatureGenerator : public FeatureGenerator<NDimension>
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(SigmoidFeatureGenerator);
47 
53 
55  itkNewMacro(Self);
56 
59 
61  static constexpr unsigned int Dimension = NDimension;
62 
65  using InputPixelType = signed short;
69  using SpatialObjectType = typename Superclass::SpatialObjectType;
70 
73  void SetInput( const SpatialObjectType * input );
74  const SpatialObjectType * GetInput() const;
76 
79  const SpatialObjectType * GetFeature() const;
80 
82  itkSetMacro( Alpha, double );
83  itkGetMacro( Alpha, double );
85 
87  itkSetMacro( Beta, double );
88  itkGetMacro( Beta, double );
90 
91 protected:
93  ~SigmoidFeatureGenerator() override;
94  void PrintSelf(std::ostream& os, Indent indent) const override;
95 
98  void GenerateData () override;
99 
100 private:
101  using OutputPixelType = float;
103 
105 
109 
111 
112  double m_Alpha;
113  double m_Beta;
114 };
115 
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 # include "itkSigmoidFeatureGenerator.hxx"
120 #endif
121 
122 #endif
Light weight base class for most itk classes.
typename InputImageSpatialObjectType::Pointer InputImageSpatialObjectPointer
Computes the sigmoid function pixel-wise.
Class that generates features (typically images) used as input for a segmentation method...
Implementation of the composite pattern.
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
Generates a feature image by computing the Sigmoid intensity transformation.
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Templated n-dimensional image class.
Definition: itkImage.h:75
typename SigmoidFilterType::Pointer SigmoidFilterPointer