Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   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 =========================================================================*/
00035 #ifndef __vtkParticleReader_h
00036 #define __vtkParticleReader_h
00037 
00038 #include "vtkPolyDataSource.h"
00039 
00040 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
00041 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
00042 
00043 class VTK_IO_EXPORT vtkParticleReader : public vtkPolyDataSource
00044 {
00045 public:
00046   static vtkParticleReader *New();
00047   vtkTypeRevisionMacro(vtkParticleReader,vtkPolyDataSource);
00048   void PrintSelf(ostream& os, vtkIndent indent);   
00049 
00051 
00052   vtkSetStringMacro(FileName);
00053   vtkGetStringMacro(FileName);
00055 
00057 
00067   void SetDataByteOrderToBigEndian();
00068   void SetDataByteOrderToLittleEndian();
00069   int GetDataByteOrder();
00070   void SetDataByteOrder(int);
00071   const char *GetDataByteOrderAsString();
00073 
00075 
00076   vtkSetMacro(SwapBytes,int);
00077   int GetSwapBytes() {return this->SwapBytes;}
00078   vtkBooleanMacro(SwapBytes,int);
00080 
00081 protected:
00082   vtkParticleReader();
00083   ~vtkParticleReader();
00084 
00085   void OpenFile();
00086 
00087   char *FileName;
00088   ifstream *File;
00089   int SwapBytes;
00090 
00091   unsigned long NumberOfPoints;
00092   
00093   void ExecuteInformation();
00094   void Execute();
00095 private:
00096   vtkParticleReader(const vtkParticleReader&);  // Not implemented.
00097   void operator=(const vtkParticleReader&);  // Not implemented.
00098 };
00099 
00100 #endif