ITK  4.6.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_EXPORT FeatureAggregator : public FeatureGenerator<NDimension>
41 {
42 public:
48 
52  itkTypeMacro(FeatureAggregator, FeatureGenerator);
53 
55  itkStaticConstMacro(Dimension, unsigned int, NDimension);
56 
62 
64  typedef float OutputPixelType;
67 
71 
76  void AddFeatureGenerator( FeatureGeneratorType * generator );
77 
79  virtual unsigned long GetMTime() const;
80 
81 protected:
83  virtual ~FeatureAggregator();
84  void PrintSelf(std::ostream& os, Indent indent) const;
85 
88  void GenerateData();
89 
90  unsigned int GetNumberOfInputFeatures() const;
91 
93 
94  const InputFeatureType * GetInputFeature( unsigned int featureId ) const;
95 
97 
98 private:
99  FeatureAggregator(const Self&); //purposely not implemented
100  void operator=(const Self&); //purposely not implemented
101 
103  typedef std::vector< FeatureGeneratorPointer > FeatureGeneratorArrayType;
104  typedef typename FeatureGeneratorArrayType::iterator FeatureGeneratorIterator;
105  typedef typename FeatureGeneratorArrayType::const_iterator FeatureGeneratorConstIterator;
106 
108 
109  void UpdateAllFeatureGenerators();
110 
111  void virtual ConsolidateFeatures() = 0;
112 
113 };
114 
115 } // end namespace itk
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 # include "itkFeatureAggregator.hxx"
119 #endif
120 
121 #endif
Light weight base class for most itk classes.
SpatialObject< NDimension > SpatialObjectType
ProgressAccumulator::Pointer m_ProgressAccumulator
FeatureGeneratorArrayType::iterator FeatureGeneratorIterator
FeatureGenerator< NDimension > Superclass
ImageSpatialObject< NDimension, OutputPixelType > OutputImageSpatialObjectType
SmartPointer< Self > Pointer
SpatialObjectType::ConstPointer SpatialObjectConstPointer
Class that generates features (typically images) used as input for a segmentation method...
SpatialObjectType::Pointer SpatialObjectPointer
FeatureGeneratorType::Pointer FeatureGeneratorPointer
Implementation of the composite pattern.
std::vector< FeatureGeneratorPointer > FeatureGeneratorArrayType
FeatureGeneratorType::SpatialObjectType InputFeatureType
Class for combining multiple features into a single one.
Image< OutputPixelType, NDimension > OutputImageType
Implementation of an image as spatial object.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
FeatureGeneratorArrayType::const_iterator FeatureGeneratorConstIterator
SmartPointer< const Self > ConstPointer
FeatureGeneratorArrayType m_FeatureGenerators
Templated n-dimensional image class.
Definition: itkImage.h:75
FeatureGenerator< Dimension > FeatureGeneratorType