VTK  9.2.6
vtkParticleReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkParticleReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
33
34#ifndef vtkParticleReader_h
35#define vtkParticleReader_h
36
37#include "vtkIOGeometryModule.h" // For export macro
39
40#define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
41#define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
42
43class VTKIOGEOMETRY_EXPORT vtkParticleReader : public vtkPolyDataAlgorithm
44{
45public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
57
59
79
81
85 vtkSetMacro(SwapBytes, vtkTypeBool);
87 vtkBooleanMacro(SwapBytes, vtkTypeBool);
89
91
94 vtkSetMacro(HasScalar, vtkTypeBool);
95 vtkGetMacro(HasScalar, vtkTypeBool);
96 vtkBooleanMacro(HasScalar, vtkTypeBool);
98
100
110 vtkGetMacro(FileType, int);
115
117
122 vtkSetClampMacro(DataType, int, VTK_FLOAT, VTK_DOUBLE);
123 vtkGetMacro(DataType, int);
127
128protected:
131
132 void OpenFile();
133
134 char* FileName;
135 istream* File;
136
139
141
154
156
163
175
179 void DoProgressUpdate(size_t& bytesRead, size_t& fileLength);
180
194
204
208 size_t Alliquot;
212 size_t Count;
213
216
217private:
218 vtkParticleReader(const vtkParticleReader&) = delete;
219 void operator=(const vtkParticleReader&) = delete;
220};
221
222#endif
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
void SetDataByteOrder(int)
These methods should be used instead of the SwapBytes methods.
size_t Count
Count of the number of alliquots processed.
size_t Alliquot
Set an alliquot of bytes.
int ProduceOutputFromBinaryFileDouble(vtkInformationVector *outputVector)
This reader assumes that the file is binary and consists of floating point values by default.
int GetDataByteOrder()
These methods should be used instead of the SwapBytes methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
const char * GetDataByteOrderAsString()
These methods should be used instead of the SwapBytes methods.
vtkTypeBool GetSwapBytes()
Set/Get the byte swapping to explicitly swap the bytes of a file.
int ProduceOutputFromTextFileDouble(vtkInformationVector *outputVector)
The format that will be read if the file is a text file is: x, y, z, s (where s is some scalar value ...
void SetFileTypeToText()
Get/Set the file type.
vtkGetFilePathMacro(FileName)
Specify file name.
int FileType
Used to decide which reader should be used.
vtkSetFilePathMacro(FileName)
Specify file name.
int ProduceOutputFromTextFileFloat(vtkInformationVector *outputVector)
The format that will be read if the file is a text file is: x, y, z, s (where s is some scalar value ...
int DetermineFileType()
Determine the type of file based on an analysis of its contents.
FILE_TYPE
Enumerate the supported file types.
void SetDataByteOrderToLittleEndian()
These methods should be used instead of the SwapBytes methods.
void SetDataTypeToDouble()
Get/Set the data type.
void SetFileTypeToBinary()
Get/Set the file type.
void DoProgressUpdate(size_t &bytesRead, size_t &fileLength)
Update of the progress.
void SetDataTypeToFloat()
Get/Set the data type.
~vtkParticleReader() override
virtual void SetDataType(int)
Get/Set the data type.
int DataType
Used to specify the data type.
virtual void SetFileType(int)
Get/Set the file type.
int ProduceOutputFromBinaryFileFloat(vtkInformationVector *outputVector)
This reader assumes that the file is binary and consists of floating point values by default.
void SetFileTypeToUnknown()
Get/Set the file type.
void SetDataByteOrderToBigEndian()
These methods should be used instead of the SwapBytes methods.
static vtkParticleReader * New()
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DOUBLE
Definition vtkType.h:55
#define VTK_FLOAT
Definition vtkType.h:54