Pixel.pm

Summary
Pixel.pm
BE4::PixelStore all pixel’s intrinsic components.
PIXELDefine allowed values for attributes bitspersample, sampleformat, photometric and samplesperpixel.
DEFAULTDefine default values for attribute photometric.
Constructors
newPixel constructor.
Attributes’ testers
isSampleFormatTests if sample format value is allowed.
isBitsPerSampleTests if bits per sample value is allowed.
isPhotometricTests if photometric value is allowed.
isSamplesPerPixelTests if samples per pixel value is allowed.
Getters - Setters
getPhotometric
getSampleFormat
getBitsPerSample
getSamplesPerPixel
Export methods
exportForDebugReturns all pixel’s components.

BE4::Pixel

Exporter
BE4::Pixel

Store all pixel’s intrinsic components.

Using

use BE4::Pixel;

my $objC = BE4::Pixel->new({
    sampleformat => "uint",
    photometric => "rgb",
    samplesperpixel => 3,
    bitspersample => 8,
});

Attributes

photometricstring - Samples’ interpretation.
sampleformatstring - Sample format, type.
bitspersampleinteger - Number of bits per sample (the same for all samples).
samplesperpixelinteger - Number of channels.
Summary
PIXELDefine allowed values for attributes bitspersample, sampleformat, photometric and samplesperpixel.
DEFAULTDefine default values for attribute photometric.
Constructors
newPixel constructor.
Attributes’ testers
isSampleFormatTests if sample format value is allowed.
isBitsPerSampleTests if bits per sample value is allowed.
isPhotometricTests if photometric value is allowed.
isSamplesPerPixelTests if samples per pixel value is allowed.
Getters - Setters
getPhotometric
getSampleFormat
getBitsPerSample
getSamplesPerPixel
Export methods
exportForDebugReturns all pixel’s components.

PIXEL

my %PIXEL

Define allowed values for attributes bitspersample, sampleformat, photometric and samplesperpixel.

DEFAULT

my %DEFAULT

Define default values for attribute photometric.

Constructors

new

sub new

Pixel constructor.  Bless an instance.  Check and store attributes values.

Parameters (hash)

photometricstring - Samples’ interpretation.  Default value : “rgb”.
sampleformatstring - Sample format, type.
bitspersampleinteger - Number of bits per sample (the same for all samples).
samplesperpixelinteger - Number of channels.

Attributes’ testers

isSampleFormat

sub isSampleFormat

Tests if sample format value is allowed.

Parameters (list)

sampleformatstring - Sample format value to test

isBitsPerSample

sub isBitsPerSample

Tests if bits per sample value is allowed.

Parameters (list)

bitspersamplestring - Bits per sample value to test

isPhotometric

sub isPhotometric

Tests if photometric value is allowed.

Parameters (list)

photometricstring - Photometric value to test

isSamplesPerPixel

sub isSamplesPerPixel

Tests if samples per pixel value is allowed.

Parameters (list)

samplesperpixelstring - Samples per pixel value to test

Getters - Setters

getPhotometric

sub getPhotometric

getSampleFormat

sub getSampleFormat

getBitsPerSample

sub getBitsPerSample

getSamplesPerPixel

sub getSamplesPerPixel

Export methods

exportForDebug

sub exportForDebug

Returns all pixel’s components.  Useful for debug.

Example

Object BE4::Pixel :
     Bits per sample : 8
     Photometric : rgb
     Sample format : uint
     Samples per pixel : 1
my %PIXEL
Define allowed values for attributes bitspersample, sampleformat, photometric and samplesperpixel.
my %DEFAULT
Define default values for attribute photometric.
sub new
Pixel constructor.
sub isSampleFormat
Tests if sample format value is allowed.
sub isBitsPerSample
Tests if bits per sample value is allowed.
sub isPhotometric
Tests if photometric value is allowed.
sub isSamplesPerPixel
Tests if samples per pixel value is allowed.
sub getPhotometric
sub getSampleFormat
sub getBitsPerSample
sub getSamplesPerPixel
sub exportForDebug
Returns all pixel’s components.
Close