MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::VoxelsLoad Namespace Reference

Classes

struct  DicomStatus
struct  DicomVolumeT
struct  RasterFolderLoadSettings
struct  RawParameters

Typedefs

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

Enumerations

enum class  DicomStatusEnum : int { DicomStatusEnum::Ok = 0 , DicomStatusEnum::Invalid , DicomStatusEnum::Unsupported }
enum class  GridType { DenseGrid = 0 , LevelSet = 1 }
 Determines iso-surface orientation. More...

Functions

DicomStatus isDicomFile (const std::filesystem::path &path, std::string *seriesUid=nullptr, Vector3i *dims=nullptr)
bool isDicomFolder (const std::filesystem::path &dirPath)
 check if given folder contains at least one DICOM file
std::vector< std::filesystem::path > findDicomFoldersRecursively (const std::filesystem::path &path)
 returns all the dicom folders in path, searching recursively
Expected< DicomVolume > loadDicomFile (const std::filesystem::path &file, const ProgressCallback &cb={})
 Loads full volume from single DICOM file (not a slice file) as SimpleVolumeMinMax.
Expected< DicomVolumeAsVdb > loadDicomFileAsVdb (const std::filesystem::path &file, const ProgressCallback &cb={})
 Loads full volume from single DICOM file (not a slice file) as VdbVolume.
Expected< DicomVolume > loadDicomFolder (const std::filesystem::path &path, unsigned maxNumThreads, const ProgressCallback &cb={})
 Loads one volume from DICOM files located in given folder as SimpleVolumeMinMax.
Expected< DicomVolumeAsVdb > loadDicomFolderAsVdb (const std::filesystem::path &path, unsigned maxNumThreads, const ProgressCallback &cb={})
 Loads one volume from DICOM files located in given folder as VdbVolume.
std::vector< Expected< DicomVolume > > loadDicomsFolder (const std::filesystem::path &path, unsigned maxNumThreads, const ProgressCallback &cb={})
 Loads all volumes from DICOM files located in given folder as a number of SimpleVolumeMinMax.
std::vector< Expected< DicomVolumeAsVdb > > loadDicomsFolderAsVdb (const std::filesystem::path &path, unsigned maxNumThreads, const ProgressCallback &cb={})
 Loads all volumes from DICOM files located in given folder as a number of VdbVolume.
std::vector< Expected< DicomVolumeAsVdb > > loadDicomsFolderTreeAsVdb (const std::filesystem::path &path, unsigned maxNumThreads=4, const ProgressCallback &cb={})
 Loads every subfolder with DICOM volume as new object.
Expected< std::shared_ptr< ObjectVoxels > > createObjectVoxels (const DicomVolumeAsVdb &dcm, const ProgressCallback &cb={})
 converts DicomVolumeAsVdb in ObjectVoxels
Expected< LoadedObjects > makeObjectVoxelsFromDicomFolder (const std::filesystem::path &folder, const ProgressCallback &callback={})
 Loads 3D volumetric data from dicom-files in given folder, and converts them into an ObjectVoxels.
Expected< VdbVolume > fromRaw (const std::filesystem::path &file, const RawParameters &params, const ProgressCallback &cb={})
 Load raw voxels from file with provided parameters.
Expected< VdbVolume > fromRaw (std::istream &in, const RawParameters &params, const ProgressCallback &cb={})
Expected< FloatGrid > gridFromRaw (const std::filesystem::path &file, const RawParameters &params, const ProgressCallback &cb={})
 Load raw voxels from file with provided parameters.
Expected< FloatGrid > gridFromRaw (std::istream &in, const RawParameters &params, const ProgressCallback &cb={})
Expected< RawParameters > findRawParameters (std::filesystem::path &file)
Expected< VdbVolume > fromRaw (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load raw voxels file, parsing parameters from name.
Expected< FloatGrid > gridFromRaw (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load raw voxels file, parsing parameters from name.
Expected< std::vector< VdbVolume > > fromVdb (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load all voxel volumes from OpenVDB file.
Expected< std::vector< FloatGrid > > gridsFromVdb (const std::filesystem::path &file, const ProgressCallback &cb={})
Expected< std::vector< FloatGrid > > gridsFromVdb (std::istream &in, const ProgressCallback &cb={})
Expected< VdbVolume > fromGav (const std::filesystem::path &file, const ProgressCallback &cb={})
 Load voxel from Gav-file with micro CT reconstruction.
Expected< VdbVolume > fromGav (std::istream &in, const ProgressCallback &cb={})
 Load voxel from Gav-stream with micro CT reconstruction.
Expected< std::vector< FloatGrid > > gridsFromAnySupportedFormat (const std::filesystem::path &file, const ProgressCallback &cb={})
 Detects the format from file extension and loads voxels from it.
Expected< std::vector< VdbVolume > > fromAnySupportedFormat (const std::filesystem::path &file, const ProgressCallback &cb={})
 Detects the format from file extension and loads voxels from it.
Expected< VdbVolume > loadRasterFolder (const RasterFolderLoadSettings &settings)
Expected< VdbVolume > loadTiffDir (const RasterFolderLoadSettings &settings)

Variables

template<typename T>
 struct
 DicomVolumeT
 DicomVolume

Typedef Documentation

◆ VoxelsLoader

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

Enumeration Type Documentation

◆ GridType

enum class MR::VoxelsLoad::GridType
strong

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)

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 = {} )

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 = {} )

Load voxel from Gav-file with micro CT reconstruction.

◆ fromGav() [2/2]

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

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 = {} )

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 = {} )

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 = {} )

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 = {} )

Load all voxel volumes from OpenVDB file.

◆ gridFromRaw() [1/3]

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

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 = {} )

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 = {} )

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 = {} )

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 = {} )

◆ loadRasterFolder()

Expected< VdbVolume > MR::VoxelsLoad::loadRasterFolder ( const RasterFolderLoadSettings & settings)

Load voxels from the raster files of a folder, a layer from each file: the files are those of the extension with a raster loader that most files have, sorted by name; they must have the same RasterInfo, their values are converted by convertRasterToFloats

◆ loadTiffDir()

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