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 =========================================================================*/
25 #ifndef __vtkImageGridSource_h
26 #define __vtkImageGridSource_h
27 
28 #include "vtkImageAlgorithm.h"
29 
31 {
32 public:
33  static vtkImageGridSource *New();
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
38 
40  vtkSetVector3Macro(GridSpacing,int);
41  vtkGetVector3Macro(GridSpacing,int);
43 
45 
46  vtkSetVector3Macro(GridOrigin,int);
47  vtkGetVector3Macro(GridOrigin,int);
49 
51 
52  vtkSetMacro(LineValue,double);
53  vtkGetMacro(LineValue,double);
55 
57 
58  vtkSetMacro(FillValue,double);
59  vtkGetMacro(FillValue,double);
61 
63 
65  vtkSetMacro(DataScalarType,int);
66  void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);}
67  void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);}
68  void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);}
70  {this->SetDataScalarType(VTK_UNSIGNED_SHORT);}
72  {this->SetDataScalarType(VTK_UNSIGNED_CHAR);}
73  vtkGetMacro(DataScalarType, int);
74  const char *GetDataScalarTypeAsString() {
75  return vtkImageScalarTypeNameMacro(this->DataScalarType); }
77 
79 
81  vtkSetVector6Macro(DataExtent,int);
82  vtkGetVector6Macro(DataExtent,int);
84 
86 
87  vtkSetVector3Macro(DataSpacing,double);
88  vtkGetVector3Macro(DataSpacing,double);
90 
92 
93  vtkSetVector3Macro(DataOrigin,double);
94  vtkGetVector3Macro(DataOrigin,double);
96 
97 protected:
100 
101  int GridSpacing[3];
102  int GridOrigin[3];
103 
104  double LineValue;
105  double FillValue;
106 
108 
109  int DataExtent[6];
110  double DataSpacing[3];
111  double DataOrigin[3];
112 
113  virtual int RequestInformation (vtkInformation*,
116  virtual void ExecuteData(vtkDataObject *data);
117 
118 private:
119  vtkImageGridSource(const vtkImageGridSource&); // Not implemented.
120  void operator=(const vtkImageGridSource&); // Not implemented.
121 };
122 
123 
124 #endif
virtual void ExecuteData(vtkDataObject *output)
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
#define VTK_DOUBLE
Definition: vtkType.h:36
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IMAGING_EXPORT
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
void SetDataScalarTypeToUnsignedShort()
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
void SetDataScalarTypeToUnsignedChar()
static vtkAlgorithm * New()
const char * GetDataScalarTypeAsString()
general representation of visualization data
Definition: vtkDataObject.h:70
Create an image of a grid.
#define VTK_INT
Definition: vtkType.h:31