Class HTPconfig

java.lang.Object
  extended by HTPconfig

public class HTPconfig
extends java.lang.Object

HTPconfig
Contains all methods related to reading the configuration files and returning the contained information in appropriate data structures.


Constructor Summary
HTPconfig()
           
 
Method Summary
 java.util.Hashtable<java.lang.String,java.lang.Integer> getClass2Number(java.lang.String filename)
          Reads the class2number configuration files into a Hashtable.
 java.util.Hashtable<java.lang.String,java.util.ArrayList<int[]>> getColor2Class(java.lang.String filename)
          Reads the color2class configuration files into a Hashtable.
 java.util.Hashtable<java.lang.Integer,java.lang.Integer> getNumber2Color(java.lang.String filename)
          Reads the number2color configuration files into a Hashtable.
 java.util.ArrayList<java.util.Hashtable<java.lang.String,java.lang.String>> getRegions(java.lang.String filename)
          Reads the regions configuration files.
 double[] getScaling(java.lang.String filename)
          Reads the scaling number from the given scaling configuration files.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTPconfig

public HTPconfig()
Method Detail

getScaling

public double[] getScaling(java.lang.String filename)
Reads the scaling number from the given scaling configuration files.

Parameters:
filename - A String containing a file name from which to obtain the scaling information.
Returns:
An Array containing a measured lengths in pixel and in millimetre.

getColor2Class

public java.util.Hashtable<java.lang.String,java.util.ArrayList<int[]>> getColor2Class(java.lang.String filename)
Reads the color2class configuration files into a Hashtable.

Parameters:
filename - A String containing a file name from which to obtain the colour informations.
Returns:
A Hashtable containing an ArrayList with the colour ranges in RGB and HSV for each class.

getClass2Number

public java.util.Hashtable<java.lang.String,java.lang.Integer> getClass2Number(java.lang.String filename)
Reads the class2number configuration files into a Hashtable.

Parameters:
filename - A String containing a file name from which to obtain the class to number mapping information.
Returns:
A Hashtable containing the classification number for each class. The translation process is as follows:
pixel with colour values --> classification into class named c --> mapped to a number n --> mapped to a color in the final image

getNumber2Color

public java.util.Hashtable<java.lang.Integer,java.lang.Integer> getNumber2Color(java.lang.String filename)
Reads the number2color configuration files into a Hashtable.

Parameters:
filename - A String containing a file name from which to obtain the number to colour mapping information.
Returns:
A Hashtable containing the colour values (hexadecimal RGB) for each class.

getRegions

public java.util.ArrayList<java.util.Hashtable<java.lang.String,java.lang.String>> getRegions(java.lang.String filename)
Reads the regions configuration files. The regions are areas of limited class appearance.

Parameters:
filename - A String containing a file name from which to obtain the region information.
Returns:
A Hashtable containing the region information.