Image Class Function Manual (J-L)

LOAD

| HOME | BACK |

Purpose

To load an Image object saved as Noobeed format.  There are 2 files needed.  One is for the documentation, and it is an ASCII file.  The other is a binary file containing data of the matrix. 

If file name extensions are omitted, the function will add default extensions to the files.  The default extension of the documentation file is ".txt" and that of the data file is ".raw".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

The detail structure of the documentation file is described in function "save".

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOAD({String} argm1, [{String} argm2])

argm1 = file name for the documentation file (default extension is ".txt")

argm2 = file name for the data file  

        (default file name is same file name as argm1 with an extension ".raw")

Example:

->A = Image()

->A.load("my_image")

->

See also (class function)

loadtif, loadbmp, loadasc, loadbin, save, savetif, savebmp, saveasc, savebin, vload, loadgeotif (Image_uch only)

| HOME | BACK |


LOADASC

| HOME | BACK |

Purpose

To read data from an ASCII file and stored in an Image object.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of an ASCII data file is ".txt".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

An example of an ASCII data file is as follows.

1    2   3

4    5   6

7    8   9

Here the data file has 3 lines.  This will generate a matrix with 3 rows.  Each line has 3 values, separated by at least one white space, a blank character.  Therefore, the matrix will have 3 columns. 

It is possible to have a comment line in the data file, by inserting a slash sign, "/", in front of a line.  Comment lines will not be read by the function.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOADASC({String} argm1)

argm1 = file name for the documentation file (default extension is ".txt")

Example:

->A = Image()

->A.loadasc("my_image_asc")

->

See also (class function)

loadtif, loadbmp, load, loadbin, save, savetif, savebmp, saveasc, savebin, vload, loadgeotif (Image_uch only)

| HOME | BACK |


LOADBIN

| HOME | BACK |

Purpose

To load data from a binary file and stored in a matrix object.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of a binary data file is ".raw".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

It should be noted that the number of bytes occupied by one single pixel, an element of a matrix, is governed by the data type of the calling matrix.  In this case a double precision number, thus 8 bytes per element.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOADBIN({String} argm1, {int} argm2, {int} argm3)

argm1 = file name for the binary file (default extension is ".raw")

argm2 = no of rows

argm3 = no of columns

Example:

->A = Image()

->A.loadbin("my_image_bin", 100, 200)

->

See also (class function)

loadtif, loadbmp, load, loadasc, save, savetif, savebmp, saveasc, savebin, vload, loadgeotif (Image_uch only)

| HOME | BACK |


LOADBMP

| HOME | BACK |

Purpose

To load data from a bitmap (BMP) file  and stored in an Image object.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of a bitmap file is ".bmp".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

This function requires that the data is of 8-bit and with no compression.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOADBMP({String} argm1)

argm1 = file name for the bitmap file (default extension is ".bmp")

Example:

->A = Image()

->A.loadbmp("my_image_bmp")

->

See also (class function)

loadtif, loadbbin, load, loadasc, save, savetif, savebmp, saveasc, savebin, vload, loadgeotif (Image_uch only)

| HOME | BACK |


LOADGEOTIF

| HOME | BACK |

Purpose

To load data from a GeoTIF file  and stored in an Image object.  GeoTIF format is only partially supported in Noobeed.  That is the lower left and upper right coordinates can be read from the GeoTIF header.  However, the map projection and datum definition are not imported to the image.  The user should extract the information by other means, and input it manually into the image.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of a bitmap file is ".tif".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

This function requires that the data is of 8-bit and with no compression.

Class

Image_uch

Usage

{void} object.LOADGEOTIF({String} argm1)

argm1 = file name for the bitmap file (default extension is ".tif")

Example:

->Img = Image_uch()

->Img.loadgeotif("my_geotif_image")

->

See also (class function)

loadtif

| HOME | BACK |


LOADPOINT

| HOME | BACK |

Purpose

To load data from a list of 3D x y z coordinates, stored as a VecPt3D object, then rasterize them on to the image.  The values being put in the image pixels is the z coordinates.

The spatial coverage of the image is automatically determined from the ranges of x y coordinates, and the function will initiate the image according to the determined information.  If a list of 3D point is supposed to be rasterized on an existing image, please use function "pointrast" instead.

Duplicated points are not checked by the function.  Points read after will overwrite points previously rasterized.

If file name extension of the x y z coordinate data file is of omitted, the function will add default extensions to the files.  The default extension is ".txt".

Unless the path name is given in the file name, the function will search for the files in the current working directory, defined by command "set path".

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOADPOINT({String} argm1, {int} argm2)

argm1 = x y z coordinates data file name (default extension is ".txt")

argm2 = resolution of the result image

Example:

->A = Image()

->A.loadpoint("spot_height", 20)

->

See also (class function)

pointras

| HOME | BACK |


LOADSURF

| HOME | BACK |

Purpose

To load an ASCII grid file generated by SURFER program into an Image.  The function expects the word "DSAA" in the first line.  If not found, an error message is reported.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOADSURF({String} argm1)

argm1 = ASCII grid file generated by SURFER (default extension is ".txt")

Example:

->A = Image()

->A.loadsurf("surfer_grid")

->

See also (class function)

loadpoint

| HOME | BACK |


LOADTIF

| HOME | BACK |

Purpose

To load data from a Tag Image File (TIF) file  and stored in an Image object.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of a bitmap file is ".tif".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

This function requires that the data is of 8-bit gray scale image and with no compression.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.LOADTIF({String} argm1)

argm1 = file name for the TIF file (default extension is ".tif")

Example:

->A = Image()

->A.loadbmp("my_image_tif")

->

See also (class function)

loadbbin, load, loadasc, save, savetif, savebmp, saveasc, savebin, vload, loadgeotif (Image_uch only)

| HOME | BACK |


LOOKUP

| HOME | BACK |

Purpose

To create a new Image whose values are from a lookup table value of the original Image, the calling Image.

Class

Imafe_int, Image_sht, Image_uch

Usage

{Image_uch} ret  =  object.LOOKUP({VecIndx} argm1)

argm1 = lookup table (first number is original value and second number is new values)

Example:

->Img_new = Img.lookup(vec_ind1)

->

See also (class function)

reassign, histmatch, reclass

| HOME | BACK |


LOWER_LEFT

| HOME | BACK |

Purpose

To report x y coordinate of the lower left corner of the image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{Pt2D} ret  =  object.LOWER_LEFT()

Example:

->pt1 = Img.lower_left()

->

See also (class function)

upper_right, res_x, res_y

| HOME | BACK |


LOWER_RIGHT

| HOME | BACK |

Purpose

To report x y coordinate of the lower right corner of the image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{Pt2D} ret  =  object.LOWER_RIGHT()

Example:

->pt1 = Img.lower_right()

->

See also (class function)

upper_right, res_x, res_y

| HOME | BACK |