vtkImageButterworthHighPass.h 2.83 KB
Newer Older
Charles Law's avatar
Charles Law committed
1 2 3
/*=========================================================================

  Program:   Visualization Toolkit
Charles Law's avatar
Charles Law committed
4
  Module:    vtkImageButterworthHighPass.h
Charles Law's avatar
Charles Law committed
5

6
  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 8
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Charles Law's avatar
Charles Law committed
9

10 11
     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
     PURPOSE.  See the above copyright notice for more information.
Charles Law's avatar
Charles Law committed
13 14

=========================================================================*/
Charles Law's avatar
Charles Law committed
15
// .NAME vtkImageButterworthHighPass - Frequency domain high pass.
Charles Law's avatar
Charles Law committed
16
// .SECTION Description
17 18 19
// This filter only works on an image after it has been converted to
// frequency domain by a vtkImageFFT filter.  A vtkImageRFFT filter
// can be used to convert the output back into the spatial domain.
Charles Law's avatar
Charles Law committed
20
// vtkImageButterworthHighPass  the frequency components around 0 are
Ken Martin's avatar
Ken Martin committed
21
// attenuated.  Input and output are in doubles, with two components
Charles Law's avatar
Charles Law committed
22 23
// (complex numbers).
// out(i, j) = 1 / (1 + pow(CutOff/Freq(i,j), 2*Order));
Charles Law's avatar
Charles Law committed
24

25 26
// .SECTION See Also
// vtkImageButterworthLowPass
Charles Law's avatar
Charles Law committed
27

28 29
#ifndef vtkImageButterworthHighPass_h
#define vtkImageButterworthHighPass_h
Charles Law's avatar
Charles Law committed
30 31


32
#include "vtkImagingFourierModule.h" // For export macro
33
#include "vtkThreadedImageAlgorithm.h"
34

35
class VTKIMAGINGFOURIER_EXPORT vtkImageButterworthHighPass : public vtkThreadedImageAlgorithm
Charles Law's avatar
Charles Law committed
36 37
{
public:
38
  static vtkImageButterworthHighPass *New();
39
  vtkTypeMacro(vtkImageButterworthHighPass,vtkThreadedImageAlgorithm);
40
  void PrintSelf(ostream& os, vtkIndent indent);
41

Charles Law's avatar
Charles Law committed
42
  // Description:
43 44 45
  // Set/Get the cutoff frequency for each axis.
  // The values are specified in the order X, Y, Z, Time.
  // Units: Cycles per world unit (as defined by the data spacing).
Ken Martin's avatar
Ken Martin committed
46 47 48 49 50 51 52 53 54
  vtkSetVector3Macro(CutOff,double);
  void SetCutOff(double v) {this->SetCutOff(v, v, v);}
  void SetXCutOff(double v);
  void SetYCutOff(double v);
  void SetZCutOff(double v);
  vtkGetVector3Macro(CutOff,double);
  double GetXCutOff() {return this->CutOff[0];}
  double GetYCutOff() {return this->CutOff[1];}
  double GetZCutOff() {return this->CutOff[2];}
55

Charles Law's avatar
Charles Law committed
56 57 58 59
  // Description:
  // The order determines sharpness of the cutoff curve.
  vtkSetMacro(Order, int);
  vtkGetMacro(Order, int);
60

Charles Law's avatar
Charles Law committed
61
protected:
62
  vtkImageButterworthHighPass();
63
  ~vtkImageButterworthHighPass() {}
64

Charles Law's avatar
Charles Law committed
65
  int Order;
Ken Martin's avatar
Ken Martin committed
66
  double CutOff[3];
67

68 69 70 71 72
  void ThreadedRequestData(vtkInformation *request,
                           vtkInformationVector **inputVector,
                           vtkInformationVector *outputVector,
                           vtkImageData ***inData, vtkImageData **outData,
                           int outExt[6], int id);
73 74 75
private:
  vtkImageButterworthHighPass(const vtkImageButterworthHighPass&);  // Not implemented.
  void operator=(const vtkImageButterworthHighPass&);  // Not implemented.
Charles Law's avatar
Charles Law committed
76 77 78
};

#endif