VTK  9.1.0
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=========================================================================*/
32#ifndef vtkImageGridSource_h
33#define vtkImageGridSource_h
34
35#include "vtkImageAlgorithm.h"
36#include "vtkImagingSourcesModule.h" // For export macro
37
38class VTKIMAGINGSOURCES_EXPORT vtkImageGridSource : public vtkImageAlgorithm
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
50 vtkSetVector3Macro(GridSpacing, int);
51 vtkGetVector3Macro(GridSpacing, int);
53
55
58 vtkSetVector3Macro(GridOrigin, int);
59 vtkGetVector3Macro(GridOrigin, int);
61
63
66 vtkSetMacro(LineValue, double);
67 vtkGetMacro(LineValue, double);
69
71
74 vtkSetMacro(FillValue, double);
75 vtkGetMacro(FillValue, double);
77
79
83 vtkSetMacro(DataScalarType, int);
84 void SetDataScalarTypeToDouble() { this->SetDataScalarType(VTK_DOUBLE); }
85 void SetDataScalarTypeToInt() { this->SetDataScalarType(VTK_INT); }
86 void SetDataScalarTypeToShort() { this->SetDataScalarType(VTK_SHORT); }
87 void SetDataScalarTypeToUnsignedShort() { this->SetDataScalarType(VTK_UNSIGNED_SHORT); }
88 void SetDataScalarTypeToUnsignedChar() { this->SetDataScalarType(VTK_UNSIGNED_CHAR); }
89 vtkGetMacro(DataScalarType, int);
91 {
92 return vtkImageScalarTypeNameMacro(this->DataScalarType);
93 }
95
97
101 vtkSetVector6Macro(DataExtent, int);
102 vtkGetVector6Macro(DataExtent, int);
104
106
109 vtkSetVector3Macro(DataSpacing, double);
110 vtkGetVector3Macro(DataSpacing, double);
112
114
117 vtkSetVector3Macro(DataOrigin, double);
118 vtkGetVector3Macro(DataOrigin, double);
120
121protected:
123 ~vtkImageGridSource() override = default;
124
125 int GridSpacing[3];
126 int GridOrigin[3];
127
128 double LineValue;
129 double FillValue;
130
132
133 int DataExtent[6];
134 double DataSpacing[3];
135 double DataOrigin[3];
136
139
140private:
141 vtkImageGridSource(const vtkImageGridSource&) = delete;
142 void operator=(const vtkImageGridSource&) = delete;
143};
144
145#endif
general representation of visualization data
Definition: vtkDataObject.h:69
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:43
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