vtkPLYWriter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00045 #ifndef __vtkPLYWriter_h
00046 #define __vtkPLYWriter_h
00047
00048 #include "vtkPolyDataWriter.h"
00049
00050 class vtkScalarsToColors;
00051 class vtkDataSetAttributes;
00052
00053 #define VTK_LITTLE_ENDIAN 0
00054 #define VTK_BIG_ENDIAN 1
00055
00056 #define VTK_COLOR_MODE_DEFAULT 0
00057 #define VTK_COLOR_MODE_UNIFORM_CELL_COLOR 1
00058 #define VTK_COLOR_MODE_UNIFORM_POINT_COLOR 2
00059 #define VTK_COLOR_MODE_UNIFORM_COLOR 3
00060 #define VTK_COLOR_MODE_OFF 4
00061
00062
00063 class VTK_IO_EXPORT vtkPLYWriter : public vtkPolyDataWriter
00064 {
00065 public:
00066 static vtkPLYWriter *New();
00067 vtkTypeRevisionMacro(vtkPLYWriter,vtkPolyDataWriter);
00068 void PrintSelf(ostream& os, vtkIndent indent);
00069
00071
00073 vtkSetClampMacro(DataByteOrder,int,VTK_LITTLE_ENDIAN,VTK_BIG_ENDIAN);
00074 vtkGetMacro(DataByteOrder,int);
00075 void SetDataByteOrderToBigEndian()
00076 {this->SetDataByteOrder(VTK_BIG_ENDIAN);}
00077 void SetDataByteOrderToLittleEndian()
00078 {this->SetDataByteOrder(VTK_LITTLE_ENDIAN);}
00080
00082
00095 vtkSetMacro(ColorMode,int);
00096 vtkGetMacro(ColorMode,int);
00097 void SetColorModeToDefault()
00098 {this->SetColorMode(VTK_COLOR_MODE_DEFAULT);}
00099 void SetColorModeToUniformCellColor()
00100 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_CELL_COLOR);}
00101 void SetColorModeToUniformPointColor()
00102 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_POINT_COLOR);}
00103 void SetColorModeToUniformColor()
00104 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_COLOR);}
00105 void SetColorModeToOff()
00106 {this->SetColorMode(VTK_COLOR_MODE_OFF);}
00108
00110
00111 vtkSetStringMacro(ArrayName);
00112 vtkGetStringMacro(ArrayName);
00114
00116
00117 vtkSetClampMacro(Component,int,0,VTK_LARGE_INTEGER);
00118 vtkGetMacro(Component,int);
00120
00122
00124 virtual void SetLookupTable(vtkScalarsToColors*);
00125 vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
00127
00129
00133 vtkSetVector3Macro(Color,unsigned char);
00134 vtkGetVector3Macro(Color,unsigned char);
00136
00137 protected:
00138 vtkPLYWriter();
00139 ~vtkPLYWriter();
00140
00141 void WriteData();
00142 unsigned char *GetColors(vtkIdType num, vtkDataSetAttributes *dsa);
00143
00144 int DataByteOrder;
00145 char *ArrayName;
00146 int Component;
00147 int ColorMode;
00148 vtkScalarsToColors *LookupTable;
00149 unsigned char Color[3];
00150
00151 private:
00152 vtkPLYWriter(const vtkPLYWriter&);
00153 void operator=(const vtkPLYWriter&);
00154 };
00155
00156 #endif
00157