Class Mask
java.lang.Object
|
+----framework.ModuleData
|
+----Mask
- class Mask
- extends ModuleData
- implements Data
The Mask data structure contains convolution mask that can be used for
filtering images.
- See Also:
- ConvolutionModule
-
mask
- mask is an integer array that holds the mask that is used for
convolution.
-
x
- Horizontal size of mask
-
y
- Vertical size of mask
-
Mask()
-
-
display(String, String)
- Display the Mask in a dialog window.
-
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.
-
getX()
-
-
getY()
-
-
load(String)
- Load the Mask Data from disk.
-
main(String[])
-
-
makeMask(int, int)
- The method makeMask can be used to initialise the mask array
and the x and y variables
-
save(String)
- Save the Mask to disk.
-
setX(int)
-
-
setY(int)
-
-
toString()
-
x
private int x
- Horizontal size of mask
y
private int y
- Vertical size of mask
mask
byte mask[]
- mask is an integer array that holds the mask that is used for
convolution. The size of mask is defined by the vertical and
horizontal sizes x and y.
- See Also:
- x, y
Mask
Mask()
makeMask
public void makeMask(int x,
int y)
- The method makeMask can be used to initialise the mask array
and the x and y variables
- See Also:
- mask, x, y
getX
public int getX()
setX
public void setX(int x)
getY
public int getY()
setY
public void setY(int y)
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 Mask Data from disk. This method uses the StreamTokenizor, in
this case end of lines are ignored. The first two integers in the file
are considered to be the horizontal (x) and vertical (y) size of the
mask. The rest of the integers is the mask itself (x * y bytes).
- Overrides:
- load in class ModuleData
- See Also:
- x, y, mask
save
public void save(String filename) throws FileNotFoundException, IOException
- Save the Mask to disk. Both the load and the save function for
Mask Data are in the LCMModule library so that library is loaded when
this data type is used. The save function is called via the intermediate
C function nativeSave.
- Overrides:
- save in class ModuleData
- See Also:
- nativeSave
display
public DataVisualisation display(String title,
String filename)
- Display the Mask in a dialog window.
- Overrides:
- display in class ModuleData
toString
public String toString()
- Overrides:
- toString in class Object
main
public static void main(String args[])