|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.glmorph.IO
public class IO
IO holds data for image morph and transforming i.e. image, template and triangulation
| Field Summary | |
|---|---|
protected java.awt.image.BufferedImage |
bpicture
the image as a BufferedImage |
protected int |
numTriangles
Number of triangles |
protected int |
numVertex
Number of vertices |
protected java.awt.Image |
picture
The image |
protected int |
pictureHeight
the height of the image |
protected int |
pictureWidth
The width of the image |
protected Template |
temp
The Template |
protected float[] |
textureX
x texture coord |
protected float[] |
textureY
y texture coord |
protected int[][] |
triangles
triangulation data |
protected float[] |
vertexX
x vertex |
protected float[] |
vertexY
y vertex |
| Constructor Summary | |
|---|---|
IO(java.awt.Component hm)
Constructor that takes a component |
|
| Method Summary | |
|---|---|
static boolean |
hasAlpha(java.awt.Image image)
This method returns true if the specified image has transparent pixels |
void |
loadImage(java.net.URL url)
Load the image from a URL |
void |
loadTemplate(java.net.URL url)
Load the Template from a URL |
java.awt.Image |
resizeImage(java.awt.Image img,
int w,
int h)
Resize the image |
void |
setImage(java.awt.Image img)
Set the image |
void |
setTemplate(Template temp)
Set the Template |
void |
stripTriangles()
Strip triangles that lie outside the image |
static java.awt.image.BufferedImage |
toBufferedImage(java.awt.Image image)
This method returns a buffered image with the contents of an image |
static java.nio.FloatBuffer |
toFloatImage(java.awt.image.BufferedImage bimg)
Convert an image to a FloatBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Image picture
protected java.awt.image.BufferedImage bpicture
protected Template temp
protected int pictureWidth
protected int pictureHeight
protected float[] textureX
protected float[] textureY
protected float[] vertexX
protected float[] vertexY
protected int numTriangles
protected int numVertex
protected int[][] triangles
| Constructor Detail |
|---|
public IO(java.awt.Component hm)
hm - the component to use| Method Detail |
|---|
public void setTemplate(Template temp)
temp - the template
public void loadTemplate(java.net.URL url)
throws java.io.IOException
url - the URL to load from
java.io.IOExceptionpublic void setImage(java.awt.Image img)
img - the imagepublic void loadImage(java.net.URL url)
url - the URL of the image
public java.awt.Image resizeImage(java.awt.Image img,
int w,
int h)
img - the imagew - the new widthh - the new height
public static java.nio.FloatBuffer toFloatImage(java.awt.image.BufferedImage bimg)
bimg - the image to convert
public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
image - the input image
public static boolean hasAlpha(java.awt.Image image)
image - the image to check
public void stripTriangles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||