VTK  9.4.20241221
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
22VTK_ABI_NAMESPACE_BEGIN
23class vtkInformation;
27
28class VTKIOAMR_EXPORT vtkAMRVelodyneReader : public vtkAMRBaseReader
29{
30public:
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;
39
40protected:
43
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
89private:
91 void operator=(const vtkAMRVelodyneReader&) = delete;
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};
105VTK_ABI_NAMESPACE_END
106#endif
An abstract class that encapsulates common functionality for all AMR readers.
Consists of the low-level Velodyne Reader used by the vtkAMRVelodyneReader.
A concrete instance of vtkAMRBaseReader that implements functionality for reading Velodyne AMR datase...
int RequestInformation(vtkInformation *rqst, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Standard Pipeline methods, subclasses may override this method if needed.
int GetBlockLevel(int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
int GetNumberOfLevels() override
Returns the total number of levels.
void SetUpDataArraySelections() override
See vtkAMRBaseReader::SetUpDataArraySelections.
int GetNumberOfBlocks() override
Returns the total number of blocks.
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
~vtkAMRVelodyneReader() override
void GetAMRGridData(int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
void GetAMRGridPointData(int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
vtkOverlappingAMR * GetOutput()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillMetaData() override
See vtkAMRBaseReader::FillMetaData.
void SetFileName(VTK_FILEPATH const char *fileName) override
Set/Get the filename.
int RequestData(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) override
static vtkAMRVelodyneReader * New()
vtkUniformGrid * GetAMRGrid(int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
image data with blanking
#define VTK_FILEPATH