VTK  9.2.5
vtkAMRVelodyneReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRVelodyneReader.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  =========================================================================*/
26 #ifndef vtkAMRVelodyneReader_h
27 #define vtkAMRVelodyneReader_h
28 #include "vtkAMRBaseReader.h"
29 #include "vtkIOAMRModule.h" // For export macro
30 #include <string> // for std::string
31 #include <unordered_map> // for std::unordered_map
32 #include <vector> // for std::vector
33 
34 class vtkInformation;
36 class vtkOverlappingAMR;
38 
39 class VTKIOAMR_EXPORT vtkAMRVelodyneReader : public vtkAMRBaseReader
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  int GetNumberOfBlocks() override;
47  int GetNumberOfLevels() override;
48  void SetFileName(VTK_FILEPATH const char* fileName) override;
50 
51 protected:
54 
56  vtkInformationVector* outputVector) override;
57 
58  int RequestData(vtkInformation* vtkNotUsed(request),
59  vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) override;
60 
64  void ReadMetaData() override;
65 
69  int GetBlockLevel(const int blockIdx) override;
70 
74  int FillMetaData() override;
75 
79  vtkUniformGrid* GetAMRGrid(const int blockIdx) override;
83  void GetAMRGridData(const int blockIdx, vtkUniformGrid* block, const char* field) override;
88  void GetAMRGridPointData(const int vtkNotUsed(blockIdx), vtkUniformGrid* vtkNotUsed(block),
89  const char* vtkNotUsed(field)) override
90  {
91  ;
92  }
93 
97  void SetUpDataArraySelections() override;
98 
99  bool IsReady;
100 
101 private:
103  void operator=(const vtkAMRVelodyneReader&) = delete;
105  void CalculateSpacing(double* dx, int lvl, double* spacing);
106  void CalculateBlockDims(int* bDims, bool isFull, int* curDims);
107  void MarkFileAsRead(char* fN);
108  bool IsFileRead(char* fN);
109  bool IsFileRead(const char* fN);
110  void UpdateFileName(int index);
111  std::vector<vtkOverlappingAMR*> amrVector;
112  std::vector<double> timeList;
113  std::vector<std::string> fileList;
114  std::unordered_map<std::string, bool> LoadedHash;
115  unsigned int currentIndex;
116 };
117 #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...
vtkOverlappingAMR * GetOutput()
int RequestInformation(vtkInformation *rqst, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Standard Pipeline methods, subclasses may override this method if needed.
int GetNumberOfLevels() override
Returns the total number of levels.
void SetUpDataArraySelections() override
See vtkAMRBaseReader::SetUpDataArraySelections.
vtkUniformGrid * GetAMRGrid(const int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
void GetAMRGridData(const int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
int GetNumberOfBlocks() override
Returns the total number of blocks.
static vtkAMRVelodyneReader * New()
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
~vtkAMRVelodyneReader() override
int GetBlockLevel(const int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
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 GetAMRGridPointData(const int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
void SetFileName(VTK_FILEPATH const char *fileName) override
Set/Get the filename.
int RequestData(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) override
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
image data with blanking
@ field
Definition: vtkX3D.h:183
@ spacing
Definition: vtkX3D.h:487
@ index
Definition: vtkX3D.h:252
#define VTK_FILEPATH