VoxelBlur
Depth-of-field volume rendering
|
Class for loading volume meta data (VolumeMetaData) as well as the raw volume data itself. More...
#include <volumeloader.h>
Public Member Functions | |
VolumeLoader (QObject *parent=nullptr) | |
bool | getMetadata (const QFile &metadataFile, VolumeMetaData &metadata) const |
Reads the metadata of a file. More... | |
QByteArray | readVolume (const VolumeMetaData &d) const |
Reads the volume represented by this metadata. More... | |
Private Member Functions | |
bool | readGZippedVolume (QFile &src, QByteArray &dest) const |
Class for loading volume meta data (VolumeMetaData) as well as the raw volume data itself.
This uses a simple custom format for metadata, which is built on the Qt .ini file functionality provided by the QSettings
class. Look at the example volumes to see the format, it is pretty straightforward. The loader supports reading gzipped volumes, through the gzip-library provided by Qt.
bool VolumeLoader::getMetadata | ( | const QFile & | metadataFile, |
VolumeMetaData & | metadata | ||
) | const |
Reads the metadata of a file.
metadataFile | The file which contains the metadata. |
metadata | The structure in which to store the return value |
QByteArray VolumeLoader::readVolume | ( | const VolumeMetaData & | d | ) | const |
Reads the volume represented by this metadata.
Can handle gzipped data files.