VTK  9.2.6
vtkTableFFT.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkTableFFT.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 
17 /*-------------------------------------------------------------------------
18  Copyright 2009 Sandia Corporation.
19  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
20  the U.S. Government retains certain rights in this software.
21 -------------------------------------------------------------------------*/
22 
47 #ifndef vtkTableFFT_h
48 #define vtkTableFFT_h
49 
50 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
51 #include "vtkFiltersGeneralModule.h" // For export macro
52 #include "vtkSmartPointer.h" // For internal method.
53 #include "vtkTableAlgorithm.h"
54 
55 #include <memory> // For unique_ptr
56 
57 class VTKFILTERSGENERAL_EXPORT vtkTableFFT : public vtkTableAlgorithm
58 {
59 public:
61  static vtkTableFFT* New();
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
64  enum // Windowing functions
65  {
66  HANNING = 0,
71 
72  MAX_WINDOWING_FUNCTION
73  };
74 
76 
84  vtkGetMacro(Normalize, bool);
85  vtkSetMacro(Normalize, bool);
86  vtkBooleanMacro(Normalize, bool);
88 
90 
100  vtkGetMacro(AverageFft, bool);
101  virtual void SetAverageFft(bool);
102  vtkBooleanMacro(AverageFft, bool);
104 
106 
112  vtkGetMacro(OptimizeForRealInput, bool);
113  vtkSetMacro(OptimizeForRealInput, bool);
114  vtkBooleanMacro(OptimizeForRealInput, bool);
116 
118 
126  vtkGetMacro(CreateFrequencyColumn, bool);
127  vtkSetMacro(CreateFrequencyColumn, bool);
128  vtkBooleanMacro(CreateFrequencyColumn, bool);
130 
132 
138  vtkGetMacro(DefaultSampleRate, double);
139  vtkSetMacro(DefaultSampleRate, double);
141 
143 
157  vtkGetMacro(NumberOfBlock, int);
158  vtkSetMacro(NumberOfBlock, int);
160 
162 
172  vtkGetMacro(BlockSize, int);
173  virtual void SetBlockSize(int);
175 
177 
184  vtkGetMacro(WindowingFunction, int);
185  virtual void SetWindowingFunction(int);
187 
189 
196  "Deprecated in favor of always keeping the output array names the same as the input.")
197  vtkGetMacro(PrefixOutputArrays, bool);
199  "Deprecated in favor of always keeping the output array names the same as the input.")
200  vtkSetMacro(PrefixOutputArrays, bool);
202 
203 protected:
204  vtkTableFFT();
205  ~vtkTableFFT() override;
206 
207  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
208  vtkInformationVector* outputVector) override;
209 
215  void Initialize(vtkTable* input);
216 
221 
222 private:
223  vtkTableFFT(const vtkTableFFT&) = delete;
224  void operator=(const vtkTableFFT&) = delete;
225 
226  bool Normalize = false;
227  bool AverageFft = false;
228  bool OptimizeForRealInput = false;
229  bool CreateFrequencyColumn = false;
230  int NumberOfBlock = 2;
231  vtkIdType BlockSize = 1024;
232  int WindowingFunction = RECTANGULAR;
233  double DefaultSampleRate = 1e4;
234 
235  bool PrefixOutputArrays = false;
236 
237  struct vtkInternal;
238  std::unique_ptr<vtkInternal> Internals;
239 };
240 
241 #endif // vtkTableFFT_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
#define VTK_DEPRECATED_IN_9_2_0(reason)
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:32
int vtkIdType
Definition: vtkType.h:332
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
FFT for table columns.
Definition: vtkTableFFT.h:57
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:73
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.