Node.pm

Summary
Node.pm
JOINCACHE::NodeDescibe a node
Constructors
newNode constructor.
_initCheck and store node’s attributes values.
Getters - Setters
getColumn
getRow
getLevel
getPyramidName
getScript
writeInScriptWrite own code in the associated script.
setScript
getWorkBaseNameReturns the work image base name (no extension) : “level_col_row”, or “level_col_row_suffix” if defined.
getWorkNameReturns the work image name : “level_col_row.tif”, or “level_col_row_suffix.tif” if defined.
getSources
getSource
getSourcesNumber
addSource
setCode
getScriptID
Export methods
exportForOntConfExport attributes of the Node for overlayNtiff configuration file : /path/to/image.tif[ path/to/mask.tif].
exportForDebugReturns all image’s components.

JOINCACHE::Node

Exporter
JOINCACHE::Node

Descibe a node

Using

use JOINCACHE::Node

my $node = BE4::Node->new(51, 756, "12", 2);

Attributes

iinteger - Column
jinteger - Row
levelstring - Level’s identifiant
pyramidNamestring - Relative path of this node in the pyramid (generated from i,j).  Example : “00/12/L5.tif”
codestring - Commands to execute to generate this node (to write in a script)
scriptScript - Script in which the node will be generated
sourceshash array - Source images from which this node is generated.  One image source :
img - string - Absolute path to the image
msk - string - Absolute path to the associated mask (optionnal)
sourcePyramid - <JOINCACHE::SourcePyramid> - Pyramid which image belong to
Summary
Constructors
newNode constructor.
_initCheck and store node’s attributes values.
Getters - Setters
getColumn
getRow
getLevel
getPyramidName
getScript
writeInScriptWrite own code in the associated script.
setScript
getWorkBaseNameReturns the work image base name (no extension) : “level_col_row”, or “level_col_row_suffix” if defined.
getWorkNameReturns the work image name : “level_col_row.tif”, or “level_col_row_suffix.tif” if defined.
getSources
getSource
getSourcesNumber
addSource
setCode
getScriptID
Export methods
exportForOntConfExport attributes of the Node for overlayNtiff configuration file : /path/to/image.tif[ path/to/mask.tif].
exportForDebugReturns all image’s components.

Constructors

new

sub new

Node constructor.  Bless an instance.

Parameters (list)

iinteger - Node’s column
jinteger - Node’s row
levelstring - Node’s level ID
dirDepthinteger - Depth, to determine the base-36 path

See also

_init

_init

sub _init

Check and store node’s attributes values.  Initialize weights to 0.  Calculate the pyramid’s relative path, from indices, thanks to <Base36::indicesToB36Path>.

Parameters (list)

iinteger - Node’s column
jinteger - Node’s row
levelstring - Node’s level ID
dirDepthinteger - Depth, to determine the base-36 path

Getters - Setters

getColumn

sub getColumn

getRow

sub getRow

getLevel

sub getLevel

getPyramidName

sub getPyramidName

getScript

sub getScript

writeInScript

sub writeInScript

Write own code in the associated script.

Parameters (list)

additionnalTextstring - Optionnal, can be undefined, text to add after the own code.

setScript

sub setScript

Parameters (list)

scriptScript - Script to set.

getWorkBaseName

sub getWorkBaseName

Returns the work image base name (no extension) : “level_col_row”, or “level_col_row_suffix” if defined.

Parameters (list)

prefixstring - Optionnal, suffix to add to the work name

getWorkName

sub getWorkName

Returns the work image name : “level_col_row.tif”, or “level_col_row_suffix.tif” if defined.

Parameters (list)

prefixstring - Optionnal, suffix to add to the work name

getSources

sub getSources

getSource

sub getSource

Parameters (list)

indinteger - Index of the wanted source image

Returns A source image, as an hash :

img - string - Absolute path to the image
msk - string - Absolute path to the associated mask (optionnal)
sourcePyramid - <JOINCACHE::SourcePyramid> - Pyramid which image belong to

getSourcesNumber

sub getSourcesNumber

addSource

sub addSource

Parameters (list)

imagehash reference - Source images to add
img - string - Absolute path to the image
msk - string - Absolute path to the associated mask (optionnal)
sourcePyramid - <JOINCACHE::SourcePyramid> - Pyramid which image belong to

setCode

sub setCode

Parameters (list)

codestring - Code to set.

getScriptID

sub getScriptID

Export methods

exportForOntConf

sub exportForOntConf

Export attributes of the Node for overlayNtiff configuration file : /path/to/image.tif[ path/to/mask.tif].  Provided paths will be written as is, so can be relative or absolute (or use environment variables).

Parameters (list)

imagePathstring - Path to the image, have to be defined
maskPathstring - Path to the associated mask, can be undefined

exportForDebug

sub exportForDebug

Returns all image’s components.  Useful for debug.

Example

sub new
Node constructor.
sub _init
Check and store node’s attributes values.
sub getColumn
sub getRow
sub getLevel
sub getPyramidName
sub getScript
sub writeInScript
Write own code in the associated script.
sub setScript
sub getWorkBaseName
Returns the work image base name (no extension) : “level_col_row”, or “level_col_row_suffix” if defined.
sub getWorkName
Returns the work image name : “level_col_row.tif”, or “level_col_row_suffix.tif” if defined.
sub getSources
sub getSource
sub getSourcesNumber
sub addSource
sub setCode
sub getScriptID
sub exportForOntConf
Export attributes of the Node for overlayNtiff configuration file : /path/to/image.tif[ path/to/mask.tif].
sub exportForDebug
Returns all image’s components.
Describe a script, allowed to write in.
Close