00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkPLYWriter_h
00035 #define __vtkPLYWriter_h
00036
00037 #include "vtkPolyDataWriter.h"
00038
00039 class vtkScalarsToColors;
00040 class vtkDataSetAttributes;
00041
00042 #define VTK_LITTLE_ENDIAN 0
00043 #define VTK_BIG_ENDIAN 1
00044
00045 #define VTK_COLOR_MODE_DEFAULT 0
00046 #define VTK_COLOR_MODE_UNIFORM_CELL_COLOR 1
00047 #define VTK_COLOR_MODE_UNIFORM_POINT_COLOR 2
00048 #define VTK_COLOR_MODE_UNIFORM_COLOR 3
00049 #define VTK_COLOR_MODE_OFF 4
00050
00051
00052 class VTK_IO_EXPORT vtkPLYWriter : public vtkPolyDataWriter
00053 {
00054 public:
00055 static vtkPLYWriter *New();
00056 vtkTypeRevisionMacro(vtkPLYWriter,vtkPolyDataWriter);
00057 void PrintSelf(ostream& os, vtkIndent indent);
00058
00060
00062 vtkSetClampMacro(DataByteOrder,int,VTK_LITTLE_ENDIAN,VTK_BIG_ENDIAN);
00063 vtkGetMacro(DataByteOrder,int);
00064 void SetDataByteOrderToBigEndian()
00065 {this->SetDataByteOrder(VTK_BIG_ENDIAN);}
00066 void SetDataByteOrderToLittleEndian()
00067 {this->SetDataByteOrder(VTK_LITTLE_ENDIAN);}
00069
00071
00084 vtkSetMacro(ColorMode,int);
00085 vtkGetMacro(ColorMode,int);
00086 void SetColorModeToDefault()
00087 {this->SetColorMode(VTK_COLOR_MODE_DEFAULT);}
00088 void SetColorModeToUniformCellColor()
00089 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_CELL_COLOR);}
00090 void SetColorModeToUniformPointColor()
00091 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_POINT_COLOR);}
00092 void SetColorModeToUniformColor()
00093 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_COLOR);}
00094 void SetColorModeToOff()
00095 {this->SetColorMode(VTK_COLOR_MODE_OFF);}
00097
00099
00100 vtkSetStringMacro(ArrayName);
00101 vtkGetStringMacro(ArrayName);
00103
00105
00106 vtkSetClampMacro(Component,int,0,VTK_LARGE_INTEGER);
00107 vtkGetMacro(Component,int);
00109
00111
00113 virtual void SetLookupTable(vtkScalarsToColors*);
00114 vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
00116
00118
00122 vtkSetVector3Macro(Color,unsigned char);
00123 vtkGetVector3Macro(Color,unsigned char);
00125
00126 protected:
00127 vtkPLYWriter();
00128 ~vtkPLYWriter();
00129
00130 void WriteData();
00131 unsigned char *GetColors(vtkIdType num, vtkDataSetAttributes *dsa);
00132
00133 int DataByteOrder;
00134 char *ArrayName;
00135 int Component;
00136 int ColorMode;
00137 vtkScalarsToColors *LookupTable;
00138 unsigned char Color[3];
00139
00140 private:
00141 vtkPLYWriter(const vtkPLYWriter&);
00142 void operator=(const vtkPLYWriter&);
00143 };
00144
00145 #endif
00146