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