|
VTK
9.6.20260210
|
Implementation for the vtkHDFReader. More...
#include <vtkHDFReaderImplementation.h>
Public Member Functions | |
| Implementation (vtkHDFReader *reader) | |
| virtual | ~Implementation () |
| bool | Open (const char *fileName) |
| Opens this VTK HDF file and checks if it is valid. | |
| bool | Open (vtkResourceStream *stream) |
| Opens this VTK HDF stream and checks if it is valid. | |
| void | Close () |
| Closes the VTK HDF file and releases any allocated resources. | |
| int | GetDataSetType () |
| Type of vtkDataSet stored by the HDF file, such as VTK_IMAGE_DATA or VTK_UNSTRUCTURED_GRID, from vtkTypes.h. | |
| vtkHDFReader * | GetReader () |
| Return the reader this impl is associated to. | |
| const std::array< int, 2 > & | GetVersion () |
| Returns the version of the VTK HDF implementation. | |
| template<typename T> | |
| bool | GetAttribute (const char *attributeName, size_t numberOfElements, T *value) |
| Reads an attribute from the /VTKHDF group. | |
| bool | HasAttribute (const char *groupName, const char *attributeName) |
| Return true if the attribute exists in the specified group. | |
| bool | HasDataset (const char *datasetName) |
| Return true if the dataset exists in the specified group root group. | |
| int | GetNumberOfPieces (vtkIdType step=-1) |
Returns the number of partitions for this dataset at the time step step if applicable. | |
| bool | GetPartitionExtent (hsize_t partitionIndex, int *extent) |
| For an ImageData, sets the extent for 'partitionIndex'. | |
| std::vector< std::string > | GetArrayNames (int attributeType) |
| Returns the names of arrays for 'attributeType' (point or cell). | |
| std::vector< std::string > | GetOrderedChildrenOfGroup (const std::string &path) |
| Return the name of all children of an HDF group given its path. | |
| std::vector< hsize_t > | GetDimensions (const char *dataset) |
| Returns the dimensions of a HDF dataset. | |
| bool | IsPathSoftLink (const std::string &path) |
| Return true if current root path is a soft link. | |
| std::size_t | GetNumberOfSteps () |
| Read the number of steps from the opened file. | |
| vtkIdType | GetArrayOffset (vtkIdType step, int attributeType, std::string name) |
| Methods to query for array offsets when steps are present. | |
| std::array< vtkIdType, 2 > | GetFieldArraySize (vtkIdType step, std::string name) |
| Return the field array size (components, tuples) for the current step. | |
| bool | OpenGroupAsVTKGroup (const std::string &groupPath) |
| Open a sub group of the current file and consider it as the new root file. | |
| bool | RetrieveHDFInformation (const std::string &rootName, const std::string &groupPrefix="") |
| Initialize meta information of the implementation based on root name specified. | |
| bool | GetImageAttributes (int WholeExtent[6], double Origin[3], double Spacing[3]) |
| Retrieve ImageData attributes and store them. | |
| vtkSmartPointer< vtkDataObject > | GetNewDataSet (int dataSetType, int numPieces) |
| Create a new dataset given its type and the number of pieces. | |
| bool | ReadHyperTreeGridData (vtkHyperTreeGrid *htg, const vtkDataArraySelection *arraySelection, vtkIdType cellOffset, vtkIdType treeIdsOffset, vtkIdType depthOffset, vtkIdType descriptorOffset, vtkIdType maskOffset, vtkIdType partOffset, vtkIdType verticesPerDepthOffset, vtkIdType depthLimit, vtkIdType step) |
| Read data and build the HyperTreeGrid from descriptors, mask information and cell data array in the file, reading from the offsets specified as arguments. | |
| bool | ReadHyperTreeGridMetaInfo (vtkHyperTreeGrid *htg) |
| Read HTG meta-information stored in attributes. | |
| bool | ReadHyperTreeGridDimensions (vtkHyperTreeGrid *htg) |
| Read HTG dimensions and coordinates. | |
| bool | CreateHyperTreeGridCellArrays (vtkHyperTreeGrid *htg, std::vector< vtkSmartPointer< vtkAbstractArray > > &cellArrays, const vtkDataArraySelection *arraySelection, vtkIdType cellCount) |
| Initialize selected Cell arrays for HyperTreeGrid. | |
| bool | AppendCellDataForHyperTree (std::vector< vtkSmartPointer< vtkAbstractArray > > &cellArrays, vtkIdType cellOffset, vtkIdType inputCellOffset, vtkIdType step, vtkIdType readableTreeSize) |
| Read & add cell data for the tree currently processed. | |
| bool | AppendMaskForHyperTree (vtkHyperTreeGrid *htg, vtkIdType inputCellOffset, vtkIdType maskOffset, vtkIdType readableTreeSize) |
| Read & add mask data for the current tree. | |
| vtkDataArray * | NewArray (int attributeType, const char *name, const std::vector< hsize_t > &fileExtent) |
| Reads and returns a new vtkDataArray. | |
| vtkDataArray * | NewArray (int attributeType, const char *name, hsize_t offset, hsize_t size) |
| Reads and returns a new vtkDataArray. | |
| vtkAbstractArray * | NewFieldArray (const char *name, vtkIdType offset=-1, vtkIdType size=-1, vtkIdType dimMaxSize=-1) |
| Reads and returns a new vtkDataArray. | |
| vtkDataArray * | NewMetadataArray (const char *name, hsize_t offset, hsize_t size) |
| Reads a 1D metadata array in a DataArray or a vector of vtkIdType. | |
| std::vector< vtkIdType > | GetMetadata (const char *name, hsize_t size, hsize_t offset=0) |
| Reads a 1D metadata array in a DataArray or a vector of vtkIdType. | |
| bool | FillAssembly (vtkDataAssembly *data) |
| Fills the given Assembly with the content of the opened HDF file. | |
| bool | FillAssembly (vtkDataAssembly *data, hid_t assemblyHandle, int assemblyID, std::string path) |
| Fills the given Assembly with the content of the opened HDF file. | |
| vtkDataArray * | GetStepValues () |
| Read the values of the steps from the open file. | |
| vtkDataArray * | GetStepValues (hid_t group) |
| Read the values of the steps from the open file. | |
| unsigned int | GetAMRNumberOfLevels () |
| Specific public API for AMR support. | |
| bool | ComputeAMRBlocksPerLevels (unsigned int nLevels) |
| Retrieve for each required level AMRBlocks size and position. | |
| bool | ComputeAMROffsetsPerLevels (vtkDataArraySelection *dataArraySelection[3], vtkIdType step, unsigned int nLevels) |
| Retrieve offset for AMRBox, point/cell/field arrays for each level. | |
| bool | ReadAMRTopology (vtkOverlappingAMR *data, double origin[3], bool isTemporalData) |
| Read the AMR topology based on offset data on AMRBlocks. | |
| bool | GetAMRTemporalOffsetForAttributeType (unsigned int level, int attributeType, const std::string &name, hsize_t &offset) |
| Get the temporal offset for a specific attribute Return true if the offset arg was set, false is it was not for any reason. | |
Implementation for the vtkHDFReader.
Opens, closes and reads information from a VTK HDF file.
Definition at line 34 of file vtkHDFReaderImplementation.h.
| vtkHDFReader::Implementation::Implementation | ( | vtkHDFReader * | reader | ) |
|
virtual |
| bool vtkHDFReader::Implementation::Open | ( | const char * | fileName | ) |
Opens this VTK HDF file and checks if it is valid.
| bool vtkHDFReader::Implementation::Open | ( | vtkResourceStream * | stream | ) |
Opens this VTK HDF stream and checks if it is valid.
| void vtkHDFReader::Implementation::Close | ( | ) |
Closes the VTK HDF file and releases any allocated resources.
|
inline |
Type of vtkDataSet stored by the HDF file, such as VTK_IMAGE_DATA or VTK_UNSTRUCTURED_GRID, from vtkTypes.h.
Definition at line 58 of file vtkHDFReaderImplementation.h.
|
inline |
Return the reader this impl is associated to.
Definition at line 62 of file vtkHDFReaderImplementation.h.
|
inline |
Returns the version of the VTK HDF implementation.
Definition at line 66 of file vtkHDFReaderImplementation.h.
| bool vtkHDFReader::Implementation::GetAttribute | ( | const char * | attributeName, |
| size_t | numberOfElements, | ||
| T * | value ) |
Reads an attribute from the /VTKHDF group.
| bool vtkHDFReader::Implementation::HasAttribute | ( | const char * | groupName, |
| const char * | attributeName ) |
Return true if the attribute exists in the specified group.
| bool vtkHDFReader::Implementation::HasDataset | ( | const char * | datasetName | ) |
Return true if the dataset exists in the specified group root group.
| int vtkHDFReader::Implementation::GetNumberOfPieces | ( | vtkIdType | step = -1 | ) |
Returns the number of partitions for this dataset at the time step step if applicable.
| bool vtkHDFReader::Implementation::GetPartitionExtent | ( | hsize_t | partitionIndex, |
| int * | extent ) |
For an ImageData, sets the extent for 'partitionIndex'.
Returns true for success and false otherwise.
| std::vector< std::string > vtkHDFReader::Implementation::GetArrayNames | ( | int | attributeType | ) |
Returns the names of arrays for 'attributeType' (point or cell).
| std::vector< std::string > vtkHDFReader::Implementation::GetOrderedChildrenOfGroup | ( | const std::string & | path | ) |
Return the name of all children of an HDF group given its path.
| vtkDataArray * vtkHDFReader::Implementation::NewArray | ( | int | attributeType, |
| const char * | name, | ||
| const std::vector< hsize_t > & | fileExtent ) |
Reads and returns a new vtkDataArray.
The actual type of the array depends on the type of the HDF array. The array is read from the PointData or CellData groups depending on the 'attributeType' parameter. There are two versions: a first one that reads from a 3D array using a fileExtent, and a second one that reads from a linear array using an offset and size. The array has to be deleted by the user.
| vtkDataArray * vtkHDFReader::Implementation::NewArray | ( | int | attributeType, |
| const char * | name, | ||
| hsize_t | offset, | ||
| hsize_t | size ) |
Reads and returns a new vtkDataArray.
The actual type of the array depends on the type of the HDF array. The array is read from the PointData or CellData groups depending on the 'attributeType' parameter. There are two versions: a first one that reads from a 3D array using a fileExtent, and a second one that reads from a linear array using an offset and size. The array has to be deleted by the user.
| vtkAbstractArray * vtkHDFReader::Implementation::NewFieldArray | ( | const char * | name, |
| vtkIdType | offset = -1, | ||
| vtkIdType | size = -1, | ||
| vtkIdType | dimMaxSize = -1 ) |
Reads and returns a new vtkDataArray.
The actual type of the array depends on the type of the HDF array. The array is read from the PointData or CellData groups depending on the 'attributeType' parameter. There are two versions: a first one that reads from a 3D array using a fileExtent, and a second one that reads from a linear array using an offset and size. The array has to be deleted by the user.
| vtkDataArray * vtkHDFReader::Implementation::NewMetadataArray | ( | const char * | name, |
| hsize_t | offset, | ||
| hsize_t | size ) |
Reads a 1D metadata array in a DataArray or a vector of vtkIdType.
We read either the whole array for the vector version or a slice specified with (offset, size). For an error we return nullptr or an empty vector.
| std::vector< vtkIdType > vtkHDFReader::Implementation::GetMetadata | ( | const char * | name, |
| hsize_t | size, | ||
| hsize_t | offset = 0 ) |
Reads a 1D metadata array in a DataArray or a vector of vtkIdType.
We read either the whole array for the vector version or a slice specified with (offset, size). For an error we return nullptr or an empty vector.
| std::vector< hsize_t > vtkHDFReader::Implementation::GetDimensions | ( | const char * | dataset | ) |
Returns the dimensions of a HDF dataset.
| bool vtkHDFReader::Implementation::IsPathSoftLink | ( | const std::string & | path | ) |
Return true if current root path is a soft link.
| bool vtkHDFReader::Implementation::FillAssembly | ( | vtkDataAssembly * | data | ) |
Fills the given Assembly with the content of the opened HDF file.
Return true on success, false if the HDF File isn't a composite or the 'Assembly' is missing.
| bool vtkHDFReader::Implementation::FillAssembly | ( | vtkDataAssembly * | data, |
| hid_t | assemblyHandle, | ||
| int | assemblyID, | ||
| std::string | path ) |
Fills the given Assembly with the content of the opened HDF file.
Return true on success, false if the HDF File isn't a composite or the 'Assembly' is missing.
| std::size_t vtkHDFReader::Implementation::GetNumberOfSteps | ( | ) |
Read the number of steps from the opened file.
| vtkDataArray * vtkHDFReader::Implementation::GetStepValues | ( | ) |
Read the values of the steps from the open file.
| vtkDataArray * vtkHDFReader::Implementation::GetStepValues | ( | hid_t | group | ) |
Read the values of the steps from the open file.
| vtkIdType vtkHDFReader::Implementation::GetArrayOffset | ( | vtkIdType | step, |
| int | attributeType, | ||
| std::string | name ) |
Methods to query for array offsets when steps are present.
| std::array< vtkIdType, 2 > vtkHDFReader::Implementation::GetFieldArraySize | ( | vtkIdType | step, |
| std::string | name ) |
Return the field array size (components, tuples) for the current step.
By default it returns {-1,1} which means to have as many components as necessary and one tuple per step.
| bool vtkHDFReader::Implementation::OpenGroupAsVTKGroup | ( | const std::string & | groupPath | ) |
Open a sub group of the current file and consider it as the new root file.
| bool vtkHDFReader::Implementation::RetrieveHDFInformation | ( | const std::string & | rootName, |
| const std::string & | groupPrefix = "" ) |
Initialize meta information of the implementation based on root name specified.
| bool vtkHDFReader::Implementation::GetImageAttributes | ( | int | WholeExtent[6], |
| double | Origin[3], | ||
| double | Spacing[3] ) |
Retrieve ImageData attributes and store them.
Return false on failure.
| unsigned int vtkHDFReader::Implementation::GetAMRNumberOfLevels | ( | ) |
Specific public API for AMR support.
Return the number of level in an AMR file
| bool vtkHDFReader::Implementation::ComputeAMRBlocksPerLevels | ( | unsigned int | nLevels | ) |
Retrieve for each required level AMRBlocks size and position.
Set maxLevel to the number of level in the file Return true in case of success, false otherwise.
| bool vtkHDFReader::Implementation::ComputeAMROffsetsPerLevels | ( | vtkDataArraySelection * | dataArraySelection[3], |
| vtkIdType | step, | ||
| unsigned int | nLevels ) |
Retrieve offset for AMRBox, point/cell/field arrays for each level.
Set maxLevel to the number of level in the file Return true in case of success, false otherwise.
| bool vtkHDFReader::Implementation::ReadAMRTopology | ( | vtkOverlappingAMR * | data, |
| double | origin[3], | ||
| bool | isTemporalData ) |
Read the AMR topology based on offset data on AMRBlocks.
| bool vtkHDFReader::Implementation::GetAMRTemporalOffsetForAttributeType | ( | unsigned int | level, |
| int | attributeType, | ||
| const std::string & | name, | ||
| hsize_t & | offset ) |
Get the temporal offset for a specific attribute Return true if the offset arg was set, false is it was not for any reason.
| vtkSmartPointer< vtkDataObject > vtkHDFReader::Implementation::GetNewDataSet | ( | int | dataSetType, |
| int | numPieces ) |
Create a new dataset given its type and the number of pieces.
Create a vtkPartitionedDataSet when the number of pieces is more than 1.
| bool vtkHDFReader::Implementation::ReadHyperTreeGridData | ( | vtkHyperTreeGrid * | htg, |
| const vtkDataArraySelection * | arraySelection, | ||
| vtkIdType | cellOffset, | ||
| vtkIdType | treeIdsOffset, | ||
| vtkIdType | depthOffset, | ||
| vtkIdType | descriptorOffset, | ||
| vtkIdType | maskOffset, | ||
| vtkIdType | partOffset, | ||
| vtkIdType | verticesPerDepthOffset, | ||
| vtkIdType | depthLimit, | ||
| vtkIdType | step ) |
Read data and build the HyperTreeGrid from descriptors, mask information and cell data array in the file, reading from the offsets specified as arguments.
Return false on failure.
| bool vtkHDFReader::Implementation::ReadHyperTreeGridMetaInfo | ( | vtkHyperTreeGrid * | htg | ) |
Read HTG meta-information stored in attributes.
| bool vtkHDFReader::Implementation::ReadHyperTreeGridDimensions | ( | vtkHyperTreeGrid * | htg | ) |
Read HTG dimensions and coordinates.
| bool vtkHDFReader::Implementation::CreateHyperTreeGridCellArrays | ( | vtkHyperTreeGrid * | htg, |
| std::vector< vtkSmartPointer< vtkAbstractArray > > & | cellArrays, | ||
| const vtkDataArraySelection * | arraySelection, | ||
| vtkIdType | cellCount ) |
Initialize selected Cell arrays for HyperTreeGrid.
| bool vtkHDFReader::Implementation::AppendCellDataForHyperTree | ( | std::vector< vtkSmartPointer< vtkAbstractArray > > & | cellArrays, |
| vtkIdType | cellOffset, | ||
| vtkIdType | inputCellOffset, | ||
| vtkIdType | step, | ||
| vtkIdType | readableTreeSize ) |
Read & add cell data for the tree currently processed.
| bool vtkHDFReader::Implementation::AppendMaskForHyperTree | ( | vtkHyperTreeGrid * | htg, |
| vtkIdType | inputCellOffset, | ||
| vtkIdType | maskOffset, | ||
| vtkIdType | readableTreeSize ) |
Read & add mask data for the current tree.