ImageAdapter class

Description

ImageAdapter is an abstract class that defines custom region-based
reading and writing of images in arbitrary image file formats. You can use classes that
inherit from the ImageAdapter interface with the
blockproc function to perform file-based block processing.

To write an Image Adapter class for a particular file format, you must be able to:

Query the size of the file on disk

Read a rectangular block of data from the file

To use this class, you must inherit from the ImageAdapter class. Type
the following syntax as the first line of your class definition
file:

classdef MyAdapter < ImageAdapter
...
end

Classes that inherit from ImageAdapter must implement the
readRegion and close methods to support basic
region-based reading of images. The optional writeRegion method allows for
incremental, region-based writing of images. Image Adapter classes that do not implement the
writeRegion method are read-only.

Properties

Image size, specified as a 2-element vector of positive integers [m
n], or a 3-element vector of positive integers [m n p],
where m is the number of rows, n is the number of
columns, and p is the number of channels of the image.

When you construct a new class that inherits from ImageAdapter,
set the ImageSize property in your class constructor.

Example: [1920 1080]

Attributes:

GetAccess

public

SetAccess

protected

Colormap — Colormap[] (default) | c-by-3 numeric matrix

Colormap for indexed images, specified as a c-by-3 numeric matrix
with values in the range [0, 1]. Each row of the matrix is a 3-element RGB triplet that
specifies the red, green, and blue components of a single color.

When you construct a new class that inherits from ImageAdapter,
set the Colormap property in your class constructor.

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic. By continuing to use this website, you consent to our use of cookies. Please see our Privacy Policy to learn more about cookies and how to change your settings.