ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFeatureAggregator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkFeatureAggregator.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 itkFeatureAggregator_h
18 #define itkFeatureAggregator_h
19 
20 #include "itkFeatureGenerator.h"
21 #include "itkImage.h"
22 #include "itkImageSpatialObject.h"
23 #include "itkProgressAccumulator.h"
24 
25 namespace itk
26 {
27 
39 template <unsigned int NDimension>
40 class ITK_TEMPLATE_EXPORT FeatureAggregator : public FeatureGenerator<NDimension>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_ASSIGN(FeatureAggregator);
44 
50 
54  itkTypeMacro(FeatureAggregator, FeatureGenerator);
55 
57  static constexpr unsigned int Dimension = NDimension;
58 
64 
66  using OutputPixelType = float;
69 
73 
78  void AddFeatureGenerator( FeatureGeneratorType * generator );
79 
81  unsigned long GetMTime() const override;
82 
83 protected:
85  ~FeatureAggregator() override;
86  void PrintSelf(std::ostream& os, Indent indent) const override;
87 
90  void GenerateData() override;
91 
92  unsigned int GetNumberOfInputFeatures() const;
93 
95 
96  const InputFeatureType * GetInputFeature( unsigned int featureId ) const;
97 
99 
100 private:
102  using FeatureGeneratorArrayType = std::vector< FeatureGeneratorPointer >;
103  using FeatureGeneratorIterator = typename FeatureGeneratorArrayType::iterator;
104  using FeatureGeneratorConstIterator = typename FeatureGeneratorArrayType::const_iterator;
105 
107 
108  void UpdateAllFeatureGenerators();
109 
110  void virtual ConsolidateFeatures() = 0;
111 
112 };
113 
114 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 # include "itkFeatureAggregator.hxx"
118 #endif
119 
120 #endif
Light weight base class for most itk classes.
typename FeatureGeneratorArrayType::iterator FeatureGeneratorIterator
typename SpatialObjectType::Pointer SpatialObjectPointer
ProgressAccumulator::Pointer m_ProgressAccumulator
typename FeatureGeneratorType::Pointer FeatureGeneratorPointer
Class that generates features (typically images) used as input for a segmentation method...
typename FeatureGeneratorType::SpatialObjectType InputFeatureType
Implementation of the composite pattern.
std::vector< FeatureGeneratorPointer > FeatureGeneratorArrayType
Class for combining multiple features into a single one.
typename SpatialObjectType::ConstPointer SpatialObjectConstPointer
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
FeatureGeneratorArrayType m_FeatureGenerators
Templated n-dimensional image class.
Definition: itkImage.h:75
typename FeatureGeneratorArrayType::const_iterator FeatureGeneratorConstIterator