MeshLib C++ Docs
Loading...
Searching...
No Matches

Classes

struct  MR::VoxelsLoad::RawParameters
struct  MR::VoxelsLoad::LoadingTiffSettings

Typedefs

using MR::VoxelsLoad::VoxelsLoader = Expected<std::vector<VdbVolume>>( * )( const std::filesystem::path&, const ProgressCallback& )
 MRVOXELS_NO_TIFF.

Enumerations

enum class  MR::VoxelsLoad::GridType { MR::VoxelsLoad::GridType::DenseGrid = 0 , MR::VoxelsLoad::GridType::LevelSet = 1 }
 Determines iso-surface orientation. More...

Functions

Expected< VdbVolume > MR::VoxelsLoad::fromRaw (const std::filesystem::path &file, const RawParameters &params, const ProgressCallback &cb={})
 Load raw voxels from file with provided parameters.
Expected< VdbVolume > MR::VoxelsLoad::fromRaw (std::istream &in, const RawParameters &params, const ProgressCallback &cb={})
Expected< FloatGridMR::VoxelsLoad::gridFromRaw (const std::filesystem::path &file, const RawParameters &params, const ProgressCallback &cb={})
 Load raw voxels from file with provided parameters.
Expected< FloatGridMR::VoxelsLoad::gridFromRaw (std::istream &in, const RawParameters &params, const ProgressCallback &cb={})
Expected< RawParametersMR::VoxelsLoad::findRawParameters (std::filesystem::path &file)
Expected< VdbVolume > MR::VoxelsLoad::fromRaw (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load raw voxels file, parsing parameters from name.
Expected< FloatGridMR::VoxelsLoad::gridFromRaw (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load raw voxels file, parsing parameters from name.
Expected< std::vector< VdbVolume > > MR::VoxelsLoad::fromVdb (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load all voxel volumes from OpenVDB file.
Expected< std::vector< FloatGrid > > MR::VoxelsLoad::gridsFromVdb (const std::filesystem::path &file, const ProgressCallback &cb={})
Expected< std::vector< FloatGrid > > MR::VoxelsLoad::gridsFromVdb (std::istream &in, const ProgressCallback &cb={})
Expected< VdbVolume > MR::VoxelsLoad::fromGav (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load voxel from Gav-file with micro CT reconstruction.
Expected< VdbVolume > MR::VoxelsLoad::fromGav (std::istream &in, const ProgressCallback &cb={})
 Load voxel from Gav-stream with micro CT reconstruction.
Expected< std::vector< FloatGrid > > MR::VoxelsLoad::gridsFromAnySupportedFormat (const std::filesystem::path &file, const ProgressCallback &cb={})
 Detects the format from file extension and loads voxels from it.
Expected< std::vector< VdbVolume > > MR::VoxelsLoad::fromAnySupportedFormat (const std::filesystem::path &file, const ProgressCallback &cb={})
 Detects the format from file extension and loads voxels from it.
Expected< VdbVolume > MR::VoxelsLoad::loadTiffDir (const LoadingTiffSettings &settings)
 Load voxels from a set of TIFF files.

Variables

Vector3i MR::VoxelsLoad::RawParameters::dimensions
Vector3f MR::VoxelsLoad::RawParameters::voxelSize
bool MR::VoxelsLoad::RawParameters::gridLevelSet { false }
 OpenVDB GridClass set as GRID_LEVEL_SET (need to set right surface normals direction)
ScalarType MR::VoxelsLoad::RawParameters::scalarType { ScalarType::Float32 }
std::filesystem::path MR::VoxelsLoad::LoadingTiffSettings::dir
Vector3f MR::VoxelsLoad::LoadingTiffSettings::voxelSize = { 1.0f, 1.0f, 1.0f }
GridType MR::VoxelsLoad::LoadingTiffSettings::gridType = GridType::DenseGrid
ProgressCallback MR::VoxelsLoad::LoadingTiffSettings::cb = {}

Detailed Description

Typedef Documentation

◆ VoxelsLoader

using MR::VoxelsLoad::VoxelsLoader = Expected<std::vector<VdbVolume>>( * )( const std::filesystem::path&, const ProgressCallback& )

#include <MRVoxels/MRVoxelsLoad.h>

MRVOXELS_NO_TIFF.

Enumeration Type Documentation

◆ GridType

enum class MR::VoxelsLoad::GridType
strong

#include <MRVoxels/MRVoxelsLoad.h>

Determines iso-surface orientation.

Enumerator
DenseGrid 

consider values less than iso as outer area

LevelSet 

consider values less than iso as inner area

Function Documentation

◆ findRawParameters()

Expected< RawParameters > MR::VoxelsLoad::findRawParameters ( std::filesystem::path & file)

#include <MRVoxels/MRVoxelsLoad.h>

finds raw voxels file and its encoding parameters

Parameters
fileon input: file name probably without suffix with parameters on output: if success existing file name

◆ fromAnySupportedFormat()

Expected< std::vector< VdbVolume > > MR::VoxelsLoad::fromAnySupportedFormat ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Detects the format from file extension and loads voxels from it.

◆ fromGav() [1/2]

Expected< VdbVolume > MR::VoxelsLoad::fromGav ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load voxel from Gav-file with micro CT reconstruction.

◆ fromGav() [2/2]

Expected< VdbVolume > MR::VoxelsLoad::fromGav ( std::istream & in,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load voxel from Gav-stream with micro CT reconstruction.

◆ fromRaw() [1/3]

Expected< VdbVolume > MR::VoxelsLoad::fromRaw ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load raw voxels file, parsing parameters from name.

◆ fromRaw() [2/3]

Expected< VdbVolume > MR::VoxelsLoad::fromRaw ( const std::filesystem::path & file,
const RawParameters & params,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load raw voxels from file with provided parameters.

◆ fromRaw() [3/3]

Expected< VdbVolume > MR::VoxelsLoad::fromRaw ( std::istream & in,
const RawParameters & params,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load raw voxels from stream with provided parameters; important on Windows: in stream must be open in binary mode

◆ fromVdb()

Expected< std::vector< VdbVolume > > MR::VoxelsLoad::fromVdb ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load all voxel volumes from OpenVDB file.

◆ gridFromRaw() [1/3]

Expected< FloatGrid > MR::VoxelsLoad::gridFromRaw ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load raw voxels file, parsing parameters from name.

◆ gridFromRaw() [2/3]

Expected< FloatGrid > MR::VoxelsLoad::gridFromRaw ( const std::filesystem::path & file,
const RawParameters & params,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load raw voxels from file with provided parameters.

◆ gridFromRaw() [3/3]

Expected< FloatGrid > MR::VoxelsLoad::gridFromRaw ( std::istream & in,
const RawParameters & params,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Load raw voxels from stream with provided parameters; important on Windows: in stream must be open in binary mode

◆ gridsFromAnySupportedFormat()

Expected< std::vector< FloatGrid > > MR::VoxelsLoad::gridsFromAnySupportedFormat ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

#include <MRVoxels/MRVoxelsLoad.h>

Detects the format from file extension and loads voxels from it.

◆ gridsFromVdb() [1/2]

Expected< std::vector< FloatGrid > > MR::VoxelsLoad::gridsFromVdb ( const std::filesystem::path & file,
const ProgressCallback & cb = {} )

◆ gridsFromVdb() [2/2]

Expected< std::vector< FloatGrid > > MR::VoxelsLoad::gridsFromVdb ( std::istream & in,
const ProgressCallback & cb = {} )

◆ loadTiffDir()

Expected< VdbVolume > MR::VoxelsLoad::loadTiffDir ( const LoadingTiffSettings & settings)

#include <MRVoxels/MRVoxelsLoad.h>

Load voxels from a set of TIFF files.

Variable Documentation

◆ cb

ProgressCallback MR::VoxelsLoad::LoadingTiffSettings::cb = {}

◆ dimensions

Vector3i MR::VoxelsLoad::RawParameters::dimensions

◆ dir

std::filesystem::path MR::VoxelsLoad::LoadingTiffSettings::dir

◆ gridLevelSet

bool MR::VoxelsLoad::RawParameters::gridLevelSet { false }

OpenVDB GridClass set as GRID_LEVEL_SET (need to set right surface normals direction)

◆ gridType

GridType MR::VoxelsLoad::LoadingTiffSettings::gridType = GridType::DenseGrid

◆ scalarType

ScalarType MR::VoxelsLoad::RawParameters::scalarType { ScalarType::Float32 }

◆ voxelSize [1/2]

Vector3f MR::VoxelsLoad::LoadingTiffSettings::voxelSize = { 1.0f, 1.0f, 1.0f }

◆ voxelSize [2/2]

Vector3f MR::VoxelsLoad::RawParameters::voxelSize