|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MaskInterface
Method Summary | |
---|---|
MaskInterface |
clone()
Creates and returns a copy of this object. |
FloatImage |
getAsFloatImage(Template tem,
int w,
int h,
float min,
float max)
Constructs a FloatImage with values of 0 (masked) and max (not masked) |
double |
getBlur()
Gets the size of the Gaussian (or implementation specific) blur to apply to the mask |
javax.swing.filechooser.FileNameExtensionFilter |
getExt()
|
FloatImage |
maskImage(FloatImage img,
Template tem,
java.awt.Color col,
boolean reverse)
Masks an image using the template object specified/ |
java.awt.Image |
maskImage(java.awt.Image img,
Template tem,
java.awt.Color col,
boolean reverse)
Masks an image using the template object specified/ |
void |
paint(Template tem,
java.awt.Graphics g,
java.awt.Color col,
int xoff,
int yoff,
int width,
int height,
float zoom)
Paint the mask using the supplied Graphics component |
void |
paint(Template tem,
java.awt.Graphics g,
java.awt.Color col,
int xoff,
int yoff,
int width,
int height,
float zoom,
boolean invert)
Paint the mask using the supplied Graphics component, with option to invert the mask |
void |
read(java.io.File file)
Reads a mask from a file |
void |
setBlur(double blurLevel)
Sets the size of the Gaussian (or implementation specific) blur to apply to the mask The size specified as multiple applications of a Gaussian blur function |
void |
write(java.io.File file)
Writes the mask to a file |
Method Detail |
---|
MaskInterface clone()
void read(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
file
- The name of the mask file
java.io.FileNotFoundException
- thrown if file not found
java.io.IOException
- thrown if some other I/O errorvoid write(java.io.File file) throws java.io.IOException
fname
- the file to write to
java.io.IOException
FloatImage getAsFloatImage(Template tem, int w, int h, float min, float max)
min
- The values to draw outside the masked regionstem
- the template to apply the mask tow
- The width of the output mask imageh
- The height of the output mask imagemax
- The values to draw in the masked regions
void paint(Template tem, java.awt.Graphics g, java.awt.Color col, int xoff, int yoff, int width, int height, float zoom)
tem
- Template to form mask aroundg
- Graphics object to paint ontocol
- Colour to paint the maskxoff
- the x-offsetyoff
- the y-offsetzoom
- the zoomvoid paint(Template tem, java.awt.Graphics g, java.awt.Color col, int xoff, int yoff, int width, int height, float zoom, boolean invert)
tem
- Template to form mask aroundg
- Graphics object to paint ontocol
- Colour to paint the maskxoff
- the x-offsetyoff
- the y-offsetzoom
- the zoominvert
- will invert the mask if true.java.awt.Image maskImage(java.awt.Image img, Template tem, java.awt.Color col, boolean reverse)
img
- The image to masktem
- The template to usecol
- The colour to draw in the masked regionsreverse
- If true draw outside the polygon defined by the mask, otherwise draw inside
FloatImage maskImage(FloatImage img, Template tem, java.awt.Color col, boolean reverse)
img
- The floating point image to masktem
- The template to usecol
- The colour to draw in the masked regionsreverse
- If true draw outside the polygon defined by the mask, otherwise draw inside
javax.swing.filechooser.FileNameExtensionFilter getExt()
void setBlur(double blurLevel)
blurLevel
- double getBlur()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |