ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMorphologicalOpeningFeatureGenerator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkMorphologicalOpeningFeatureGenerator.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 itkMorphologicalOpeningFeatureGenerator_h
18 #define itkMorphologicalOpeningFeatureGenerator_h
19 
20 #include "itkFeatureGenerator.h"
21 #include "itkImage.h"
22 #include "itkImageSpatialObject.h"
27 #include "itkCastImageFilter.h"
28 
29 namespace itk
30 {
31 
45 template <unsigned int NDimension>
46 class ITK_TEMPLATE_EXPORT MorphologicalOpeningFeatureGenerator : public FeatureGenerator<NDimension>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_ASSIGN(MorphologicalOpeningFeatureGenerator);
50 
56 
58  itkNewMacro(Self);
59 
62 
64  static constexpr unsigned int Dimension = NDimension;
65 
68  using InputPixelType = signed short;
72  using SpatialObjectType = typename Superclass::SpatialObjectType;
73 
76  void SetInput( const SpatialObjectType * input );
77  const SpatialObjectType * GetInput() const;
79 
82  const SpatialObjectType * GetFeature() const;
83 
85  itkSetMacro( LungThreshold, InputPixelType );
86  itkGetMacro( LungThreshold, InputPixelType );
88 
89 protected:
92  void PrintSelf(std::ostream& os, Indent indent) const override;
93 
96  void GenerateData () override;
97 
98 private:
99  using InternalPixelType = unsigned char;
101 
102  using OutputPixelType = float;
104 
106 
110 
115 
119 
123 
124 
129 
131 };
132 
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 # include "itkMorphologicalOpeningFeatureGenerator.hxx"
137 #endif
138 
139 #endif
Light weight base class for most itk classes.
Perform front-propagation under a quorum sensing (voting) algorithm for filling holes in a binary mas...
Generates a feature image based on intensity and removes small pieces from it.
Binarize an input image by thresholding.
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.
A Neighborhood that represents a ball structuring element (ellipsoid) with binary elements...
Implementation of an image as spatial object.
typename VotingHoleFillingFilterType::Pointer VotingHoleFillingFilterPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.
typename InputImageSpatialObjectType::Pointer InputImageSpatialObjectPointer