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

vtkParticleReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkParticleReader.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 =========================================================================*/
00042 #ifndef __vtkParticleReader_h
00043 #define __vtkParticleReader_h
00044 
00045 #include "vtkPolyDataSource.h"
00046 
00047 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
00048 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
00049 
00050 class VTK_IO_EXPORT vtkParticleReader : public vtkPolyDataSource
00051 {
00052 public:
00053   static vtkParticleReader *New();
00054   vtkTypeRevisionMacro(vtkParticleReader,vtkPolyDataSource);
00055   void PrintSelf(ostream& os, vtkIndent indent);   
00056 
00058 
00059   vtkSetStringMacro(FileName);
00060   vtkGetStringMacro(FileName);
00062 
00064 
00074   void SetDataByteOrderToBigEndian();
00075   void SetDataByteOrderToLittleEndian();
00076   int GetDataByteOrder();
00077   void SetDataByteOrder(int);
00078   const char *GetDataByteOrderAsString();
00080 
00082 
00083   vtkSetMacro(SwapBytes,int);
00084   int GetSwapBytes() {return this->SwapBytes;}
00085   vtkBooleanMacro(SwapBytes,int);
00087 
00088 protected:
00089   vtkParticleReader();
00090   ~vtkParticleReader();
00091 
00092   void OpenFile();
00093 
00094   char *FileName;
00095   ifstream *File;
00096   int SwapBytes;
00097 
00098   unsigned long NumberOfPoints;
00099   
00100   void ExecuteInformation();
00101   void Execute();
00102 private:
00103   vtkParticleReader(const vtkParticleReader&);  // Not implemented.
00104   void operator=(const vtkParticleReader&);  // Not implemented.
00105 };
00106 
00107 #endif