VTK
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 =========================================================================*/
23 #ifndef vtkImageGridSource_h
24 #define vtkImageGridSource_h
25 
26 #include "vtkImagingSourcesModule.h" // For export macro
27 #include "vtkImageAlgorithm.h"
28 
29 class VTKIMAGINGSOURCES_EXPORT vtkImageGridSource : public vtkImageAlgorithm
30 {
31 public:
32  static vtkImageGridSource *New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37 
41  vtkSetVector3Macro(GridSpacing,int);
42  vtkGetVector3Macro(GridSpacing,int);
44 
46 
49  vtkSetVector3Macro(GridOrigin,int);
50  vtkGetVector3Macro(GridOrigin,int);
52 
54 
57  vtkSetMacro(LineValue,double);
58  vtkGetMacro(LineValue,double);
60 
62 
65  vtkSetMacro(FillValue,double);
66  vtkGetMacro(FillValue,double);
68 
70 
74  vtkSetMacro(DataScalarType,int);
75  void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);}
76  void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);}
77  void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);}
79  {this->SetDataScalarType(VTK_UNSIGNED_SHORT);}
81  {this->SetDataScalarType(VTK_UNSIGNED_CHAR);}
82  vtkGetMacro(DataScalarType, int);
83  const char *GetDataScalarTypeAsString() {
84  return vtkImageScalarTypeNameMacro(this->DataScalarType); }
86 
88 
92  vtkSetVector6Macro(DataExtent,int);
93  vtkGetVector6Macro(DataExtent,int);
95 
97 
100  vtkSetVector3Macro(DataSpacing,double);
101  vtkGetVector3Macro(DataSpacing,double);
103 
105 
108  vtkSetVector3Macro(DataOrigin,double);
109  vtkGetVector3Macro(DataOrigin,double);
111 
112 protected:
114  ~vtkImageGridSource() override {}
115 
116  int GridSpacing[3];
117  int GridOrigin[3];
118 
119  double LineValue;
120  double FillValue;
121 
123 
124  int DataExtent[6];
125  double DataSpacing[3];
126  double DataOrigin[3];
127 
130  vtkInformationVector*) override;
132 
133 private:
134  vtkImageGridSource(const vtkImageGridSource&) = delete;
135  void operator=(const vtkImageGridSource&) = delete;
136 };
137 
138 
139 #endif
vtkImageGridSource::LineValue
double LineValue
Definition: vtkImageGridSource.h:119
vtkX3D::data
Definition: vtkX3D.h:315
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkImageAlgorithm::ExecuteDataWithInformation
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkImageAlgorithm.h
vtkImageGridSource::FillValue
double FillValue
Definition: vtkImageGridSource.h:120
vtkImageGridSource::~vtkImageGridSource
~vtkImageGridSource() override
Definition: vtkImageGridSource.h:114
vtkImageGridSource::SetDataScalarTypeToUnsignedChar
void SetDataScalarTypeToUnsignedChar()
Definition: vtkImageGridSource.h:80
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkImageGridSource::SetDataScalarTypeToInt
void SetDataScalarTypeToInt()
Definition: vtkImageGridSource.h:76
vtkImageGridSource::SetDataScalarTypeToDouble
void SetDataScalarTypeToDouble()
Definition: vtkImageGridSource.h:75
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageGridSource::SetDataScalarTypeToUnsignedShort
void SetDataScalarTypeToUnsignedShort()
Definition: vtkImageGridSource.h:78
vtkImageGridSource::GetDataScalarTypeAsString
const char * GetDataScalarTypeAsString()
Definition: vtkImageGridSource.h:83
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
vtkImageGridSource::SetDataScalarTypeToShort
void SetDataScalarTypeToShort()
Definition: vtkImageGridSource.h:77
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
vtkImageGridSource::DataScalarType
int DataScalarType
Definition: vtkImageGridSource.h:122
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkImageGridSource
Create an image of a grid.
Definition: vtkImageGridSource.h:29