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
44#ifndef vtkTableFFT_h
45#define vtkTableFFT_h
46
47#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
48#include "vtkFiltersGeneralModule.h" // For export macro
49#include "vtkSmartPointer.h" // For internal method.
50#include "vtkTableAlgorithm.h"
51
52#include <memory> // For unique_ptr
53
54class VTKFILTERSGENERAL_EXPORT vtkTableFFT : public vtkTableAlgorithm
55{
56public:
58 static vtkTableFFT* New();
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
61 enum // Windowing functions
62 {
63 HANNING = 0,
68
69 MAX_WINDOWING_FUNCTION
70 };
71
73
81 vtkGetMacro(Normalize, bool);
82 vtkSetMacro(Normalize, bool);
83 vtkBooleanMacro(Normalize, bool);
85
87
97 vtkGetMacro(AverageFft, bool);
98 virtual void SetAverageFft(bool);
99 vtkBooleanMacro(AverageFft, bool);
101
103
109 vtkGetMacro(OptimizeForRealInput, bool);
110 vtkSetMacro(OptimizeForRealInput, bool);
111 vtkBooleanMacro(OptimizeForRealInput, bool);
113
115
123 vtkGetMacro(CreateFrequencyColumn, bool);
124 vtkSetMacro(CreateFrequencyColumn, bool);
125 vtkBooleanMacro(CreateFrequencyColumn, bool);
127
129
135 vtkGetMacro(DefaultSampleRate, double);
136 vtkSetMacro(DefaultSampleRate, double);
138
140
154 vtkGetMacro(NumberOfBlock, int);
155 vtkSetMacro(NumberOfBlock, int);
157
159
169 vtkGetMacro(BlockSize, int);
170 virtual void SetBlockSize(int);
172
174
181 vtkGetMacro(WindowingFunction, int);
182 virtual void SetWindowingFunction(int);
184
186
193 "Deprecated in favor of always keeping the output array names the same as the input.")
194 vtkGetMacro(PrefixOutputArrays, bool);
196 "Deprecated in favor of always keeping the output array names the same as the input.")
197 vtkSetMacro(PrefixOutputArrays, bool);
199
200protected:
202 ~vtkTableFFT() override;
203
204 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
205 vtkInformationVector* outputVector) override;
206
212 void Initialize(vtkTable* input);
213
218
219private:
220 vtkTableFFT(const vtkTableFFT&) = delete;
221 void operator=(const vtkTableFFT&) = delete;
222
223 bool Normalize = false;
224 bool AverageFft = false;
225 bool OptimizeForRealInput = false;
226 bool CreateFrequencyColumn = false;
227 int NumberOfBlock = 2;
228 vtkIdType BlockSize = 1024;
229 int WindowingFunction = RECTANGULAR;
230 double DefaultSampleRate = 1e4;
231
232 bool PrefixOutputArrays = false;
233
234 struct vtkInternal;
235 std::unique_ptr<vtkInternal> Internals;
236};
237
238#endif // vtkTableFFT_h
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Hold a reference to a vtkObjectBase instance.
Superclass for algorithms that produce only vtkTables as output.
FFT for table columns.
Definition vtkTableFFT.h:55
virtual void SetWindowingFunction(int)
Specify the windowing function to apply on the input.
virtual void SetBlockSize(int)
Only used if AverageFft is true.
static vtkTableFFT * New()
virtual void SetAverageFft(bool)
Specify if the input should be split in multiple blocks to compute an average fft across all blocks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:68
#define VTK_DEPRECATED_IN_9_2_0(reason)
int vtkIdType
Definition vtkType.h:332