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 "vtkImagingSourcesModule.h" // For export macro
29 #include "vtkImageAlgorithm.h"
30 
32 {
33 public:
34  static vtkImageGridSource *New();
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
39 
41  vtkSetVector3Macro(GridSpacing,int);
42  vtkGetVector3Macro(GridSpacing,int);
44 
46 
47  vtkSetVector3Macro(GridOrigin,int);
48  vtkGetVector3Macro(GridOrigin,int);
50 
52 
53  vtkSetMacro(LineValue,double);
54  vtkGetMacro(LineValue,double);
56 
58 
59  vtkSetMacro(FillValue,double);
60  vtkGetMacro(FillValue,double);
62 
64 
66  vtkSetMacro(DataScalarType,int);
67  void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);}
68  void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);}
69  void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);}
71  {this->SetDataScalarType(VTK_UNSIGNED_SHORT);}
73  {this->SetDataScalarType(VTK_UNSIGNED_CHAR);}
74  vtkGetMacro(DataScalarType, int);
75  const char *GetDataScalarTypeAsString() {
76  return vtkImageScalarTypeNameMacro(this->DataScalarType); }
78 
80 
82  vtkSetVector6Macro(DataExtent,int);
83  vtkGetVector6Macro(DataExtent,int);
85 
87 
88  vtkSetVector3Macro(DataSpacing,double);
89  vtkGetVector3Macro(DataSpacing,double);
91 
93 
94  vtkSetVector3Macro(DataOrigin,double);
95  vtkGetVector3Macro(DataOrigin,double);
97 
98 protected:
101 
102  int GridSpacing[3];
103  int GridOrigin[3];
104 
105  double LineValue;
106  double FillValue;
107 
109 
110  int DataExtent[6];
111  double DataSpacing[3];
112  double DataOrigin[3];
113 
114  virtual int RequestInformation (vtkInformation*,
118 
119 private:
120  vtkImageGridSource(const vtkImageGridSource&); // Not implemented.
121  void operator=(const vtkImageGridSource&); // Not implemented.
122 };
123 
124 
125 #endif
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
#define VTK_DOUBLE
Definition: vtkType.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
void SetDataScalarTypeToUnsignedShort()
#define VTKIMAGINGSOURCES_EXPORT
#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:64
Create an image of a grid.
#define VTK_INT
Definition: vtkType.h:31