SourcePyramid.pm

Summary
SourcePyramid.pm
JOINCACHE::SourcePyramidStore all informations about a pyramid.
Constructors
newPyramid constructor.
loadAndCheckWe have to collect pyramid’s attributes’ values, parsing the XML file.
Getters - Setters
hasLevelPrecises if the provided level exists in the source pyramid.
getLevelReturns the JOINCACHE::SourceLevel object for the provided level ID.
getImageDirectoryReturns the image directory for the provided level, using JOINCACHE::SourceLevel::getDirImage.
getMaskDirectoryReturns the mask directory for the provided level, using JOINCACHE::SourceLevel::getDirMask.
isCompatible
getFormatCode
getBitsPerSample
getSamplesPerPixel
Export methods
exportForDebugReturns all source pyramid’s information.

JOINCACHE::SourcePyramid

Exporter
JOINCACHE::SourcePyramid

Store all informations about a pyramid.

Using

use JOINCACHE::SourcePyramid;

my $objPyr = JOINCACHE::SourcePyramid->new("/home/IGN/descriptors/SOURCE1.pyr");

Attributes

pyramidDescriptorstring - Absolute path to the source pyramid descriptor.
levelsJOINCACHE::SourceLevel hash - Used levels in the source pyramid.  Key is level’s ID.
formatCodestring - Format code of the source pyramid.
photometricstring - Photometrc of the source pyramid.
samplesperpixelinteger - Number of samples per pixel of the source pyramid.
compatibleboolean - Precise if this source pyramid is compatible with the final pyramid.  If the final pyramid is compatible with the source pyramid, we can make links.  We compare format, samplesperpixel, and photometric.
Summary
Constructors
newPyramid constructor.
loadAndCheckWe have to collect pyramid’s attributes’ values, parsing the XML file.
Getters - Setters
hasLevelPrecises if the provided level exists in the source pyramid.
getLevelReturns the JOINCACHE::SourceLevel object for the provided level ID.
getImageDirectoryReturns the image directory for the provided level, using JOINCACHE::SourceLevel::getDirImage.
getMaskDirectoryReturns the mask directory for the provided level, using JOINCACHE::SourceLevel::getDirMask.
isCompatible
getFormatCode
getBitsPerSample
getSamplesPerPixel
Export methods
exportForDebugReturns all source pyramid’s information.

Constructors

new

sub new

Pyramid constructor.  Bless an instance.  Checks and stores informations.

Parameters (list)

filestring - Absolute file path to the source pyramid’s descriptor (extension .pyr)

loadAndCheck

sub loadAndCheck

We have to collect pyramid’s attributes’ values, parsing the XML file.  We control values, in order to have the same as the final pyramid.  Returns FALSE if there is a problem to load or if source pyramid is not consistent with the final pyramid.

Parameters (list)

pyramidBE4::Pyramid - Final pyramid, to compare components

Getters - Setters

hasLevel

sub hasLevel

Precises if the provided level exists in the source pyramid.

Parameters (list)

levelIDstring - Identifiant of the asked level

getLevel

sub getLevel

Returns the JOINCACHE::SourceLevel object for the provided level ID.

Parameters (list)

levelIDstring - Identifiant of the asked level

getImageDirectory

sub getImageDirectory

Returns the image directory for the provided level, using JOINCACHE::SourceLevel::getDirImage.

Parameters (list)

levelIDstring - Identifiant of the asked level

getMaskDirectory

sub getMaskDirectory

Returns the mask directory for the provided level, using JOINCACHE::SourceLevel::getDirMask.

Parameters (list)

levelIDstring - Identifiant of the asked level

isCompatible

sub isCompatible

getFormatCode

sub getFormatCode

getBitsPerSample

sub getBitsPerSample

getSamplesPerPixel

sub getSamplesPerPixel

Export methods

exportForDebug

sub exportForDebug

Returns all source pyramid’s information.  Useful for debug.

Example

Object JOINCACHE::SourcePyramid :
    Descriptor : /home/ign/desc/ORTHO_RAW_LAMB93_D075-O.pyr
    Image components :
        Format code : TIFF_RAW_INT8
        Samples per pixel : 3
        Photometric : rgb
    Is NOT compatible with the final pyramid
    Number of levels : 20
sub new
Pyramid constructor.
sub loadAndCheck
We have to collect pyramid’s attributes’ values, parsing the XML file.
sub hasLevel
Precises if the provided level exists in the source pyramid.
sub getLevel
Returns the JOINCACHE::SourceLevel object for the provided level ID.
Describe a level in a pyramid.
sub getImageDirectory
Returns the image directory for the provided level, using JOINCACHE::SourceLevel::getDirImage.
sub getDirImage
sub getMaskDirectory
Returns the mask directory for the provided level, using JOINCACHE::SourceLevel::getDirMask.
sub getDirMask
sub isCompatible
sub getFormatCode
sub getBitsPerSample
sub getSamplesPerPixel
sub exportForDebug
Returns all source pyramid’s information.
Store all informations about a pyramid.
Close