Skip to content

Class drift::img::WaveletImage

ClassList > drift > img > WaveletImage

More...

  • #include <wavelet_image.h>

Public Types

Type Name
typedef WaveletBuffer Buffer
typedef IImageCodec Codec
typedef DenoiseAlgorithm< DataType > Denoiser
enum Status

Public Functions

Type Name
double CompareTo (const WaveletImage & other) const
Status ExportToFile (const std::string & file_path, const Codec & codec, size_t start_channel=0) const
Status ExportToString (std::string * data, const Codec & codec, size_t start_channel=0) const
Status ImportFromFile (const std::string & file_path, const Denoiser & denoiser, const Codec & codec, size_t start_channel=0)
Status ImportFromString (const std::string & data, const Denoiser & denoiser, const Codec & codec, size_t start_channel=0)
Status Save (const std::string & file_path) const
WaveletImage (size_t channel_number, size_t w, size_t h)
WaveletImage (WaveletParameters parameters)
WaveletImage (Buffer buffer)
Buffer & buffer ()
const Buffer & const_buffer () const
~WaveletImage ()

Public Static Functions

Type Name
std::unique_ptr< WaveletImage > Load (const std::string & file_path)

Detailed Description

A class to load/save images of different formats and store them as list of wavelet subbands

Public Types Documentation

typedef Buffer

using drift::img::WaveletImage::Buffer =  WaveletBuffer;

typedef Codec

using drift::img::WaveletImage::Codec =  IImageCodec;

typedef Denoiser

using drift::img::WaveletImage::Denoiser =  DenoiseAlgorithm<DataType>;

enum Status

enum drift::img::WaveletImage::Status {
    kOk = 0,
    kWrongSize = 1,
    kDecompositionError = 2,
    kCompositionError = 3,
    kIOError = 4,
    kWrongData = 5
};

Statuses for error handling

Public Functions Documentation

function CompareTo

double drift::img::WaveletImage::CompareTo (
    const WaveletImage & other
) const

Compares to another image

Parameters:

  • other

Returns:

distance value 0 both images the same, 1 both buffers absolutely different

function ExportToFile

Status drift::img::WaveletImage::ExportToFile (
    const std::string & file_path,
    const Codec & codec,
    size_t start_channel=0
) const

Exports an image to a file

Parameters:

  • file_path the path to he file
  • image_type the image type

Returns:

function ExportToString

Status drift::img::WaveletImage::ExportToString (
    std::string * data,
    const Codec & codec,
    size_t start_channel=0
) const

Exports an image to a string blob

Parameters:

  • data the blob
  • image_type the image type

Returns:

function ImportFromFile

Status drift::img::WaveletImage::ImportFromFile (
    const std::string & file_path,
    const Denoiser & denoiser,
    const Codec & codec,
    size_t start_channel=0
) 

Imports an image from a file

Parameters:

  • file_path the path to he file
  • image_type the image type

Returns:

function ImportFromString

Status drift::img::WaveletImage::ImportFromString (
    const std::string & data,
    const Denoiser & denoiser,
    const Codec & codec,
    size_t start_channel=0
) 

Imports an image from a string blob

Parameters:

  • data the blob
  • image_type the image type

Returns:

function Save

Status drift::img::WaveletImage::Save (
    const std::string & file_path
) const

Saves an image to a binary archive

Parameters:

  • file_path the path to the archive

Returns:

function WaveletImage [1/3]

drift::img::WaveletImage::WaveletImage (
    size_t channel_number,
    size_t w,
    size_t h
) 

Creates a wavelet image without wavlete compression

Parameters:

  • w
  • h

function WaveletImage [2/3]

explicit drift::img::WaveletImage::WaveletImage (
    WaveletParameters parameters
) 

Creates an empty image

Parameters:

  • parameters Parameters fo wavelet decomposition

function WaveletImage [3/3]

explicit drift::img::WaveletImage::WaveletImage (
    Buffer buffer
) 

Creates an image from WaveletBuffer

function buffer

Buffer & drift::img::WaveletImage::buffer () 

function const_buffer

const Buffer & drift::img::WaveletImage::const_buffer () const

function ~WaveletImage

drift::img::WaveletImage::~WaveletImage () 

Destructor

Public Static Functions Documentation

function Load

static std::unique_ptr< WaveletImage > drift::img::WaveletImage::Load (
    const std::string & file_path
) 

Loads and creates an image from a binary archive

Parameters:

  • file_path the path to the archive

Returns:

nullptr if it failed to creates an image


The documentation for this class was generated from the following file wavelet_buffer/img/wavelet_image.h