VTK: IO/AMR/vtkAMRVelodyneReader.h Source File

| VTK 9.3.1

vtkAMRVelodyneReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkAMRVelodyneReader_h
15 #define vtkAMRVelodyneReader_h
16 #include "vtkAMRBaseReader.h"
17 #include "vtkIOAMRModule.h" // For export macro
18 #include <string> // for std::string
19 #include <unordered_map> // for std::unordered_map
20 #include <vector> // for std::vector
21
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkInformation;
24 class vtkInformationVector;
25 class vtkOverlappingAMR;
26 class vtkAMRVelodyneReaderInternal;
27
28 class VTKIOAMR_EXPORT vtkAMRVelodyneReader : public vtkAMRBaseReader
29 {
30 public:
31 static vtkAMRVelodyneReader* New();
32 vtkTypeMacro(vtkAMRVelodyneReader, vtkAMRBaseReader);
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
35 int GetNumberOfBlocks() override;
36 int GetNumberOfLevels() override;
37 void SetFileName(VTK_FILEPATH const char* fileName) override;
38 vtkOverlappingAMR* GetOutput();
39
40 protected:
41 vtkAMRVelodyneReader();
42 ~vtkAMRVelodyneReader() override;
43
44 int RequestInformation(vtkInformation* rqst, vtkInformationVector** inputVector,
45 vtkInformationVector* outputVector) override;
46
47 int RequestData(vtkInformation* vtkNotUsed(request),
48 vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) override;
49
53 void ReadMetaData() override;
54
58 int GetBlockLevel(int blockIdx) override;
59
63 int FillMetaData() override;
64
68 vtkUniformGrid* GetAMRGrid(int blockIdx) override;
72 void GetAMRGridData(int blockIdx, vtkUniformGrid* block, const char* field) override;
77 void GetAMRGridPointData(int vtkNotUsed(blockIdx), vtkUniformGrid* vtkNotUsed(block),
78 const char* vtkNotUsed(field)) override
79 {
80 }
81
85 void SetUpDataArraySelections() override;
86
87 bool IsReady;
88
89 private:
90 vtkAMRVelodyneReader(const vtkAMRVelodyneReader&) = delete;
91 void operator=(const vtkAMRVelodyneReader&) = delete;
92 vtkAMRVelodyneReaderInternal* Internal;
93 void CalculateSpacing(double* dx, int lvl, double* spacing);
94 void CalculateBlockDims(int* bDims, bool isFull, int* curDims);
95 void MarkFileAsRead(char* fN);
96 bool IsFileRead(char* fN);
97 bool IsFileRead(const char* fN);
98 void UpdateFileName(int index);
99 std::vector<vtkOverlappingAMR*> amrVector;
100 std::vector<double> timeList;
101 std::vector<std::string> fileList;
102 std::unordered_map<std::string, bool> LoadedHash;
103 unsigned int currentIndex;
104 };
105 VTK_ABI_NAMESPACE_END
106 #endif
vtkAMRBaseReader
An abstract class that encapsulates common functionality for all AMR readers.
Definition: vtkAMRBaseReader.h:29
vtkAMRVelodyneReaderInternal
Consists of the low-level Velodyne Reader used by the vtkAMRVelodyneReader.
Definition: vtkAMRVelodyneReaderInternal.h:43
vtkAMRVelodyneReader
A concrete instance of vtkAMRBaseReader that implements functionality for reading Velodyne AMR datase...
Definition: vtkAMRVelodyneReader.h:29
vtkAMRVelodyneReader::GetOutput
vtkOverlappingAMR * GetOutput()
vtkAMRVelodyneReader::RequestInformation
int RequestInformation(vtkInformation *rqst, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Standard Pipeline methods, subclasses may override this method if needed.
vtkAMRVelodyneReader::GetBlockLevel
int GetBlockLevel(int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
vtkAMRVelodyneReader::GetNumberOfLevels
int GetNumberOfLevels() override
Returns the total number of levels.
vtkAMRVelodyneReader::SetUpDataArraySelections
void SetUpDataArraySelections() override
See vtkAMRBaseReader::SetUpDataArraySelections.
vtkAMRVelodyneReader::IsReady
bool IsReady
Definition: vtkAMRVelodyneReader.h:87
vtkAMRVelodyneReader::vtkAMRVelodyneReader
vtkAMRVelodyneReader()
vtkAMRVelodyneReader::GetNumberOfBlocks
int GetNumberOfBlocks() override
Returns the total number of blocks.
vtkAMRVelodyneReader::New
static vtkAMRVelodyneReader * New()
vtkAMRVelodyneReader::ReadMetaData
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
vtkAMRVelodyneReader::~vtkAMRVelodyneReader
~vtkAMRVelodyneReader() override
vtkAMRVelodyneReader::GetAMRGridData
void GetAMRGridData(int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
vtkAMRVelodyneReader::GetAMRGridPointData
void GetAMRGridPointData(int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
Definition: vtkAMRVelodyneReader.h:77
vtkAMRVelodyneReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAMRVelodyneReader::GetAMRGrid
vtkUniformGrid * GetAMRGrid(int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
vtkAMRVelodyneReader::FillMetaData
int FillMetaData() override
See vtkAMRBaseReader::FillMetaData.
vtkAMRVelodyneReader::SetFileName
void SetFileName(VTK_FILEPATH const char *fileName) override
Set/Get the filename.
vtkAMRVelodyneReader::RequestData
int RequestData(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:45
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:39
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:481
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkAMRBaseReader.h
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:34