File: vtkRTAnalyticSource.h

package info (click to toggle)
vtk9 9.5.2%2Bdfsg3-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 205,992 kB
  • sloc: cpp: 2,336,570; ansic: 327,116; python: 111,200; yacc: 4,104; java: 3,977; sh: 3,032; xml: 2,771; perl: 2,189; lex: 1,787; makefile: 185; javascript: 165; objc: 153; tcl: 59
file content (151 lines) | stat: -rw-r--r-- 3,576 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
/**
 * @class   vtkRTAnalyticSource
 * @brief   Create an image for regression testing
 *
 * vtkRTAnalyticSource just produces images with pixel values determined
 * by a Maximum*Gaussian*XMag*sin(XFreq*x)*sin(YFreq*y)*cos(ZFreq*z)
 * Values are float scalars on point data with name "RTData".
 */

#ifndef vtkRTAnalyticSource_h
#define vtkRTAnalyticSource_h

#include "vtkImageAlgorithm.h"
#include "vtkImagingCoreModule.h" // For export macro

VTK_ABI_NAMESPACE_BEGIN
class VTKIMAGINGCORE_EXPORT vtkRTAnalyticSource : public vtkImageAlgorithm
{
public:
  static vtkRTAnalyticSource* New();
  vtkTypeMacro(vtkRTAnalyticSource, vtkImageAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent) override;

  ///@{
  /**
   * Set/Get the extent of the whole output image. Initial value is
   * {-10,10,-10,10,-10,10}
   */
  void SetWholeExtent(int xMinx, int xMax, int yMin, int yMax, int zMin, int zMax);
  vtkGetVector6Macro(WholeExtent, int);
  ///@}

  ///@{
  /**
   * Set/Get the center of function. Initial value is {0.0,0.0,0.0}
   */
  vtkSetVector3Macro(Center, double);
  vtkGetVector3Macro(Center, double);
  ///@}

  ///@{
  /**
   * Set/Get the Maximum value of the function. Initial value is 255.0.
   */
  vtkSetMacro(Maximum, double);
  vtkGetMacro(Maximum, double);
  ///@}

  ///@{
  /**
   * Set/Get the standard deviation of the function. Initial value is 0.5.
   */
  vtkSetMacro(StandardDeviation, double);
  vtkGetMacro(StandardDeviation, double);
  ///@}

  ///@{
  /**
   * Set/Get the natural frequency in x. Initial value is 60.
   */
  vtkSetMacro(XFreq, double);
  vtkGetMacro(XFreq, double);
  ///@}

  ///@{
  /**
   * Set/Get the natural frequency in y. Initial value is 30.
   */
  vtkSetMacro(YFreq, double);
  vtkGetMacro(YFreq, double);
  ///@}

  ///@{
  /**
   * Set/Get the natural frequency in z. Initial value is 40.
   */
  vtkSetMacro(ZFreq, double);
  vtkGetMacro(ZFreq, double);
  ///@}

  ///@{
  /**
   * Set/Get the magnitude in x. Initial value is 10.
   */
  vtkSetMacro(XMag, double);
  vtkGetMacro(XMag, double);
  ///@}

  ///@{
  /**
   * Set/Get the magnitude in y. Initial value is 18.
   */
  vtkSetMacro(YMag, double);
  vtkGetMacro(YMag, double);
  ///@}

  ///@{
  /**
   * Set/Get the magnitude in z. Initial value is 5.
   */
  vtkSetMacro(ZMag, double);
  vtkGetMacro(ZMag, double);
  ///@}

  ///@{
  /**
   * Set/Get the sub-sample rate. Initial value is 1.
   */
  vtkSetMacro(SubsampleRate, int);
  vtkGetMacro(SubsampleRate, int);
  ///@}

protected:
  /**
   * Default constructor. Initial values are:
   * Maximum=255.0, Center[3]={0.0,0.0,0.0}, WholeExtent={-10,10,-10,10,-10,10}
   * StandardDeviation=0.5, XFreq=60, XMag=10, YFreq=30, YMag=18, ZFreq=40,
   * ZMag=5, SubsampleRate=1
   */
  vtkRTAnalyticSource();

  /**
   * Destructor.
   */
  ~vtkRTAnalyticSource() override = default;

  double XFreq;
  double YFreq;
  double ZFreq;
  double XMag;
  double YMag;
  double ZMag;
  double StandardDeviation;
  int WholeExtent[6];
  double Center[3];
  double Maximum;
  int SubsampleRate;

  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
    vtkInformationVector* outputVector) override;
  void ExecuteDataWithInformation(vtkDataObject* data, vtkInformation* outInfo) override;

private:
  vtkRTAnalyticSource(const vtkRTAnalyticSource&) = delete;
  void operator=(const vtkRTAnalyticSource&) = delete;
};

VTK_ABI_NAMESPACE_END
#endif