1ea83d9d11
* add dimension selector sliders to czi view * version doc & version bump * cosmetic * fix build? * multi-dimension selection enabled in czi view * remove the parameterized reset function of the renderer it is not and is conceptually questionable doc updates & some minor improvements auto-update CZI-view when sliders are moved set initial window size fix windows build and msvc build For reasons I don not comprehend, on Windows, we must include =opencv2/core/mat.hpp= as the very last header in the =CvMatRender.hpp=. If this is at any other position building on Windows, compilation will break w/ all kinds of cryptic errors regarding OpenCV. When building w/ msvc =__PRETTY_FUNCTION__= is not defined. =ILog.hpp= now defines it. This should be revised to only be set when the compiler is msvc. For the time being, it is considered sufficient though.
36 lines
995 B
C++
36 lines
995 B
C++
#include "PixelariumImageFactory.hpp"
|
|
|
|
#include <cctype>
|
|
#include <memory>
|
|
|
|
#include "impl/PixelariumCzi.hpp"
|
|
#include "impl/PixelariumJpg.hpp"
|
|
#include "impl/PixelariumPng.hpp"
|
|
|
|
|
|
/*static*/ std::unique_ptr<pixelarium::imaging::IPixelariumImage>
|
|
pixelarium::imaging::PixelariumImageFactory::CreateImage(const std::string& uri, const Log& log)
|
|
{
|
|
const auto res{std::filesystem::path(uri)};
|
|
const auto target_type{ExtensionToType(res.extension().string())};
|
|
|
|
switch (target_type)
|
|
{
|
|
case ImageFileType::UNKNOWN:
|
|
return {};
|
|
break;
|
|
case ImageFileType::ABSTRACT:
|
|
return {};
|
|
break;
|
|
case ImageFileType::PNG:
|
|
return std::make_unique<PixelariumPng>(uri);
|
|
break;
|
|
case ImageFileType::JPG:
|
|
return std::make_unique<PixelariumJpg>(uri);
|
|
break;
|
|
case ImageFileType::CZI:
|
|
return std::make_unique<PixelariumCzi>(uri, log);
|
|
break;
|
|
}
|
|
}
|