MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ channel_data()

DataAccess MayaFlux::Kakshya::TextureContainer::channel_data ( size_t  channel_index)
overridevirtual

Get channel data with semantic interpretation.

Parameters
channelChannel index
Returns
Type-erased data accessor

Implements MayaFlux::Kakshya::SignalSourceContainer.

Definition at line 893 of file TextureContainer.cpp.

894{
895 (void)channel_index;
896
897 if (m_data.empty()) {
898 static DataVariant empty = std::vector<uint8_t> {};
899 static std::vector<DataDimension> empty_dims;
900 return { empty, empty_dims, DataModality::IMAGE_COLOR };
901 }
902
903 ensure_cpu(0);
905}
void ensure_cpu(uint32_t layer) const
Download a GPU-held layer into m_data before a CPU read.
std::variant< std::vector< double >, std::vector< float >, std::vector< uint8_t >, std::vector< uint16_t >, std::vector< uint32_t >, std::vector< std::complex< float > >, std::vector< std::complex< double > >, std::vector< glm::vec2 >, std::vector< glm::vec3 >, std::vector< glm::vec4 >, std::vector< glm::mat4 > > DataVariant
Multi-type data storage for different precision needs.
Definition NDData.hpp:70
@ IMAGE_COLOR
2D RGB/RGBA image

References MayaFlux::Kakshya::ContainerDataStructure::dimensions, ensure_cpu(), MayaFlux::Kakshya::IMAGE_COLOR, m_data, and m_structure.

Referenced by all_channel_data().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: