138 [[nodiscard]] std::optional<Kakshya::VolumeData>
load(
156 [[nodiscard]] std::optional<Kakshya::VolumeData>
load(
157 const std::string& filepath,
171 [[nodiscard]] std::optional<Kakshya::VolumeData>
extract(
181 [[nodiscard]] std::optional<Kakshya::VolumeData>
extract(
189 [[nodiscard]]
bool can_read(
const std::string& filepath)
const override;
191 bool open(
const std::string& filepath,
194 void close()
override;
198 [[nodiscard]] std::optional<FileMetadata> get_metadata()
const override;
200 [[nodiscard]] std::vector<FileRegion>
get_regions()
const override {
return {}; }
201 std::vector<Kakshya::DataVariant>
read_all()
override {
return {}; }
208 std::shared_ptr<Kakshya::SignalSourceContainer>
create_container()
override;
214 bool load_into_container(
215 std::shared_ptr<Kakshya::SignalSourceContainer> container)
override;
218 bool seek(
const std::vector<uint64_t>& )
override {
return true; }
223 return typeid(std::vector<uint8_t>);
253 [[nodiscard]] std::optional<Kakshya::VolumeData>
materialize(
254 const std::vector<size_t>& indices,
255 const glm::ivec3& region_min,
#define MF_DESCRIBE(...)
Requests a generated member description for a struct at namespace scope.
RAII boundary around tinyvdb's C read and write paths.
Abstract interface for reading various file formats into containers.
bool is_open() const override
Check if a file is currently open.
std::vector< FileRegion > get_regions() const override
Get semantic regions from the file.
void set_error(std::string msg) const
std::vector< std::string > get_supported_extensions() const override
Get supported file extensions for this reader.
bool seek(const std::vector< uint64_t > &) override
Seek to a specific position in the file.
std::optional< Kakshya::VolumeData > materialize(const std::vector< size_t > &indices, const glm::ivec3 ®ion_min, const Kinesis::Lattice3D &lattice) const
Build VolumeData from selected grids over an explicit region.
std::unique_ptr< Detail::VDBArchive > m_archive
bool can_read(const std::string &filepath) const override
Check if a file can be read by this reader.
bool open(const std::string &filepath, FileReadOptions options=FileReadOptions::ALL) override
Open a file for reading.
bool supports_streaming() const override
Check if streaming is supported for the current file.
std::vector< Kakshya::DataVariant > read_region(const FileRegion &) override
Read a specific region of data.
size_t get_num_dimensions() const override
Get the dimensionality of the file data.
std::type_index get_data_type() const override
Get the data type this reader produces.
std::vector< uint64_t > get_read_position() const override
Get current read position in primary dimension.
uint64_t get_preferred_chunk_size() const override
Get the preferred chunk size for streaming.
std::string get_last_error() const override
Get the last error message.
std::type_index get_container_type() const override
Get the container type this reader creates.
std::vector< uint64_t > get_dimension_sizes() const override
Get size of each dimension in the file data.
std::optional< Kakshya::VolumeData > load(const std::string &filepath, const VolumeReadOptions &options={})
Load every selected grid from a file in one call.
void close() override
Close the currently open file.
std::optional< Kakshya::VolumeData > extract(const VolumeReadOptions &options={}) const
Extract every selected grid after open() has already been called.
std::vector< Kakshya::DataVariant > read_all() override
Read all data from the file into memory.
FileReadOptions
Generic options for file reading behavior.
@ ALL
All options enabled.
auto create_container(Args &&... args) -> std::shared_ptr< ContainerType >
creates a new container of the specified type
Generic region descriptor for any file type.
uint64_t grid_count
Number of grids in the archive.
Grid count of an OpenVDB archive.
std::vector< std::string > field_names
Grids to load, matched by name.
Configuration for volume reading.
A regular subdivision of an AABB3D into a cell count per axis.