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

◆ create_output()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
output_type MayaFlux::Yantra::SpectralTransformer< InputType, OutputType >::create_output ( const input_type &  input)
inlineprivate

Creates output with proper type conversion.

Parameters
dataInput data to convert
Returns
Output with converted data type

Handles type conversion between InputType and OutputType when necessary, or direct assignment when types match. Ensures spectral processing results are properly converted back to the expected output type.

Definition at line 284 of file SpectralTransformer.hpp.

285 {
286 if constexpr (std::is_same_v<InputType, OutputType>) {
287 return input;
288 } else {
290 return this->convert_result(result_data, metadata);
291 }
292 }
Core::GlobalInputConfig input
Definition Config.cpp:42
std::unordered_map< std::string, std::string > metadata
output_type convert_result(std::vector< std::vector< double > > &result_data, DataStructureInfo &metadata)
Convert processed double data back to OutputType using metadata and optional callback.
static std::tuple< std::vector< std::span< double > >, DataStructureInfo > extract_structured_double(T &compute_data)
Extract structured double data from Datum container or direct ComputeData with automatic container ha...

References MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::convert_result(), MayaFlux::Yantra::OperationHelper::extract_structured_double(), input, and metadata.

Referenced by MayaFlux::Yantra::SpectralTransformer< InputType, OutputType >::apply_per_channel(), and MayaFlux::Yantra::SpectralTransformer< InputType, OutputType >::transform_implementation().

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