|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
File reader for image formats (PNG, JPG, BMP, TGA, etc.) More...
#include <ImageReader.hpp>
Inheritance diagram for MayaFlux::IO::ImageReader:
Collaboration diagram for MayaFlux::IO::ImageReader:Public Member Functions | |
| ImageReader () | |
| ~ImageReader () override | |
| 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. | |
| void | close () override |
| Close the currently open file. | |
| bool | is_open () const override |
| Check if a file is currently open. | |
| std::optional< FileMetadata > | get_metadata () const override |
| Get metadata from the open file. | |
| std::vector< FileRegion > | get_regions () const override |
| Get semantic regions from the file. | |
| std::vector< Kakshya::DataVariant > | read_all () override |
| Read all data from the file into memory. | |
| std::vector< Kakshya::DataVariant > | read_region (const FileRegion ®ion) override |
| Read a specific region of data. | |
| std::shared_ptr< Kakshya::SignalSourceContainer > | create_container () override |
| Create and initialize a container from the file. | |
| bool | load_into_container (std::shared_ptr< Kakshya::SignalSourceContainer > container) override |
| Load file data into an existing container. | |
| std::vector< uint64_t > | get_read_position () const override |
| Get current read position in primary dimension. | |
| bool | seek (const std::vector< uint64_t > &position) override |
| Seek to a specific position in the file. | |
| std::vector< std::string > | get_supported_extensions () const override |
| Get supported file extensions for this reader. | |
| std::type_index | get_data_type () const override |
| Get the data type this reader produces. | |
| std::type_index | get_container_type () const override |
| Get the container type this reader creates. | |
| std::string | get_last_error () const override |
| Get the last error message. | |
| bool | supports_streaming () const override |
| Check if streaming is supported for the current file. | |
| uint64_t | get_preferred_chunk_size () const override |
| Get the preferred chunk size for streaming. | |
| size_t | get_num_dimensions () const override |
| Get the dimensionality of the file data. | |
| std::vector< uint64_t > | get_dimension_sizes () const override |
| Get size of each dimension in the file data. | |
| std::optional< ImageData > | get_image_data () const |
| Get the loaded image data. | |
| std::shared_ptr< Buffers::TextureBuffer > | create_texture_buffer () |
| Create a VKBuffer containing the loaded image pixel data. | |
| bool | load_into_buffer (const std::shared_ptr< Buffers::VKBuffer > &buffer) |
| Load image directly into an existing VKBuffer. | |
Public Member Functions inherited from MayaFlux::IO::FileReader | |
| virtual | ~FileReader ()=default |
Static Public Member Functions | |
| static std::optional< ImageData > | load_from_memory (const void *data, size_t size) |
| Load image from memory (static utility) | |
| static std::optional< ImageData > | load (const std::string &path, int desired_channels=4) |
| Load image from file (static utility) | |
| static std::optional< ImageData > | load (const std::filesystem::path &path, int desired_channels=4) |
| Load image from file (static utility) | |
| static std::shared_ptr< Core::VKImage > | load_texture (const std::string &path) |
| Load image directly into GPU texture (static utility) | |
Private Attributes | |
| std::string | m_filepath |
| std::optional< ImageData > | m_image_data |
| std::string | m_last_error |
| bool | m_is_open |
Additional Inherited Members | |
Static Protected Member Functions inherited from MayaFlux::IO::FileReader | |
| static std::unordered_map< std::string, Kakshya::RegionGroup > | regions_to_groups (const std::vector< FileRegion > ®ions) |
| Convert file regions to region groups. | |
File reader for image formats (PNG, JPG, BMP, TGA, etc.)
Uses STB Image library for decoding. Supports:
Implements the FileReader interface for consistency with other readers.
Definition at line 37 of file ImageReader.hpp.