Carna  Version 3.3.2
Static Public Member Functions | List of all members
Carna::testing::HUGZSceneFactory Struct Reference

Creates Carna::base::HUVolumeUInt16 object from HUGZ-file. More...

#include <HUGZSceneFactory.h>

Static Public Member Functions

static Carna::base::HUVolumeUInt16importVolume (const std::string &filename, Carna::base::math::Vector3f &spacing)
 Reads HUGZ file and returns created Carna::base::HUVolumeUInt16 object. More...
 

Detailed Description

Creates Carna::base::HUVolumeUInt16 object from HUGZ-file.

HUGZ File Format

The HUGZ file is GZIP compression of the following data:

  1. Bytes 1 to 4 are an unsigned integer that describes the volume width.
  2. Bytes 5 to 8 are an unsigned integer that describes the volume height.
  3. Bytes 9 to 12 are an unsigned integer that describes the volume depth.
  4. Bytes 13 to 16 are an IEEE 754 single precision floating point number that describes the x-spacing.
  5. Bytes 17 to 20 are an IEEE 754 single precision floating point number that describes the y-spacing.
  6. Bytes 21 to 24 are an IEEE 754 single precision floating point number that describes the z-spacing.
  7. Each voxel is represented as a signed short.
Todo:
Use int16_t instead of signed short.

Definition at line 40 of file HUGZSceneFactory.h.

Member Function Documentation

◆ importVolume()

static Carna::base::HUVolumeUInt16* Carna::testing::HUGZSceneFactory::importVolume ( const std::string &  filename,
Carna::base::math::Vector3f spacing 
)
static

Reads HUGZ file and returns created Carna::base::HUVolumeUInt16 object.

The HUGZ file format is described here.


The documentation for this struct was generated from the following file: