MISA++ Imaging  1.0.0
Adds support for OpenCV
misa_image_file_cache.h
Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include <misaxx/core/misa_cache.h>
17 #include <boost/filesystem/path.hpp>
18 #include <boost/filesystem/operations.hpp>
19 #include <misaxx/core/misa_cache.h>
22 #include <misaxx/core/misa_default_cache.h>
24 #include <opencv2/opencv.hpp>
25 
26 namespace misaxx::imaging {
27 
32  class misa_image_file_cache : public misaxx::misa_default_cache<misaxx::utils::cache<cv::Mat>,
33  misa_image_pattern, misa_image_description> {
34  public:
35 
36  cv::Mat &get() override;
37 
38  const cv::Mat &get() const override;
39 
40  void set(cv::Mat value) override;
41 
42  bool has() const override;
43 
44  bool can_pull() const override;
45 
46  void pull() override;
47 
48  void stash() override;
49 
50  void push() override;
51 
52  void do_link(const misa_image_description &t_description) override;
53 
54  protected:
55 
56  misa_image_description produce_description(const boost::filesystem::path &t_location, const misa_image_pattern &t_pattern) override;
57 
58  private:
59  cv::Mat m_value;
60  boost::filesystem::path m_path;
61  };
62 }
misa_image_description produce_description(const boost::filesystem::path &t_location, const misa_image_pattern &t_pattern) override
Definition: misa_image_file.h:19
Definition: misa_image_file_cache.h:32
void set(cv::Mat value) override
void do_link(const misa_image_description &t_description) override
Definition: misa_image_description.h:18
Definition: misa_image_pattern.h:18