Czi rendering (#10)
* 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.
This commit is contained in:
committed by
Maximilian Kueffner
parent
e60203b57d
commit
1ea83d9d11
@@ -1,21 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "imgui.h"
|
||||
#include "libCZI_DimCoordinate.h"
|
||||
#include "rendering/CvMatRender.hpp"
|
||||
#include "rendering/IPixelariumImageView.hpp"
|
||||
#include "utilities/ILog.hpp"
|
||||
|
||||
namespace pixelarium::render
|
||||
{
|
||||
/// @brief A CZI-specific implementation of IPixelariumImageView.
|
||||
class PixelariumImageViewCzi : public IPixelariumImageView
|
||||
{
|
||||
using Image = imaging::IPixelariumImage;
|
||||
using Render = render::CvMatRender;
|
||||
using Log = utils::log::ILog;
|
||||
|
||||
public:
|
||||
explicit PixelariumImageViewCzi(std::shared_ptr<Image> img)
|
||||
{
|
||||
img_ = img;
|
||||
render_ = Render(img_);
|
||||
}
|
||||
explicit PixelariumImageViewCzi(std::shared_ptr<Image> img, const Log& log);
|
||||
PixelariumImageViewCzi() = delete;
|
||||
PixelariumImageViewCzi(PixelariumImageViewCzi&) = delete;
|
||||
PixelariumImageViewCzi(const PixelariumImageViewCzi&) = delete;
|
||||
@@ -27,5 +31,8 @@ class PixelariumImageViewCzi : public IPixelariumImageView
|
||||
|
||||
private:
|
||||
ImVec2 curr_dim_{};
|
||||
const Log& log_;
|
||||
std::unordered_map<libCZI::DimensionIndex, int> dimension_map_;
|
||||
std::unique_ptr<CvMatRender> render_;
|
||||
};
|
||||
} // namespace pixelarium::render
|
||||
|
||||
Reference in New Issue
Block a user