java.lang.Object
uk.ac.manchester.tornado.api.types.images.ImageFloat
- All Implemented Interfaces:
Serializable,PrimitiveStorage<FloatBuffer>,TornadoImagesInterface<FloatBuffer>
ImageFloat relies on preview features of the Java platform:
ImageFloatrefers to one or more preview APIs:MemorySegment.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionImageFloat(float[][] matrix) ImageFloat(int width, int height) Storage format for matrix.ImageFloat(int width, int height, FloatArray array) Storage format for matrix. -
Method Summary
Modifier and TypeMethodDescriptionasBuffer()calculateULP(ImageFloat ref) voidclear()voidfill(float value) floatget(int i) floatget(int i, int j) returns the ith column of the jth row.getArray()longlongvoidloadFromBuffer(FloatBuffer buffer) floatmax()floatmean()floatmin()voidput(float[] array) static voidscale(ImageFloat image, float alpha) voidset(int i, float value) voidset(int i, int j, float value) sets the ith column of the jth row to value.voidset(ImageFloat m) intsize()floatstdDev()toString()intX()intY()
-
Constructor Details
-
ImageFloat
Storage format for matrix.- Parameters:
width- number of rowsheight- number of columnsarray- array reference which contains data
-
ImageFloat
public ImageFloat(int width, int height) Storage format for matrix.- Parameters:
width- number of rowsheight- number of columns
-
ImageFloat
public ImageFloat(float[][] matrix)
-
-
Method Details
-
scale
-
getArray
-
get
public float get(int i) -
set
public void set(int i, float value) -
get
public float get(int i, int j) returns the ith column of the jth row.- Parameters:
i- row indexj- column index- Returns:
- float
-
set
public void set(int i, int j, float value) sets the ith column of the jth row to value.- Parameters:
i- row indexj- column indexvalue- new value
-
put
public void put(float[] array) -
Y
public int Y() -
X
public int X() -
fill
public void fill(float value) -
duplicate
-
set
-
toString
-
toString
-
mean
public float mean() -
min
public float min() -
max
public float max() -
stdDev
public float stdDev() -
summerise
-
loadFromBuffer
- Specified by:
loadFromBufferin interfacePrimitiveStorage<FloatBuffer>
-
asBuffer
- Specified by:
asBufferin interfacePrimitiveStorage<FloatBuffer>
-
size
public int size()- Specified by:
sizein interfacePrimitiveStorage<FloatBuffer>
-
calculateULP
-
clear
public void clear() -
getNumBytes
public long getNumBytes()- Specified by:
getNumBytesin interfaceTornadoImagesInterface<FloatBuffer>
-
getNumBytesWithHeader
public long getNumBytesWithHeader()- Specified by:
getNumBytesWithHeaderin interfaceTornadoImagesInterface<FloatBuffer>
-
getSegment
- Specified by:
getSegmentin interfaceTornadoImagesInterface<FloatBuffer>
-
getSegmentWithHeader
- Specified by:
getSegmentWithHeaderin interfaceTornadoImagesInterface<FloatBuffer>
-
ImageFloatwhen preview features are enabled.