Transition to C++23 (#11)
* enum field renaming * renderer cleanups * compiling for C++23 * version bump * fix build
This commit is contained in:
committed by
Maximilian Kueffner
parent
1ea83d9d11
commit
fec5c08aaa
@@ -14,15 +14,15 @@ using ImageQueryFunctor = std::function<void(const std::string&, void*, int*)>;
|
||||
enum class ImageFileType
|
||||
{
|
||||
/// @brief Represents an unknown or unsupported file type.
|
||||
UNKNOWN = -10,
|
||||
kUnknown = -10,
|
||||
/// @brief Represents an abstract image type (e.g., a placeholder).
|
||||
ABSTRACT = 0,
|
||||
kAbstract = 0,
|
||||
/// @brief Represents a PNG image file.
|
||||
PNG = 1,
|
||||
kPng = 1,
|
||||
/// @brief Represents a JPG image file.
|
||||
JPG = 2,
|
||||
kJpg = 2,
|
||||
/// @brief Represents a CZI image file.
|
||||
CZI = 3,
|
||||
kCzi = 3,
|
||||
};
|
||||
|
||||
/// @brief An abstract interface to define a semantic query
|
||||
@@ -83,7 +83,7 @@ class IPixelariumImage
|
||||
}
|
||||
|
||||
public:
|
||||
const static ImageFileType type_{ImageFileType::ABSTRACT};
|
||||
const static ImageFileType type_{ImageFileType::kAbstract};
|
||||
|
||||
protected:
|
||||
std::filesystem::path uri_;
|
||||
|
||||
@@ -16,19 +16,19 @@ pixelarium::imaging::PixelariumImageFactory::CreateImage(const std::string& uri,
|
||||
|
||||
switch (target_type)
|
||||
{
|
||||
case ImageFileType::UNKNOWN:
|
||||
case ImageFileType::kUnknown:
|
||||
return {};
|
||||
break;
|
||||
case ImageFileType::ABSTRACT:
|
||||
case ImageFileType::kAbstract:
|
||||
return {};
|
||||
break;
|
||||
case ImageFileType::PNG:
|
||||
case ImageFileType::kPng:
|
||||
return std::make_unique<PixelariumPng>(uri);
|
||||
break;
|
||||
case ImageFileType::JPG:
|
||||
case ImageFileType::kJpg:
|
||||
return std::make_unique<PixelariumJpg>(uri);
|
||||
break;
|
||||
case ImageFileType::CZI:
|
||||
case ImageFileType::kCzi:
|
||||
return std::make_unique<PixelariumCzi>(uri, log);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -13,18 +13,18 @@ constexpr pixelarium::imaging::ImageFileType ExtensionToType(const std::string&
|
||||
|
||||
if (lower_ext == ".jpg" || lower_ext == ".jpeg")
|
||||
{
|
||||
return pixelarium::imaging::ImageFileType::JPG;
|
||||
return pixelarium::imaging::ImageFileType::kJpg;
|
||||
}
|
||||
if (lower_ext == ".png")
|
||||
{
|
||||
return pixelarium::imaging::ImageFileType::PNG;
|
||||
return pixelarium::imaging::ImageFileType::kPng;
|
||||
}
|
||||
if (lower_ext == ".czi")
|
||||
{
|
||||
return pixelarium::imaging::ImageFileType::CZI;
|
||||
return pixelarium::imaging::ImageFileType::kCzi;
|
||||
}
|
||||
|
||||
return pixelarium::imaging::ImageFileType::UNKNOWN;
|
||||
return pixelarium::imaging::ImageFileType::kUnknown;
|
||||
}
|
||||
|
||||
/// @brief Factory for instantiating implementations of IPixelariumImage based on the given file type.
|
||||
|
||||
@@ -46,7 +46,7 @@ class PixelariumCzi : public IPixelariumImage
|
||||
const libCZI::SubBlockStatistics& GetStatistics() const { return this->image_statistics_; }
|
||||
|
||||
public:
|
||||
const static ImageFileType type_{ImageFileType::CZI};
|
||||
const static ImageFileType type_{ImageFileType::kCzi};
|
||||
|
||||
private:
|
||||
std::unique_ptr<cv::Mat> SubblockToCvMat(int index);
|
||||
|
||||
@@ -32,7 +32,7 @@ class PixelariumJpg : public IPixelariumImage
|
||||
bool Empty() const noexcept override { return this->is_empty_; }
|
||||
|
||||
public:
|
||||
const static ImageFileType type_{ImageFileType::JPG};
|
||||
const static ImageFileType type_{ImageFileType::kJpg};
|
||||
|
||||
private:
|
||||
// this should be set by each image getter
|
||||
|
||||
@@ -32,7 +32,7 @@ class PixelariumPng : public IPixelariumImage
|
||||
bool Empty() const noexcept override { return this->is_empty_; }
|
||||
|
||||
public:
|
||||
const static ImageFileType type_{ImageFileType::PNG};
|
||||
const static ImageFileType type_{ImageFileType::kPng};
|
||||
|
||||
private:
|
||||
// this should be set by each image getter
|
||||
|
||||
Reference in New Issue
Block a user