VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageGridSource.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00025 #ifndef __vtkImageGridSource_h 00026 #define __vtkImageGridSource_h 00027 00028 #include "vtkImagingSourcesModule.h" // For export macro 00029 #include "vtkImageAlgorithm.h" 00030 00031 class VTKIMAGINGSOURCES_EXPORT vtkImageGridSource : public vtkImageAlgorithm 00032 { 00033 public: 00034 static vtkImageGridSource *New(); 00035 vtkTypeMacro(vtkImageGridSource,vtkImageAlgorithm); 00036 void PrintSelf(ostream& os, vtkIndent indent); 00037 00039 00041 vtkSetVector3Macro(GridSpacing,int); 00042 vtkGetVector3Macro(GridSpacing,int); 00044 00046 00047 vtkSetVector3Macro(GridOrigin,int); 00048 vtkGetVector3Macro(GridOrigin,int); 00050 00052 00053 vtkSetMacro(LineValue,double); 00054 vtkGetMacro(LineValue,double); 00056 00058 00059 vtkSetMacro(FillValue,double); 00060 vtkGetMacro(FillValue,double); 00062 00064 00066 vtkSetMacro(DataScalarType,int); 00067 void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);} 00068 void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);} 00069 void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);} 00070 void SetDataScalarTypeToUnsignedShort() 00071 {this->SetDataScalarType(VTK_UNSIGNED_SHORT);} 00072 void SetDataScalarTypeToUnsignedChar() 00073 {this->SetDataScalarType(VTK_UNSIGNED_CHAR);} 00074 vtkGetMacro(DataScalarType, int); 00075 const char *GetDataScalarTypeAsString() { 00076 return vtkImageScalarTypeNameMacro(this->DataScalarType); } 00078 00080 00082 vtkSetVector6Macro(DataExtent,int); 00083 vtkGetVector6Macro(DataExtent,int); 00085 00087 00088 vtkSetVector3Macro(DataSpacing,double); 00089 vtkGetVector3Macro(DataSpacing,double); 00091 00093 00094 vtkSetVector3Macro(DataOrigin,double); 00095 vtkGetVector3Macro(DataOrigin,double); 00097 00098 protected: 00099 vtkImageGridSource(); 00100 ~vtkImageGridSource() {}; 00101 00102 int GridSpacing[3]; 00103 int GridOrigin[3]; 00104 00105 double LineValue; 00106 double FillValue; 00107 00108 int DataScalarType; 00109 00110 int DataExtent[6]; 00111 double DataSpacing[3]; 00112 double DataOrigin[3]; 00113 00114 virtual int RequestInformation (vtkInformation*, 00115 vtkInformationVector**, 00116 vtkInformationVector*); 00117 virtual void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation* outInfo); 00118 00119 private: 00120 vtkImageGridSource(const vtkImageGridSource&); // Not implemented. 00121 void operator=(const vtkImageGridSource&); // Not implemented. 00122 }; 00123 00124 00125 #endif