235d00192a
* get rid of optional<ptr> -> double indirection * more optional cleanup * fix * add more render pixel type options * towards different views * missing virtual declaration of ShowImage * fix runtime * init image view factory * fix build Render Image close button re-enable add readme init documentation use awesomeDoxygen ci build docs install doxygen id token permission add pages write permission
42 lines
1019 B
C++
42 lines
1019 B
C++
#pragma once
|
|
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
#include "../IPixelariumImage.hpp"
|
|
|
|
namespace pixelarium::imaging
|
|
{
|
|
class PixelariumPng : public IPixelariumImage
|
|
{
|
|
public:
|
|
explicit PixelariumPng(const std::string& url);
|
|
|
|
// IPixelariumImage member implementations
|
|
public:
|
|
std::unique_ptr<cv::Mat> TryGetImage() override;
|
|
|
|
std::unique_ptr<cv::Mat> TryGetImage(const IImageQuery&) override
|
|
{
|
|
// ToDo: proper error
|
|
throw std::runtime_error("Not possible with png.");
|
|
}
|
|
|
|
std::vector<std::unique_ptr<cv::Mat>> TryGetImages(const IImageQuery&) override
|
|
{
|
|
// ToDo: proper error
|
|
throw std::runtime_error("Not possible with png.");
|
|
}
|
|
|
|
bool Empty() const noexcept override { return this->is_empty_; }
|
|
|
|
public:
|
|
const static ImageFileType type_{ImageFileType::PNG};
|
|
|
|
private:
|
|
// this should be set by each image getter
|
|
// after a new cv::Mat could be instantiated
|
|
bool is_empty_{true};
|
|
};
|
|
} // namespace pixelarium::imaging
|