Files
pixelarium/lib/imaging/PixelariumImage.cpp
T
m-aXimilian bce12b0bb4 Proper image rendering ux (#5)
* can draw from selection

* add light-weight render manager to render many images simultaneously

* [debug me] currently the image close button does not do

* the unselected image can be closed now

* can close images and manually open them on demand

* cosmetic

* image view stuff in render subdirectory

* cosmetic

* generate docs

* review

windows support

some cosmetics

💅 and pin libCZI module
2026-02-16 20:36:45 +01:00

19 lines
458 B
C++

#include "PixelariumImage.hpp"
#include <filesystem>
#include <format>
#include <memory>
#include <opencv2/imgcodecs.hpp>
#include <stdexcept>
pixelarium::imaging::PixelariumImage::PixelariumImage(const std::string& uri)
{
if (!std::filesystem::exists(uri))
{
throw std::runtime_error(std::format("File not {} found", uri));
}
this->uri_ = std::filesystem::path(uri);
this->img_ = std::make_unique<cv::Mat>(cv::imread(uri));
}