Infer dimensions and modality from any ComputeData type.
134{
135
136 if constexpr (std::is_same_v<T, Kakshya::DataVariant>) {
138 } else if constexpr (std::is_same_v<T, std::shared_ptr<Kakshya::SignalSourceContainer>>) {
139 return infer_from_container(data);
140 } else if constexpr (std::is_same_v<T, Kakshya::Region>) {
141 return infer_from_region(data, container);
142 } else if constexpr (std::is_same_v<T, Kakshya::RegionGroup>) {
144 } else if constexpr (std::is_same_v<T, std::vector<Kakshya::RegionSegment>>) {
146 } else if constexpr (std::is_base_of_v<Eigen::MatrixBase<T>, T>) {
148 } else {
150 }
151}
static std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_eigen(const EigenType &eigen_data)
Infer structure from Eigen matrix/vector.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_data_variant(const Kakshya::DataVariant &data)
Infer structure from DataVariant.
static std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_generic_structure(const T &data)
Generic structure inference for unknown types.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_region_group(const Kakshya::RegionGroup &group, const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from RegionGroup.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_segments(const std::vector< Kakshya::RegionSegment > &segments, const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from RegionSegments.