IOLink 1.16.1
Loading...
Searching...
No Matches
TensorViewFactory.h
1#pragma once
2
3#include <memory>
4
5#include <iolink/IOLinkAPI.h>
6#include <iolink/view/tensor/TensorView.h>
7
8namespace iolink
9{
10
11// Forward declaration of ImageView class to avoid circular dependency
12class ImageView;
13class DataFrameView;
14
15class IOLINK_API TensorViewFactory
16{
17public:
18 // Disable instantiation of this class
19 TensorViewFactory() = delete;
20
29 static std::shared_ptr<TensorView> allocate(const VectorXu64& shape, DataType dtype);
30
42 static std::shared_ptr<TensorView> fromImage(const std::shared_ptr<ImageView>& src);
43
55 static std::shared_ptr<TensorView> fromDataFrame(const std::shared_ptr<DataFrameView>& src);
56};
57
58} // namespace iolink