Class FM

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

class FM
extends ModuleData
implements Data
The Feature Map is a data structure that contains the coordinates of the 7 different features that are used: Picture, Head, Symmetry line, Lines, Left Eye, Right Eye, Mouth, Nose. The following information is stored of all features: the x and y coordinate of the bottom-left corner and the x and y coordinate of the top-right corner.

Version:
$Revision: 1.15 $
See Also:
Data

Variable Index

 o feature
List of all feature coordinates.
 o featureNames
List of all feature names.
 o HEAD
 o LEFTEYE
 o LEFTEYEBROW
 o LINE
 o MOUTH
 o NOSE
 o observable
The observable object, or "data" in the model-view paradigm.
 o PICTURE
 o RIGHTEYE
 o RIGHTEYEBROW

Constructor Index

 o FM()

Method Index

 o copy()
 o display(String, String)
Display the Feature Maps.
 o fillFMPanel(Panel)
Fill the feature map panel.
 o getFeatureNames()
 o getFeatures()
 o getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.
 o getNrOfFeatures()
 o getObservable()
Get the feature map observable.
 o getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.
 o load(String)
Load the feature map from disk.
 o main(String[])
 o makeFeatures(int)
 o save(String)
Save the feature map to disk.
 o toString()

Variables

 o featureNames
 static final String featureNames[]
List of all feature names.

 o PICTURE
 static final int PICTURE
 o HEAD
 static final int HEAD
 o LINE
 static final int LINE
 o LEFTEYE
 static final int LEFTEYE
 o RIGHTEYE
 static final int RIGHTEYE
 o MOUTH
 static final int MOUTH
 o NOSE
 static final int NOSE
 o LEFTEYEBROW
 static final int LEFTEYEBROW
 o RIGHTEYEBROW
 static final int RIGHTEYEBROW
 o feature
 public int feature[][]
List of all feature coordinates. First index is for the feature number, the second for the 4 coordinates.

 o observable
 private FMObservable observable
The observable object, or "data" in the model-view paradigm. It represents the object that the application wants to have observed.

Constructors

 o FM
 FM()

Methods

 o getNrOfFeatures
 public int getNrOfFeatures()
 o getFeatures
 public int[][] getFeatures()
 o getFeatureNames
 public String[] getFeatureNames()
 o getObservable
 public FMObservable getObservable()
Get the feature map observable.

 o makeFeatures
 public void makeFeatures(int f)
 o copy
 public FM copy()
 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 feature map from disk. The original 'ReadFeatMap' function can be found in the fm_read.c file and is used in a.o. the rfm2cfm module of Piet de Bondt. It wasn't that big so I (Jos Vollering) converted it to java. (no loading of extra shared library).

Overrides:
load in class ModuleData
 o save
 public void save(String filename) throws FileNotFoundException, IOException
Save the feature map to disk. The original 'WriteFeatMap' function can be found in the fm_write.c file and is used in a.o. the rfm2cfm module of Piet de Bondt. It wasn't that big so I (Jos Vollering) converted it to java. (no loading of extra shared library).

Overrides:
save in class ModuleData
 o display
 public DataVisualisation display(String title,
                                  String filename)
Display the Feature Maps.

Overrides:
display in class ModuleData
 o fillFMPanel
 public void fillFMPanel(Panel panel)
Fill the feature map panel.

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