VTK
9.2.6
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
=========================================================================*/
24
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
52
class
vtkAMRVelodyneReaderInternal
53
{
54
public
:
55
typedef
struct
tagVelodyneBlock
56
{
57
int
Index
;
58
int
dSetLoc
;
59
int
Level
;
60
double
Origin
[3];
61
bool
isFull
;
62
bool
isLeaf
;
63
}
Block
;
64
65
vtkAMRVelodyneReaderInternal
();
66
~vtkAMRVelodyneReaderInternal
();
67
void
SetFileName
(
VTK_FILEPATH
VTK_FUTURE_CONST
char
* fileName);
68
void
ReadMetaData
();
69
void
GetBlockAttribute
(
const
char
* attribute,
int
blockIdx,
vtkUniformGrid
* pDataSet);
70
71
hid_t
file_id
;
72
std::vector<Block>
Blocks
;
73
std::vector<std::string>
AttributeNames
;
74
std::vector<int>
blockDims
;
75
76
std::vector<int>
blocksPerLevel
;
77
std::vector<double>
globalOrigin
;
78
std::vector<double>
rootDX
;
79
double
dataTime
;
80
int
nBlocks
;
81
int
nLevels
;
82
83
private
:
84
void
Init();
85
void
ReadBlocks();
86
void
AttachScalarToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
87
void
AttachVectorToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
88
void
AttachTensor6ToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
89
void
AttachTensorToGrid(
int
,
const
char
*,
int
,
vtkUniformGrid
*);
90
int
ReadLevelsAndX0(hid_t grp_id, std::vector<int>& levels, std::vector<double>& X0);
91
herr_t CloseFile(hid_t& fid);
92
vtkDataArray
* GetTypeAndArray(
const
int
, hid_t&);
93
94
std::string FileName;
95
int
nLeaves;
96
int
nFullLeaves;
97
int
nNodes;
98
std::unordered_map<std::string, int> typeMap;
99
std::unordered_map<std::string, int> arrayMap;
100
};
101
#endif
102
// VTK-HeaderTest-Exclude: vtkAMRVelodyneReaderInternal.h
vtkAMRVelodyneReaderInternal::ReadMetaData
void ReadMetaData()
vtkAMRVelodyneReaderInternal::GetBlockAttribute
void GetBlockAttribute(const char *attribute, int blockIdx, vtkUniformGrid *pDataSet)
vtkAMRVelodyneReaderInternal::nBlocks
int nBlocks
Definition
vtkAMRVelodyneReaderInternal.h:80
vtkAMRVelodyneReaderInternal::file_id
hid_t file_id
Definition
vtkAMRVelodyneReaderInternal.h:71
vtkAMRVelodyneReaderInternal::Blocks
std::vector< Block > Blocks
Definition
vtkAMRVelodyneReaderInternal.h:72
vtkAMRVelodyneReaderInternal::dataTime
double dataTime
Definition
vtkAMRVelodyneReaderInternal.h:79
vtkAMRVelodyneReaderInternal::SetFileName
void SetFileName(VTK_FILEPATH VTK_FUTURE_CONST char *fileName)
vtkAMRVelodyneReaderInternal::~vtkAMRVelodyneReaderInternal
~vtkAMRVelodyneReaderInternal()
vtkAMRVelodyneReaderInternal::AttributeNames
std::vector< std::string > AttributeNames
Definition
vtkAMRVelodyneReaderInternal.h:73
vtkAMRVelodyneReaderInternal::vtkAMRVelodyneReaderInternal
vtkAMRVelodyneReaderInternal()
vtkAMRVelodyneReaderInternal::rootDX
std::vector< double > rootDX
Definition
vtkAMRVelodyneReaderInternal.h:78
vtkAMRVelodyneReaderInternal::blocksPerLevel
std::vector< int > blocksPerLevel
Definition
vtkAMRVelodyneReaderInternal.h:76
vtkAMRVelodyneReaderInternal::globalOrigin
std::vector< double > globalOrigin
Definition
vtkAMRVelodyneReaderInternal.h:77
vtkAMRVelodyneReaderInternal::blockDims
std::vector< int > blockDims
Definition
vtkAMRVelodyneReaderInternal.h:74
vtkAMRVelodyneReaderInternal::nLevels
int nLevels
Definition
vtkAMRVelodyneReaderInternal.h:81
vtkAMRVelodyneReaderInternal::Block
struct vtkAMRVelodyneReaderInternal::tagVelodyneBlock Block
vtkUniformGrid
image data with blanking
Definition
vtkUniformGrid.h:41
vtkAMRVelodyneReaderInternal::tagVelodyneBlock
Definition
vtkAMRVelodyneReaderInternal.h:56
vtkAMRVelodyneReaderInternal::tagVelodyneBlock::Index
int Index
Definition
vtkAMRVelodyneReaderInternal.h:57
vtkAMRVelodyneReaderInternal::tagVelodyneBlock::isFull
bool isFull
Definition
vtkAMRVelodyneReaderInternal.h:61
vtkAMRVelodyneReaderInternal::tagVelodyneBlock::dSetLoc
int dSetLoc
Definition
vtkAMRVelodyneReaderInternal.h:58
vtkAMRVelodyneReaderInternal::tagVelodyneBlock::Origin
double Origin[3]
Definition
vtkAMRVelodyneReaderInternal.h:60
vtkAMRVelodyneReaderInternal::tagVelodyneBlock::isLeaf
bool isLeaf
Definition
vtkAMRVelodyneReaderInternal.h:62
vtkAMRVelodyneReaderInternal::tagVelodyneBlock::Level
int Level
Definition
vtkAMRVelodyneReaderInternal.h:59
vtkByteSwap.h
vtkCellData.h
vtkDataArray
#define vtkDataArray
Definition
vtkCharArray.h:49
vtkDataArray.h
vtkDoubleArray.h
vtkIntArray.h
vtkObject.h
vtkUniformGrid.h
VTK_FILEPATH
#define VTK_FILEPATH
Definition
vtkWrappingHints.h:46
Generated on Tue Jan 28 2025 00:00:00 for VTK by
1.13.2