VTK  9.3.0
vtkImageGridSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
26#ifndef vtkImageGridSource_h
27#define vtkImageGridSource_h
28
29#include "vtkImageAlgorithm.h"
30#include "vtkImagingSourcesModule.h" // For export macro
31
32VTK_ABI_NAMESPACE_BEGIN
33class VTKIMAGINGSOURCES_EXPORT vtkImageGridSource : public vtkImageAlgorithm
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
41
45 vtkSetVector3Macro(GridSpacing, int);
46 vtkGetVector3Macro(GridSpacing, int);
48
50
53 vtkSetVector3Macro(GridOrigin, int);
54 vtkGetVector3Macro(GridOrigin, int);
56
58
61 vtkSetMacro(LineValue, double);
62 vtkGetMacro(LineValue, double);
64
66
69 vtkSetMacro(FillValue, double);
70 vtkGetMacro(FillValue, double);
72
74
78 vtkSetMacro(DataScalarType, int);
79 void SetDataScalarTypeToDouble() { this->SetDataScalarType(VTK_DOUBLE); }
80 void SetDataScalarTypeToInt() { this->SetDataScalarType(VTK_INT); }
81 void SetDataScalarTypeToShort() { this->SetDataScalarType(VTK_SHORT); }
82 void SetDataScalarTypeToUnsignedShort() { this->SetDataScalarType(VTK_UNSIGNED_SHORT); }
83 void SetDataScalarTypeToUnsignedChar() { this->SetDataScalarType(VTK_UNSIGNED_CHAR); }
84 vtkGetMacro(DataScalarType, int);
86 {
87 return vtkImageScalarTypeNameMacro(this->DataScalarType);
88 }
90
92
96 vtkSetVector6Macro(DataExtent, int);
97 vtkGetVector6Macro(DataExtent, int);
99
101
104 vtkSetVector3Macro(DataSpacing, double);
105 vtkGetVector3Macro(DataSpacing, double);
107
109
112 vtkSetVector3Macro(DataOrigin, double);
113 vtkGetVector3Macro(DataOrigin, double);
115
116protected:
118 ~vtkImageGridSource() override = default;
119
120 int GridSpacing[3];
121 int GridOrigin[3];
122
123 double LineValue;
124 double FillValue;
125
127
128 int DataExtent[6];
129 double DataSpacing[3];
130 double DataOrigin[3];
131
134
135private:
136 vtkImageGridSource(const vtkImageGridSource&) = delete;
137 void operator=(const vtkImageGridSource&) = delete;
138};
139
140VTK_ABI_NAMESPACE_END
141#endif
general representation of visualization data
Generic algorithm superclass for image algs.
Create an image of a grid.
static vtkImageGridSource * New()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetDataScalarTypeToUnsignedChar()
Set/Get the data type of pixels in the imported data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDataScalarTypeToUnsignedShort()
Set/Get the data type of pixels in the imported data.
void SetDataScalarTypeToShort()
Set/Get the data type of pixels in the imported data.
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
void SetDataScalarTypeToInt()
Set/Get the data type of pixels in the imported data.
~vtkImageGridSource() override=default
const char * GetDataScalarTypeAsString()
Set/Get the data type of pixels in the imported data.
void SetDataScalarTypeToDouble()
Set/Get the data type of pixels in the imported data.
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
#define VTK_SHORT
Definition vtkType.h:36
#define VTK_DOUBLE
Definition vtkType.h:43
#define VTK_UNSIGNED_CHAR
Definition vtkType.h:35
#define VTK_UNSIGNED_SHORT
Definition vtkType.h:37
#define VTK_INT
Definition vtkType.h:38