jpiv2
Class VecImg

java.lang.Object
  extended by jpiv2.VecImg

public class VecImg
extends java.lang.Object

Pixel image representing vector data. This class provides some methods for displaying vector data as pixel images. The data needs to be organized as described in detail at @see jpiv2.PivData.


Constructor Summary
VecImg(JPiv jpiv, java.lang.String pathname)
          Creates a new instance of VecImg
 
Method Summary
 void drawIntoVectorGraphicsFile(java.lang.String filename, java.lang.String format)
          Export the vector plot in a vector based format like eps, pdf, svg etc.
 javax.media.jai.PlanarImage getAsPlanarImage()
          Returns the data as a Planar Image
 java.lang.String getFilename()
          Returns the name of the data file.
 PivData getPivData()
          Get the PIV data.
 double[] getVectorAt(int x, int y)
          Get the vector at a point x, y.
 void setShapeList(java.util.ArrayList<java.awt.Shape> shapeList)
          Copy a list of shapes into the VecImg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VecImg

public VecImg(JPiv jpiv,
              java.lang.String pathname)
Creates a new instance of VecImg

Parameters:
jpiv - The parent component.
pathname - The pathname of the UTF-8 file containing vector data.
Method Detail

getAsPlanarImage

public javax.media.jai.PlanarImage getAsPlanarImage()
Returns the data as a Planar Image

Returns:
The PlanarImage.

drawIntoVectorGraphicsFile

public void drawIntoVectorGraphicsFile(java.lang.String filename,
                                       java.lang.String format)
Export the vector plot in a vector based format like eps, pdf, svg etc.

Parameters:
filename - the filename
format - one of the following format strings: "eps", "pdf", "svg", "emf", or "swf"

getFilename

public java.lang.String getFilename()
Returns the name of the data file.

Returns:
The filename (not the pathname).

getVectorAt

public double[] getVectorAt(int x,
                            int y)
Get the vector at a point x, y. Gets the vector that is closest to a given point x, y.

Parameters:
x - The x coordinate in pixel (zero at upper left corner).
y - The y coordinate in pixel (zero at upper left corner).
Returns:
A single line of the PIV data.

getPivData

public PivData getPivData()
Get the PIV data.

Returns:
The data.

setShapeList

public void setShapeList(java.util.ArrayList<java.awt.Shape> shapeList)
Copy a list of shapes into the VecImg. The shapes are drawn at the next call of getAsPlanarImage() or drawIntoVectorGraphicsFile().

Parameters:
shapeList - A list of shapes.