88 [[nodiscard]]
virtual bool can_write(
const std::string& filepath)
const = 0;
98 const std::string& filepath,
virtual bool can_write(const std::string &filepath) const =0
Check whether this writer handles the given filepath.
virtual ~VolumeWriter()=default
virtual std::vector< std::string > get_supported_extensions() const =0
File extensions handled by this writer (without dot).
virtual bool write(const std::string &filepath, const Kakshya::VolumeData &data, const VolumeWriteOptions &options={})=0
Write volume data to disk.
virtual std::string get_last_error() const =0
Last error message or empty string.
Abstract base for volumetric format writers.
Singleton registry dispatching single-shot writes by file extension.
WriterFactory< VolumeWriter > VolumeWriterFactory
WriterRegistry< VolumeWriter > VolumeWriterRegistry
Singleton registry dispatching volume writes by file extension.
std::function< std::unique_ptr< Writer >()> WriterFactory
float activity_threshold
Magnitude below which a cell is written as inactive.
bool half_float
Store values at half precision where the format supports it.
int compression
Format-specific compression code, or -1 for the writer's default.
float background
Value assumed by every inactive cell.
std::unordered_map< std::string, float > field_thresholds
Per-field overrides of activity_threshold, keyed by field name.
Configuration for volume writing.
A lattice and every field sampled over it, held in host memory.