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 =========================================================================*/
29 #ifndef vtkImageGridSource_h
30 #define vtkImageGridSource_h
31 
32 #include "vtkImagingSourcesModule.h" // For export macro
33 #include "vtkImageAlgorithm.h"
34 
35 class VTKIMAGINGSOURCES_EXPORT vtkImageGridSource : public vtkImageAlgorithm
36 {
37 public:
38  static vtkImageGridSource *New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
47  vtkSetVector3Macro(GridSpacing,int);
48  vtkGetVector3Macro(GridSpacing,int);
50 
52 
55  vtkSetVector3Macro(GridOrigin,int);
56  vtkGetVector3Macro(GridOrigin,int);
58 
60 
63  vtkSetMacro(LineValue,double);
64  vtkGetMacro(LineValue,double);
66 
68 
71  vtkSetMacro(FillValue,double);
72  vtkGetMacro(FillValue,double);
74 
76 
80  vtkSetMacro(DataScalarType,int);
81  void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);}
82  void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);}
83  void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);}
85  {this->SetDataScalarType(VTK_UNSIGNED_SHORT);}
87  {this->SetDataScalarType(VTK_UNSIGNED_CHAR);}
88  vtkGetMacro(DataScalarType, int);
89  const char *GetDataScalarTypeAsString() {
90  return vtkImageScalarTypeNameMacro(this->DataScalarType); }
92 
94 
98  vtkSetVector6Macro(DataExtent,int);
99  vtkGetVector6Macro(DataExtent,int);
101 
103 
106  vtkSetVector3Macro(DataSpacing,double);
107  vtkGetVector3Macro(DataSpacing,double);
109 
111 
114  vtkSetVector3Macro(DataOrigin,double);
115  vtkGetVector3Macro(DataOrigin,double);
117 
118 protected:
120  ~vtkImageGridSource() override {}
121 
122  int GridSpacing[3];
123  int GridOrigin[3];
124 
125  double LineValue;
126  double FillValue;
127 
129 
130  int DataExtent[6];
131  double DataSpacing[3];
132  double DataOrigin[3];
133 
136  vtkInformationVector*) override;
138 
139 private:
140  vtkImageGridSource(const vtkImageGridSource&) = delete;
141  void operator=(const vtkImageGridSource&) = delete;
142 };
143 
144 
145 #endif
~vtkImageGridSource() override
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
void SetDataScalarTypeToShort()
Set/Get the data type of pixels in the imported data.
void SetDataScalarTypeToDouble()
Set/Get the data type of pixels in the imported data.
#define VTK_DOUBLE
Definition: vtkType.h:59
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
#define VTK_SHORT
Definition: vtkType.h:52
void SetDataScalarTypeToUnsignedShort()
Set/Get the data type of pixels in the imported data.
void SetDataScalarTypeToInt()
Set/Get the data type of pixels in the imported data.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void SetDataScalarTypeToUnsignedChar()
Set/Get the data type of pixels in the imported data.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetDataScalarTypeAsString()
Set/Get the data type of pixels in the imported data.
general representation of visualization data
Definition: vtkDataObject.h:64
Create an image of a grid.
#define VTK_INT
Definition: vtkType.h:54