Htg writer
This MR introduces the new .htg
format (XML format for vtkHyperTreeGrid
) at version 2.0
.
In previous versions (0.0
and 1.0
), there were one XML element created by tree in the file. This design was good enough for htgs with a few deep trees, but unusable on htgs with millions of not very deep trees. The latter case can occur when the data set looks like an image data with a few areas with slight higher resolution.
This new format still stores data per tree, but the former tree XML element splitting is now implicit. One can fetch any tree by looking at some new meta data added in this format in the XML element <Trees>
, giving information on the depth of each tree, the size at each level, the tree ids, or the binary descriptor. One can also still load an htg while limiting the maximum depth, making it possible to load the low resolution part of huge data sets on low-end computers.
There are a few miscellaneous fixes in this MR. Bit arrays were not fully compatible with XML readers. In particular, it was not possible to read a bit array given an input segment of indices. This was due to the fact that a word size is in bits rather than bytes in such arrays. There was also an error in the recently added setting of unused bits in those arrays, that are fixed.
vtkHyperTree
also have new methods that can be used to build a tree given a binary breadth first order descriptor, or get the same binary descriptor on an already constructed tree. Those methods already existed, but they are now better named and better designed: they work with and produce the minimal needed data for such operations. Indeed, they used to produce the mask as well as the descriptor and the id map, although the new mask can be inferred using this id map.
Warning: the descriptor has no data for the last depth, as its layout can be inferred (all vertices are leaves). So its indexing inside the file is slightly different. This should be worrisome for someone who wants to write a new reader on this file format.
Fixes #17984 (closed)