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.
33 lines
876 B
C++
33 lines
876 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include "imaging/IPixelariumImage.hpp"
|
|
#include "imgui.h"
|
|
|
|
namespace pixelarium::render
|
|
{
|
|
/// @brief An interface defining the contract on views to dedicated implementations of IPixelariumImage
|
|
class IPixelariumImageView
|
|
{
|
|
public:
|
|
virtual ~IPixelariumImageView() = default;
|
|
virtual void ShowImage() = 0;
|
|
|
|
// default implemented
|
|
public:
|
|
virtual const bool* GetStatus() const noexcept { return &this->open_p; }
|
|
virtual void ForceUpdate() noexcept { this->is_dirty_ = true; }
|
|
virtual void SetInitialSize(float width = 700.0f, float height = 700.0f)
|
|
{
|
|
ImGui::SetNextWindowSize({width, height});
|
|
}
|
|
|
|
protected:
|
|
std::shared_ptr<imaging::IPixelariumImage> img_{};
|
|
std::unique_ptr<cv::Mat> cached_image_{};
|
|
bool open_p{true};
|
|
bool is_dirty_{true};
|
|
};
|
|
} // namespace pixelarium::render
|