Skip to content

Volume Loader

Authors: Holoscan Team (NVIDIA)
Supported platforms: x86_64, aarch64
Last modified: March 18, 2025
Language: C++
Latest version: 1.0.0
Minimum Holoscan SDK version: 0.6.0
Tested Holoscan SDK versions: 0.6.0, 1.0.3, 2.0.0, 2.1.0
Contribution metric: Level 1 - Highly Reliable

The volume_loader operator reads 3D volumes from the specified input file.

Supported Formats

The operator supports these medical volume file formats: * MHD (MetaImage) * Detached-header format only (.mhd + .raw) * NIFTI * NRRD (Nearly Raw Raster Data) * Attached-header format (.nrrd) * Detached-header format (.nhdr + .raw)

You must convert your data to one of these formats to load it with VolumeLoaderOp. Some third party open source tools for volume file format conversion include: - Command Line Tools - the Insight Toolkit (ITK) (PyPI, Image IO Examples) - SimpleITK (PyPI) - Utah NRRD Utilities (unu) - GUI Applications - 3D Slicer - ImageJ

API

holoscan::ops::VolumeLoaderOp

Operator class to read a volume.

Parameters
  • file_name: Volume data file name
  • type: std::string
  • allocator: Allocator used to allocate the volume data
  • type: std::shared_ptr<Allocator>
Outputs
  • volume: Output volume data
  • type: nvidia::gxf::Tensor
  • spacing: Physical size of each volume element
  • type: std::array<float, 3>
  • permute_axis: Volume axis permutation of data space to world space, e.g. if x and y of a volume is swapped this is {1, 0, 2}
  • type: std::array<uint32_t, 3>
  • flip_axes: Volume axis flipping from data space to world space, e.g. if x is flipped this is {true, false, false}
  • type: std::array<bool, 3>
  • extent: Physical size of the the volume in world space
  • type: std::array<float, 3>