LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
LibCarna::testing::HUGZSceneFactory Struct Reference

Creates LibCarna::base::IntensityVolumeUInt16 object from HUGZ-file. More...

#include <HUGZSceneFactory.hpp>

Static Public Member Functions

static LibCarna::base::IntensityVolumeUInt16importVolume (const std::string &filename, LibCarna::base::math::Vector3f &spacing, bool stretchIntensities=false)
 Reads HUGZ file and returns created LibCarna::base::IntensityVolumeUInt16 object.
 

Detailed Description

Creates LibCarna::base::IntensityVolumeUInt16 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 54 of file HUGZSceneFactory.hpp.

Member Function Documentation

◆ importVolume()

static LibCarna::base::IntensityVolumeUInt16 * LibCarna::testing::HUGZSceneFactory::importVolume ( const std::string &  filename,
LibCarna::base::math::Vector3f spacing,
bool  stretchIntensities = false 
)
static

Reads HUGZ file and returns created LibCarna::base::IntensityVolumeUInt16 object.

The HUGZ file format is described here.


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