MeshLib Documentation
Loading...
Searching...
No Matches
MR::VoxelsSave Namespace Reference

Classes

struct  SavingSettings
 

Typedefs

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

Functions

MRVOXELS_API Expected< void > toDCM (const VdbVolume &vdbVolume, const std::filesystem::path &path, ProgressCallback cb={})
 Save voxels objet to a single 3d DICOM file.
 
template<typename T >
MRVOXELS_API Expected< void > toDCM (const VoxelsVolume< std::vector< T > > &volume, const std::filesystem::path &path, const std::optional< MinMaxf > &sourceScale={}, const ProgressCallback &cb={})
 
MRVOXELS_API Expected< void > toRawAutoname (const VdbVolume &vdbVolume, const std::filesystem::path &file, ProgressCallback callback={})
 Save raw voxels file, writing parameters in file name.
 
MRVOXELS_API Expected< void > toRawAutoname (const SimpleVolume &simpleVolume, const std::filesystem::path &file, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toRawFloat (const VdbVolume &vdbVolume, std::ostream &out, ProgressCallback callback={})
 Save voxels in raw format with each value as 32-bit float in given binary stream.
 
MRVOXELS_API Expected< void > toRawFloat (const SimpleVolume &simpleVolume, std::ostream &out, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toGav (const VdbVolume &vdbVolume, const std::filesystem::path &file, ProgressCallback callback={})
 Save voxels in Gav-format in given destination.
 
MRVOXELS_API Expected< void > toGav (const VdbVolume &vdbVolume, std::ostream &out, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toGav (const SimpleVolumeMinMax &simpleVolumeMinMax, const std::filesystem::path &file, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toGav (const SimpleVolumeMinMax &simpleVolumeMinMax, std::ostream &out, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toGav (const SimpleVolume &simpleVolume, const std::filesystem::path &file, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toGav (const SimpleVolume &simpleVolume, std::ostream &out, ProgressCallback callback={})
 
MRVOXELS_API Expected< void > toVdb (const VdbVolume &vdbVolume, const std::filesystem::path &file, ProgressCallback callback={})
 Save voxels file in OpenVDB format.
 
MRVOXELS_API Expected< void > toAnySupportedFormat (const VdbVolume &vdbVolume, const std::filesystem::path &file, ProgressCallback callback={})
 Saves voxels in a file, detecting the format from file extension.
 
MRVOXELS_API Expected< void > saveSliceToImage (const std::filesystem::path &path, const VdbVolume &vdbVolume, const SlicePlane &slicePlain, int sliceNumber, ProgressCallback callback={})
 save the slice by the active plane through the sliceNumber to an image file
 
MRVOXELS_API Expected< void > saveAllSlicesToImage (const VdbVolume &vdbVolume, const SavingSettings &settings)
 save all slices by the active plane through all voxel planes along the active axis to an image file
 

Typedef Documentation

◆ VoxelsSaver

using MR::VoxelsSave::VoxelsSaver = Expected<void>( * )( const VdbVolume&, const std::filesystem::path&, ProgressCallback )

Function Documentation

◆ toDCM() [1/2]

MRVOXELS_API Expected< void > MR::VoxelsSave::toDCM ( const VdbVolume & vdbVolume,
const std::filesystem::path & path,
ProgressCallback cb = {} )

Save voxels objet to a single 3d DICOM file.

◆ toDCM() [2/2]

template<typename T >
MRVOXELS_API Expected< void > MR::VoxelsSave::toDCM ( const VoxelsVolume< std::vector< T > > & volume,
const std::filesystem::path & path,
const std::optional< MinMaxf > & sourceScale = {},
const ProgressCallback & cb = {} )

Saves object to a single 3d DICOM file. sourceScale specifies the true scale of the voxel data which will be saved with "slope" and "intercept" parameters of the output dicom.