VTK  9.2.6
vtkImageGridSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageGridSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
58#ifndef vtkImageGridSource_h
59#define vtkImageGridSource_h
60
61#include "vtkImageAlgorithm.h"
62#include "vtkImagingSourcesModule.h" // For export macro
63
64class VTKIMAGINGSOURCES_EXPORT vtkImageGridSource : public vtkImageAlgorithm
65{
66public:
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
72
76 vtkSetVector3Macro(GridSpacing, int);
77 vtkGetVector3Macro(GridSpacing, int);
79
81
84 vtkSetVector3Macro(GridOrigin, int);
85 vtkGetVector3Macro(GridOrigin, int);
87
89
92 vtkSetMacro(LineValue, double);
93 vtkGetMacro(LineValue, double);
95
97
100 vtkSetMacro(FillValue, double);
101 vtkGetMacro(FillValue, double);
103
105
109 vtkSetMacro(DataScalarType, int);
110 void SetDataScalarTypeToDouble() { this->SetDataScalarType(VTK_DOUBLE); }
111 void SetDataScalarTypeToInt() { this->SetDataScalarType(VTK_INT); }
112 void SetDataScalarTypeToShort() { this->SetDataScalarType(VTK_SHORT); }
113 void SetDataScalarTypeToUnsignedShort() { this->SetDataScalarType(VTK_UNSIGNED_SHORT); }
114 void SetDataScalarTypeToUnsignedChar() { this->SetDataScalarType(VTK_UNSIGNED_CHAR); }
115 vtkGetMacro(DataScalarType, int);
117 {
118 return vtkImageScalarTypeNameMacro(this->DataScalarType);
119 }
121
123
127 vtkSetVector6Macro(DataExtent, int);
128 vtkGetVector6Macro(DataExtent, int);
130
132
135 vtkSetVector3Macro(DataSpacing, double);
136 vtkGetVector3Macro(DataSpacing, double);
138
140
143 vtkSetVector3Macro(DataOrigin, double);
144 vtkGetVector3Macro(DataOrigin, double);
146
147protected:
149 ~vtkImageGridSource() override = default;
150
151 int GridSpacing[3];
152 int GridOrigin[3];
153
154 double LineValue;
155 double FillValue;
156
158
159 int DataExtent[6];
160 double DataSpacing[3];
161 double DataOrigin[3];
162
165
166private:
167 vtkImageGridSource(const vtkImageGridSource&) = delete;
168 void operator=(const vtkImageGridSource&) = delete;
169};
170
171#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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ data
Definition: vtkX3D.h:321
#define VTK_SHORT
Definition: vtkType.h:48
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:47
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:49
#define VTK_INT
Definition: vtkType.h:50