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
-
next
- The reference to the next layer of the Multi Resolution Pyramid (if any).
-
Screen
- The picture in this layer of the Multi Resolution Pyramid.
-
x_resolution
-
-
y_resolution
-
-
MRP()
-
-
()
-
-
display(String, String)
- Display the Multi Resulution Pyramid in a display window.
-
getByteLength()
-
-
getLayer(int)
- This method returns a reference to a layer number of the pyramid.
-
getLoadTags()
- Define the valid extensions that files of this data type may use
when loading data from disk.
-
getSaveTags()
- Define the valid extensions that files of this data type may use
when saving data to disk.
-
getXResolution()
- Get the width of the picture in this layer of the Multi Resolution
Pyramid.
-
getYResolution()
- Get the height of the picture in this layer of the Multi Resolution
Pyramid.
-
load(String)
- Load the MRP data from disk.
-
main(String[])
-
-
makeLayer(int, int)
- Make a new layer for the MRP.
-
nativeLoad(String)
- A C function that reads MRP data from disk and stores it in the MRP
data structure.
-
nativeSave(String)
- A C function that saves MRP data from the MRP data structure to disk.
-
printMRP(MRP)
- Print the complete Multi Resolution Pyramid, all layers plus sizes of
those pyramids.
-
save(String)
- Save the MRP data to disk.
-
setNextNull()
- Set the next reference of the current MRP object to zero.
-
toString()
-
x_resolution
private int x_resolution
y_resolution
private int y_resolution
Screen
public byte Screen[][]
- The picture in this layer of the Multi Resolution Pyramid.
next
MRP next
- The reference to the next layer of the Multi Resolution Pyramid (if any).
MRP
MRP()
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
getXResolution
public int getXResolution()
- Get the width of the picture in this layer of the Multi Resolution
Pyramid.
getYResolution
public int getYResolution()
- Get the height of the picture in this layer of the Multi Resolution
Pyramid.
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.
getByteLength
public int getByteLength()
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
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
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
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
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.
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.
static void ()
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..
printMRP
public static void printMRP(MRP current)
- Print the complete Multi Resolution Pyramid, all layers plus sizes of
those pyramids.
display
public DataVisualisation display(String title,
String filename)
- Display the Multi Resulution Pyramid in a display window.
- Overrides:
- display in class ModuleData
toString
public String toString()
- Overrides:
- toString in class Object
main
public static void main(String args[])