Skip to main content

OpenCVFormatLoader

OpenCVFormatLoader

OpenCV format loader. More…

#include <OpenCVFormatLoader.hpp>

Inherits from IFormatLoader

Public Functions

Name
OpenCVFormatLoader() =default
~OpenCVFormatLoader() override =default
virtual LoadResult load(std::string const & filepath, DM_DataType dataType, nlohmann::json const & config) const override
Load data from image files using OpenCV.
virtual LoadResult save(std::string const & filepath, DM_DataType dataType, nlohmann::json const & config, void const * data) const override
Save data to image files using OpenCV.
virtual bool supportsFormat(std::string const & format, DM_DataType dataType) const override
Check if this loader supports the format/dataType combination.
virtual std::vector< SaverInfo > getSaverInfo() const override
Return metadata for all save operations this loader supports.
virtual std::string getLoaderName() const override
Get loader name for logging.

Additional inherited members

Public Functions inherited from IFormatLoader

Name
virtual ~IFormatLoader() =default
virtual bool supportsBatchLoading(std::string const & format, DM_DataType dataType) const
Check if this loader supports batch loading for the given format/type.
virtual BatchLoadResult loadBatch(std::string const & filepath, DM_DataType dataType, nlohmann::json const & config) const
Load multiple data objects from a single file.
virtual std::vector< LoaderInfo > getLoaderInfo() const
Return metadata for all load operations this loader supports.

Detailed Description

class OpenCVFormatLoader;

OpenCV format loader.

This loader provides OpenCV-based image loading capability for MaskData. It wraps the existing OpenCV loading functionality.

Public Functions Documentation

function OpenCVFormatLoader

OpenCVFormatLoader() =default

function ~OpenCVFormatLoader

~OpenCVFormatLoader() override =default

function load

virtual LoadResult load(
    std::string const & filepath,
    DM_DataType dataType,
    nlohmann::json const & config
) const override

Load data from image files using OpenCV.

Reimplements: IFormatLoader::load

function save

virtual LoadResult save(
    std::string const & filepath,
    DM_DataType dataType,
    nlohmann::json const & config,
    void const * data
) const override

Save data to image files using OpenCV.

Reimplements: IFormatLoader::save

function supportsFormat

virtual bool supportsFormat(
    std::string const & format,
    DM_DataType dataType
) const override

Check if this loader supports the format/dataType combination.

Reimplements: IFormatLoader::supportsFormat

function getSaverInfo

virtual std::vector< SaverInfo > getSaverInfo() const override

Return metadata for all save operations this loader supports.

Reimplements: IFormatLoader::getSaverInfo

function getLoaderName

virtual std::string getLoaderName() const override

Get loader name for logging.

Reimplements: IFormatLoader::getLoaderName


Updated on 2026-11-13 at 20:25:40 +0000