VTK  9.1.0
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  =========================================================================*/
23 #ifndef vtkAMRVelodyneReader_h
24 #define vtkAMRVelodyneReader_h
25 #include "vtkAMRBaseReader.h"
26 #include "vtkIOAMRModule.h" // For export macro
27 #include <string> // for std::string
28 #include <unordered_map> // for std::unordered_map
29 #include <vector> // for std::vector
30 
31 class vtkInformation;
33 class vtkOverlappingAMR;
35 
36 class VTKIOAMR_EXPORT vtkAMRVelodyneReader : public vtkAMRBaseReader
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  int GetNumberOfBlocks() override;
44  int GetNumberOfLevels() override;
45  void SetFileName(VTK_FILEPATH const char* fileName) override;
47 
48 protected:
51 
53  vtkInformationVector* outputVector) override;
54 
55  int RequestData(vtkInformation* vtkNotUsed(request),
56  vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) override;
57 
61  void ReadMetaData() override;
62 
66  int GetBlockLevel(const int blockIdx) override;
67 
71  int FillMetaData() override;
72 
76  vtkUniformGrid* GetAMRGrid(const int blockIdx) override;
80  void GetAMRGridData(const int blockIdx, vtkUniformGrid* block, const char* field) override;
85  void GetAMRGridPointData(const int vtkNotUsed(blockIdx), vtkUniformGrid* vtkNotUsed(block),
86  const char* vtkNotUsed(field)) override
87  {
88  ;
89  }
90 
94  void SetUpDataArraySelections() override;
95 
96  bool IsReady;
97 
98 private:
100  void operator=(const vtkAMRVelodyneReader&) = delete;
102  void CalculateSpacing(double* dx, int lvl, double* spacing);
103  void CalculateBlockDims(int* bDims, bool isFull, int* curDims);
104  void MarkFileAsRead(char* fN);
105  bool IsFileRead(char* fN);
106  bool IsFileRead(const char* fN);
107  void UpdateFileName(int index);
108  std::vector<vtkOverlappingAMR*> amrVector;
109  std::vector<double> timeList;
110  std::vector<std::string> fileList;
111  std::unordered_map<std::string, bool> LoadedHash;
112  unsigned int currentIndex;
113 };
114 #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:34
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