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
46
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
57class VTKFILTERSGENERAL_EXPORT vtkTableFFT : public vtkTableAlgorithm
58{
59public:
61 static vtkTableFFT* New();
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
64 enum // Windowing functions
65 {
71
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
203protected:
205 ~vtkTableFFT() override;
206
208 vtkInformationVector* outputVector) override;
209
215 void Initialize(vtkTable* input);
216
221
222private:
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
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Hold a reference to a vtkObjectBase instance.
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.
vtkSmartPointer< vtkDataArray > DoFFT(vtkDataArray *input)
Perform the FFT on the given data array.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Initialize(vtkTable *input)
Initialize the internal state before performing the actual fft.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
@ MAX_WINDOWING_FUNCTION
Definition vtkTableFFT.h:72
A table, which contains similar-typed columns of data.
Definition vtkTable.h:74
#define vtkDataArray
#define VTK_DEPRECATED_IN_9_2_0(reason)
int vtkIdType
Definition vtkType.h:332