VTK
9.1.0
IO
AMR
vtkAMRVelodyneReaderInternal.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkAMRVelodyneReaderInternal.hpp
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
=========================================================================*/
25
#ifndef vtkAMRVelodyneReaderInternal_h
26
#define vtkAMRVelodyneReaderInternal_h
27
28
#include <cassert>
29
#include <cstring>
30
#include <map>
31
#include <string>
32
#include <unordered_map>
33
#include <vector>
34
35
#include "
vtkByteSwap.h
"
36
#include "
vtkCellData.h
"
37
#include "
vtkDataArray.h
"
38
#include "
vtkDoubleArray.h
"
39
#include "
vtkIntArray.h
"
40
#include "
vtkObject.h
"
41
#include "vtkSetGet.h"
42
#include "
vtkUniformGrid.h
"
43
44
#define H5_USE_16_API
45
#include "vtk_hdf5.h"
46
//#include "hdf5.h"
47
48
//================================================================================
49
// INTERNAL VELODYNE READER
50
//================================================================================
51
typedef
struct
tagVelodyneSimParameters
52
{
53
double
Time
;
54
int
CycleTime
;
55
}
VelodneSimParameters
;
56
57
typedef
struct
tagBlock
58
{
59
int
Index
;
60
int
dSetLoc
;
61
int
Level
;
62
double
Origin
[3];
63
bool
isFull
;
64
bool
isLeaf
;
65
}
Block
;
66
class
vtkAMRVelodyneReaderInternal
67
{
68
public
:
69
vtkAMRVelodyneReaderInternal
();
70
~vtkAMRVelodyneReaderInternal
();
71
void
SetFileName
(
VTK_FILEPATH
char
* fileName);
72
void
ReadMetaData
();
73
void
GetBlockAttribute
(
const
char
* attribute,
int
blockIdx,
vtkUniformGrid
* pDataSet);
74
75
hid_t
file_id
;
76
std::vector<Block>
Blocks
;
77
std::vector<std::string>
AttributeNames
;
78
std::vector<int>
blockDims
;
79
80
std::vector<int>
blocksPerLevel
;
81
std::vector<double>
globalOrigin
;
82
std::vector<double>
rootDX
;
83
double
dataTime
;
84
int
nBlocks
;
85
int
nLevels
;
86
87
private
:
88
void
Init();
89
void
ReadBlocks();
90
void
AttachScalarToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
91
void
AttachVectorToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
92
void
AttachTensor6ToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
93
void
AttachTensorToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
94
int
ReadLevelsAndX0(hid_t grp_id, std::vector<int>& levels, std::vector<double>& X0);
95
herr_t CloseFile(hid_t& fid);
96
vtkDataArray
* GetTypeAndArray(
const
int
, hid_t&);
97
98
char
* FileName;
99
int
nLeaves;
100
int
nFullLeaves;
101
int
nNodes;
102
std::unordered_map<std::string, int> typeMap;
103
std::unordered_map<std::string, int> arrayMap;
104
};
105
#endif
106
// VTK-HeaderTest-Exclude: vtkAMRVelodyneReaderInternal.h
VelodneSimParameters
struct tagVelodyneSimParameters VelodneSimParameters
tagBlock::Index
int Index
Definition:
vtkAMRFlashReaderInternal.h:79
tagVelodyneSimParameters::CycleTime
int CycleTime
Definition:
vtkAMRVelodyneReaderInternal.h:54
VTK_FILEPATH
#define VTK_FILEPATH
Definition:
vtkWrappingHints.h:46
vtkAMRVelodyneReaderInternal::blocksPerLevel
std::vector< int > blocksPerLevel
Definition:
vtkAMRVelodyneReaderInternal.h:80
vtkAMRVelodyneReaderInternal::file_id
hid_t file_id
Definition:
vtkAMRVelodyneReaderInternal.h:75
tagBlock
Definition:
vtkAMRFlashReaderInternal.h:78
vtkUniformGrid
image data with blanking
Definition:
vtkUniformGrid.h:74
vtkAMRVelodyneReaderInternal
Consists of the low-level Velodyne Reader used by the vtkAMRVelodyneReader.
Definition:
vtkAMRVelodyneReaderInternal.h:67
vtkAMRVelodyneReaderInternal::SetFileName
void SetFileName(VTK_FILEPATH char *fileName)
vtkAMRVelodyneReaderInternal::Blocks
std::vector< Block > Blocks
Definition:
vtkAMRVelodyneReaderInternal.h:76
vtkAMRVelodyneReaderInternal::ReadMetaData
void ReadMetaData()
tagBlock::Origin
double Origin[3]
Definition:
vtkAMRVelodyneReaderInternal.h:62
vtkDataArray
abstract superclass for arrays of numeric data
Definition:
vtkDataArray.h:159
tagVelodyneSimParameters
Definition:
vtkAMRVelodyneReaderInternal.h:52
tagBlock::dSetLoc
int dSetLoc
Definition:
vtkAMRVelodyneReaderInternal.h:60
tagBlock::isLeaf
bool isLeaf
Definition:
vtkAMRVelodyneReaderInternal.h:64
vtkAMRVelodyneReaderInternal::dataTime
double dataTime
Definition:
vtkAMRVelodyneReaderInternal.h:83
vtkByteSwap.h
vtkDoubleArray.h
Block
struct tagBlock Block
vtkObject.h
tagVelodyneSimParameters::Time
double Time
Definition:
vtkAMRVelodyneReaderInternal.h:53
vtkIntArray.h
vtkAMRVelodyneReaderInternal::GetBlockAttribute
void GetBlockAttribute(const char *attribute, int blockIdx, vtkUniformGrid *pDataSet)
vtkDataArray.h
vtkCellData.h
vtkAMRVelodyneReaderInternal::globalOrigin
std::vector< double > globalOrigin
Definition:
vtkAMRVelodyneReaderInternal.h:81
vtkAMRVelodyneReaderInternal::~vtkAMRVelodyneReaderInternal
~vtkAMRVelodyneReaderInternal()
vtkAMRVelodyneReaderInternal::rootDX
std::vector< double > rootDX
Definition:
vtkAMRVelodyneReaderInternal.h:82
tagBlock::isFull
bool isFull
Definition:
vtkAMRVelodyneReaderInternal.h:63
vtkAMRVelodyneReaderInternal::vtkAMRVelodyneReaderInternal
vtkAMRVelodyneReaderInternal()
tagBlock::Level
int Level
Definition:
vtkAMRFlashReaderInternal.h:80
vtkAMRVelodyneReaderInternal::blockDims
std::vector< int > blockDims
Definition:
vtkAMRVelodyneReaderInternal.h:78
vtkAMRVelodyneReaderInternal::nLevels
int nLevels
Definition:
vtkAMRVelodyneReaderInternal.h:85
vtkUniformGrid.h
vtkAMRVelodyneReaderInternal::AttributeNames
std::vector< std::string > AttributeNames
Definition:
vtkAMRVelodyneReaderInternal.h:77
vtkAMRVelodyneReaderInternal::nBlocks
int nBlocks
Definition:
vtkAMRVelodyneReaderInternal.h:84
Generated on Fri Nov 5 2021 00:11:10 for VTK by
1.8.20