Class MRP

java.lang.Object
   |
   +----framework.ModuleData
           |
           +----MRP

class MRP
extends ModuleData
The Multi Resolution Pyramid is a data structure that exists of a pyramid of pictures. The first layer of the pyramid contains the original picture, the second contains the same picture but it is half the size of the first, etc. The next variable of this class contains a reference to the next layer of the MRP. In the last layer the value of the pyramid the next variable is null.

Version:
$Revision: 1.15 $
See Also:
Data

Variable Index

 o next
The reference to the next layer of the Multi Resolution Pyramid (if any).
 o Screen
The picture in this layer of the Multi Resolution Pyramid.
 o x_resolution
 o y_resolution

Constructor Index

 o MRP()

Method Index

 o ()
 o display(String, String)
Display the Multi Resulution Pyramid in a display window.
 o getByteLength()
 o getLayer(int)
This method returns a reference to a layer number of the pyramid.
 o getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.
 o getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.
 o getXResolution()
Get the width of the picture in this layer of the Multi Resolution Pyramid.
 o getYResolution()
Get the height of the picture in this layer of the Multi Resolution Pyramid.
 o load(String)
Load the MRP data from disk.
 o main(String[])
 o makeLayer(int, int)
Make a new layer for the MRP.
 o nativeLoad(String)
A C function that reads MRP data from disk and stores it in the MRP data structure.
 o nativeSave(String)
A C function that saves MRP data from the MRP data structure to disk.
 o printMRP(MRP)
Print the complete Multi Resolution Pyramid, all layers plus sizes of those pyramids.
 o save(String)
Save the MRP data to disk.
 o setNextNull()
Set the next reference of the current MRP object to zero.
 o toString()

Variables

 o x_resolution
 private int x_resolution
 o y_resolution
 private int y_resolution
 o Screen
 public byte Screen[][]
The picture in this layer of the Multi Resolution Pyramid.

 o next
 MRP next
The reference to the next layer of the Multi Resolution Pyramid (if any).

Constructors

 o MRP
 MRP()

Methods

 o makeLayer
 void makeLayer(int width,
                int height)
Make a new layer for the MRP. Allocate memory for the Screen array and initialise the size of the picture.

See Also:
Screen
 o getXResolution
 public int getXResolution()
Get the width of the picture in this layer of the Multi Resolution Pyramid.

 o getYResolution
 public int getYResolution()
Get the height of the picture in this layer of the Multi Resolution Pyramid.

 o setNextNull
 public void setNextNull()
Set the next reference of the current MRP object to zero. This method is called from native code when the MRP structure is created.

 o getByteLength
 public int getByteLength()
 o getLoadTags
 protected String[] getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.

Overrides:
getLoadTags in class ModuleData
 o getSaveTags
 protected String[] getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.

Overrides:
getSaveTags in class ModuleData
 o load
 public void load(String filename) throws FileNotFoundException, IOException
Load the MRP data from disk. Uses the 'native' C routine nativeLoad to load the MRP data from disk into the java MRP data structure.

Overrides:
load in class ModuleData
See Also:
nativeLoad, MRP
 o save
 public void save(String filename) throws FileNotFoundException, IOException
Save the MRP data to disk. Uses the 'native' C routine nativeSave to save the MRP data from the java MRP data structure to disk.

Overrides:
save in class ModuleData
See Also:
nativeSave, MRP
 o nativeLoad
 public native boolean nativeLoad(String filename) throws FileNotFoundException, IOException
A C function that reads MRP data from disk and stores it in the MRP data structure. The C function was provided by Piet de Bondt's gif2mrp module. It can be found in the library libGrey2MRP.so.

 o nativeSave
 public native boolean nativeSave(String filename) throws FileNotFoundException, IOException
A C function that saves MRP data from the MRP data structure to disk. The C function was provided by Piet de Bondt's mrp2rfm module. It can be found in the library libGrey2MRP.so.

 o
 static void ()
 o getLayer
 public MRP getLayer(int pyramidLayerNr)
This method returns a reference to a layer number of the pyramid. That layer is identified by it's number; layer 0: top layer (biggest), layer 1: next layer (half in size) etc..

 o printMRP
 public static void printMRP(MRP current)
Print the complete Multi Resolution Pyramid, all layers plus sizes of those pyramids.

 o display
 public DataVisualisation display(String title,
                                  String filename)
Display the Multi Resulution Pyramid in a display window.

Overrides:
display in class ModuleData
 o toString
 public String toString()
Overrides:
toString in class Object
 o main
 public static void main(String args[])