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 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 =========================================================================*/ 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() //both cells and points are colored 00093 {this->SetColorMode(VTK_COLOR_MODE_UNIFORM_COLOR);} 00094 void SetColorModeToOff() //No color information is written 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&); // Not implemented. 00142 void operator=(const vtkPLYWriter&); // Not implemented. 00143 }; 00144 00145 #endif 00146