Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/IO/vtkPLYWriter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPLYWriter.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00038 #ifndef __vtkPLYWriter_h 00039 #define __vtkPLYWriter_h 00040 00041 #include "vtkPolyDataWriter.h" 00042 00043 class vtkScalarsToColors; 00044 class vtkDataSetAttributes; 00045 00046 #define VTK_LITTLE_ENDIAN 0 00047 #define VTK_BIG_ENDIAN 1 00048 00049 #define VTK_COLOR_MODE_DEFAULT 0 00050 #define VTK_COLOR_MODE_UNIFORM_CELL_COLOR 1 00051 #define VTK_COLOR_MODE_UNIFORM_POINT_COLOR 2 00052 #define VTK_COLOR_MODE_UNIFORM_COLOR 3 00053 #define VTK_COLOR_MODE_OFF 4 00054 00055 00056 class VTK_IO_EXPORT vtkPLYWriter : public vtkPolyDataWriter 00057 { 00058 public: 00059 static vtkPLYWriter *New(); 00060 vtkTypeRevisionMacro(vtkPLYWriter,vtkPolyDataWriter); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00064 00066 vtkSetClampMacro(DataByteOrder,int,VTK_LITTLE_ENDIAN,VTK_BIG_ENDIAN); 00067 vtkGetMacro(DataByteOrder,int); 00068 void SetDataByteOrderToBigEndian() 00069 {this->SetDataByteOrder(VTK_BIG_ENDIAN);} 00070 void SetDataByteOrderToLittleEndian() 00071 {this->SetDataByteOrder(VTK_LITTLE_ENDIAN);} 00073 00075 00088 vtkSetMacro(ColorMode,int); 00089 vtkGetMacro(ColorMode,int); 00090 void SetColorModeToDefault() 00091 {this->SetColorMode(VTK_COLOR_MODE_DEFAULT);} 00092 void SetColorModeToUniformCellColor() 00093 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_CELL_COLOR);} 00094 void SetColorModeToUniformPointColor() 00095 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_POINT_COLOR);} 00096 void SetColorModeToUniformColor() //both cells and points are colored 00097 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_COLOR);} 00098 void SetColorModeToOff() //No color information is written 00099 {this->SetColorMode(VTK_COLOR_MODE_OFF);} 00101 00103 00104 vtkSetStringMacro(ArrayName); 00105 vtkGetStringMacro(ArrayName); 00107 00109 00110 vtkSetClampMacro(Component,int,0,VTK_LARGE_INTEGER); 00111 vtkGetMacro(Component,int); 00113 00115 00117 virtual void SetLookupTable(vtkScalarsToColors*); 00118 vtkGetObjectMacro(LookupTable,vtkScalarsToColors); 00120 00122 00126 vtkSetVector3Macro(Color,unsigned char); 00127 vtkGetVector3Macro(Color,unsigned char); 00129 00130 protected: 00131 vtkPLYWriter(); 00132 ~vtkPLYWriter(); 00133 00134 void WriteData(); 00135 unsigned char *GetColors(vtkIdType num, vtkDataSetAttributes *dsa); 00136 00137 int DataByteOrder; 00138 char *ArrayName; 00139 int Component; 00140 int ColorMode; 00141 vtkScalarsToColors *LookupTable; 00142 unsigned char Color[3]; 00143 00144 private: 00145 vtkPLYWriter(const vtkPLYWriter&); // Not implemented. 00146 void operator=(const vtkPLYWriter&); // Not implemented. 00147 }; 00148 00149 #endif 00150