|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.vecmath.Tuple2d
javax.vecmath.Point2d
uk.ac.ed.ph.signal.Grid2d
public class Grid2d
Class to implement a two dimensional regular grid used access Images using continuous variables.
Field Summary | |
---|---|
protected int |
height
|
protected int |
width
|
Fields inherited from class javax.vecmath.Tuple2d |
---|
x, y |
Constructor Summary | |
---|---|
Grid2d()
Default constructor, of width and height 0, and sample interval 1.0 |
|
Grid2d(Grid2d g)
Conststructor to setup a grid being the copy of the specified grid |
|
Grid2d(int width,
int height)
Constructor to setup Grid2d with sample interval of 1.0 and centre at 0,0 |
|
Grid2d(int width,
int height,
double delta)
Constructor to setup Grid2d with specfied grid |
|
Grid2d(int width,
int height,
double dx,
double dy)
Constructor to setup Grid2d with specified sample interval |
Method Summary | |
---|---|
Grid2d |
clone()
Method to return a clone of the current grid |
javax.vecmath.Point2d |
getCentre()
Method to get the centre (actually the super class) |
double |
getDeltaX()
Get the x sample internal |
double |
getDeltaY()
Get the y sample internal |
int |
getHeight()
Method to get the height |
javax.vecmath.Point2d |
getPoint(int i,
int j)
Method to get the real (double), location of a pixel located at i,j taking into account the centre and sampling intervals |
javax.vecmath.Point2d |
getPoint(javax.vecmath.Point2i p)
Method to get the real (double), location of a pixel located at i,j taking into account the centre and sampling intervals |
javax.vecmath.Point2i |
getSample(javax.vecmath.Point2d p)
Method to get the pixel location closest to the point specifed by x,y talking into account the centre and sampling internal. |
javax.vecmath.Point2d |
getSamplePoint(javax.vecmath.Point2d p)
Method to get the scaled sample location at as Point2d |
int |
getWidth()
Method to get the width |
double |
getXCentre()
Method to get the x location of the centre |
double |
getXRange()
get the horizontal range |
double |
getYCentre()
Method to get the y location of the centre |
double |
getYRange()
get the vertical range |
void |
setCentre(double x,
double y)
Method to set the centre |
void |
setCentre(javax.vecmath.Point2d c)
Method to set the centre |
void |
setHeight(int h)
Method to set the height |
void |
setRange(double range)
Method to set the sample interval by specifing the the range of the grid |
void |
setRange(double xRange,
double yRange)
Method to set the sample interval by specifing the the range of the grid |
void |
setSampleGrid(double delta)
Method to set the sample grid with one parameter |
void |
setSampleGrid(double dx,
double dy)
Method to set the sample grid |
void |
setWidth(int w)
Method to set the width |
Methods inherited from class javax.vecmath.Point2d |
---|
distance, distanceL1, distanceLinf, distanceSquared |
Methods inherited from class javax.vecmath.Tuple2d |
---|
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, epsilonEquals, equals, equals, get, getX, getY, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, sub, sub, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int width
protected int height
Constructor Detail |
---|
public Grid2d()
public Grid2d(int width, int height)
width
- the width in pixelsheight
- the height in pixelspublic Grid2d(int width, int height, double delta)
width
- the width in pixelsheight
- the height in pixelsdelta
- the sample grid in both x and y directionspublic Grid2d(int width, int height, double dx, double dy)
width
- the width of the gridheight
- the height of the griddx
- x sample intervaldy
- y sample internalpublic Grid2d(Grid2d g)
g
- the specifing Grid2dMethod Detail |
---|
public Grid2d clone()
clone
in class javax.vecmath.Tuple2d
Grid2d
clone of current Grid2d.public void setWidth(int w)
w
- the width in pixelspublic void setHeight(int h)
h
- the height in pixelspublic void setSampleGrid(double dx, double dy)
dx
- x sample intervaldy
- y sample intervalpublic void setSampleGrid(double delta)
delta
- x and y sample intervalpublic void setCentre(double x, double y)
x
- the x locationy
- the y location.public javax.vecmath.Point2d getCentre()
Point2d
the centrepublic void setCentre(javax.vecmath.Point2d c)
c
- the centrepublic double getXCentre()
public double getYCentre()
public int getWidth()
public int getHeight()
public double getDeltaX()
public double getDeltaY()
public void setRange(double xRange, double yRange)
xRange
- the x rangeyRange
- the y rangepublic void setRange(double range)
range
- the range in both x and y directionspublic double getXRange()
public double getYRange()
public javax.vecmath.Point2d getPoint(int i, int j)
i
- hozizontal pixel locationj
- versical pixel location
public javax.vecmath.Point2d getPoint(javax.vecmath.Point2i p)
p
- the pixel location
public javax.vecmath.Point2i getSample(javax.vecmath.Point2d p)
p
- the pointy
- the y location
Point2i
the pixel locationpublic javax.vecmath.Point2d getSamplePoint(javax.vecmath.Point2d p)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |