ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkWeightedSumFeatureAggregator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkWeightedSumFeatureAggregator.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 itkWeightedSumFeatureAggregator_h
18 #define itkWeightedSumFeatureAggregator_h
19 
20 #include "itkFeatureAggregator.h"
21 
22 namespace itk
23 {
24 
43 template <unsigned int NDimension>
44 class ITK_TEMPLATE_EXPORT WeightedSumFeatureAggregator : public FeatureAggregator<NDimension>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(WeightedSumFeatureAggregator);
48 
54 
56  itkNewMacro(Self);
57 
60 
62  static constexpr unsigned int Dimension = NDimension;
63 
66  void virtual AddWeight( double weight );
67 
69  using OutputPixelType = typename Superclass::OutputPixelType;
70  using OutputImageType = typename Superclass::OutputImageType;
71  using OutputImageSpatialObjectType = typename Superclass::OutputImageSpatialObjectType;
72 
73 protected:
75  ~WeightedSumFeatureAggregator() override;
76  void PrintSelf(std::ostream& os, Indent indent) const override;
77 
78 private:
79  void ConsolidateFeatures() override;
80 
81  using WeightsArrayType = std::vector< double >;
82 
84 
85 };
86 
87 } // end namespace itk
88 
89 #ifndef ITK_MANUAL_INSTANTIATION
90 # include "itkWeightedSumFeatureAggregator.hxx"
91 #endif
92 
93 #endif
Light weight base class for most itk classes.
Class for combining multiple features into a single one.
Class for combining multiple features into a single one by computing a pixel-wise weighted sum that i...
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