|
|||||||||
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
uk.ac.ed.ph.signal.Image
public class Image
General class to handle images, always called via the extending classes of RealImage and ComplexImage
Field Summary | |
---|---|
protected DataArray |
data
The data array that hold the actual data |
protected Statistics |
statistics
The Image statistics |
Fields inherited from class uk.ac.ed.ph.signal.Grid2d |
---|
height, width |
Fields inherited from class javax.vecmath.Tuple2d |
---|
x, y |
Constructor Summary | |
---|---|
protected |
Image()
Default constructor to do nothing but setup the underlying class |
protected |
Image(Image s)
Setup image size and sample parameters from speficied image, but do not allocate array. |
protected |
Image(int w,
int h)
Setup image of size w by h, but do not allocated DataArray. |
Method Summary | |
---|---|
void |
add(Image s)
Method to add a specified Image to the current Image, both must be the same size. |
void |
add(int i,
int j,
double a)
Add a value to a pixel |
void |
add(javax.vecmath.Point2i p,
double a)
Add a value to a pixel |
void |
centreFourier()
Method to take the Centre Fourier tranform of the data and also set the underlying sampling |
void |
conjugate()
Method to take conjugate of the whole Image If data is real this call is ignored. |
void |
conjugate(int i,
int j)
Method to form the Complex conjugate of an element. |
void |
conjugate(javax.vecmath.Point2i p)
Method to form the Complex conjugate of an element. |
void |
fill(Surface s)
Method to fill the image with a Surface |
void |
fourier()
Method to take the Fourier tranform of the data and also set the underlying sampling |
Complex |
getComplex(int i,
int j)
Method to get a Complex data point |
Complex |
getComplex(javax.vecmath.Point2i p)
Method to get a Complex data point |
int |
getConversion()
Method to get the current complex to real conversion flag |
double[] |
getDataBuffer()
Method to get the underlying data buffer as a one-dimensional array of double[] |
double |
getDouble(int i,
int j)
Method to get a double pixel value |
double |
getDoubleValue(int i,
int j,
int flag)
Method to get a from Complex data type with conversion to a double given by the control flag |
int |
getSpace()
Methdo to get the Space |
String |
getTitle()
Method Get the title |
String |
getType()
Method to get the type |
void |
mult(Complex c)
Method to multiply the whole Image by a Complex. |
void |
mult(double a)
Method to muliply the whole Image by a scalar |
void |
mult(double a,
double b)
Method to multiply the whole Image by a complex specifed as two doubles. |
void |
mult(Image s)
Method to multiply the current Image by a specified Image which must be of the same size, the result overwriting the contents of the current Image. |
void |
mult(int i,
int j,
Complex c)
Multiply a pixel by a Complex |
void |
mult(int i,
int j,
double a)
Multiply a pixel by a double |
void |
mult(javax.vecmath.Point2i p,
Complex c)
Multiply a pixel by a Complex |
void |
mult(javax.vecmath.Point2i p,
double a)
Multiply a pixel by a double |
void |
multConjugate(Image s)
Method to multiply the current Image by the Complex Conjugate of specified Image which must be of the same size the result overwriting the contents of the current Image. |
void |
setComplex(int i,
int j,
Complex c)
Method to set a pixel value with a complex. |
void |
setComplex(int i,
int j,
double a,
double b)
Method to set a pixel value with a complex given at two doubles |
void |
setComplex(javax.vecmath.Point2i p,
Complex c)
Method to set a pixel value with a complex |
void |
setComplex(javax.vecmath.Point2i p,
double a,
double b)
Method to set a pixel value with a complex given at two doubles |
void |
setConversion(int flag)
Method to set the default conversion flag |
void |
setDouble(int i,
int j,
double value)
Method to set a pixel value with a double |
void |
setDouble(javax.vecmath.Point2i p,
double value)
Method to set a pixel value with a double |
void |
setStatisticsInvalid()
Method to set the statiscics invalid to force re-caalculation |
void |
setTitle(String t)
Method to set the title |
String |
toString()
Method to format the image information as a String |
boolean |
validStatistics()
Method to report if the statistic are valis |
Methods inherited from class uk.ac.ed.ph.signal.Grid2d |
---|
clone, getCentre, getDeltaX, getDeltaY, getHeight, getPoint, getPoint, getSample, getSamplePoint, getWidth, getXCentre, getXRange, getYCentre, getYRange, setCentre, setCentre, setHeight, setRange, setRange, setSampleGrid, setSampleGrid, setWidth |
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 |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Statistics statistics
protected DataArray data
Constructor Detail |
---|
protected Image()
protected Image(int w, int h)
protected Image(Image s)
Method Detail |
---|
public void setTitle(String t)
t
- the titlepublic String getTitle()
public int getSpace()
int
the space flagpublic String getType()
String
the typepublic double[] getDataBuffer()
public int getConversion()
public void setConversion(int flag)
flag
- the conversion flagpublic void setDouble(int i, int j, double value)
i
- primary locationj
- secondary locationvalue
- the pixel valuepublic void setDouble(javax.vecmath.Point2i p, double value)
p
- pixel locationvalue
- the pixel valuepublic double getDouble(int i, int j)
i
- primary locationj
- secondary location
double
the pixel valuepublic double getDoubleValue(int i, int j, int flag)
i
- primary locationj
- secondary locationflag
- conversion flagpublic void setComplex(int i, int j, double a, double b)
i
- primary locationj
- secondary locationa
- the real valueb
- the imaginary valuepublic void setComplex(int i, int j, Complex c)
i
- primary locationj
- secondary locationc
- the Complex valuepublic void setComplex(javax.vecmath.Point2i p, double a, double b)
p
- pixel locationa
- the real valueb
- the imaginary valuepublic void setComplex(javax.vecmath.Point2i p, Complex c)
p
- pixel locationc
- the Complex valuepublic Complex getComplex(int i, int j)
i
- primary indexj
- seconary index
Complex
Complex pixel valuepublic Complex getComplex(javax.vecmath.Point2i p)
p
- pixel location
Complex
Complex pixel valuepublic void add(int i, int j, double a)
i
- the i location.j
- the j location.a
- the value to be addedpublic void add(javax.vecmath.Point2i p, double a)
p
- the pixel point.a
- the value to be addedpublic void mult(int i, int j, double a)
i
- primary indexj
- seconary indexa
- the multiplierpublic void mult(javax.vecmath.Point2i p, double a)
p
- pixel locationa
- the multiplierpublic void mult(int i, int j, Complex c)
i
- primary indexj
- seconary indexc
- the multiplierpublic void mult(javax.vecmath.Point2i p, Complex c)
p
- pixel locationc
- the multiplierpublic void conjugate(int i, int j)
i
- the element indexj
- the eleemnt indexpublic void conjugate(javax.vecmath.Point2i p)
i
- the element indexj
- the eleemnt indexpublic void conjugate()
public void mult(double a)
a
- the scalarpublic void mult(double a, double b)
a
- the real partb
- the imaginary.public void mult(Complex c)
c
- the Complex multiplier.public void add(Image s)
This will work for all conbinations expect for current Signal being Real and specifed Image being Complex.
Internally this uses direct array access so it much more efficient than loops with setter/getters.
s
- the Signal to be added.public void mult(Image s)
This will work for all conbinations expect for current Signal being Real and specifed Image being Complex.
Internal this uses uses direct array access so it much more efficient than loops with setter/getters.
s
- the specified Signalpublic void multConjugate(Image s)
If the current or specifed DataArray(s) are real, then this method is identical
to mult(Signal)
s
- the Signal#mult(Signal)
public void fill(Surface s)
public boolean validStatistics()
public void setStatisticsInvalid()
public void fourier()
public void centreFourier()
public String toString()
toString
in class javax.vecmath.Tuple2d
String
image imformation String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |