|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectimagescience.image.Image
imagescience.image.FloatImage
public class FloatImage
An image containing up to 5D elements of type float
. Conversion of double-precision floating-point numbers in the set
methods is done simply by casting.
Constructor Summary | |
---|---|
FloatImage(Dimensions dims)
Dimensions constructor. |
|
FloatImage(Image image)
Copy constructor. |
|
FloatImage(Image image,
Borders borders)
Copy constructor that allows adding borders. |
|
FloatImage(ij.ImagePlus imageplus)
Wrapper constructor. |
Method Summary | |
---|---|
Image |
border(Borders borders)
Returns a bordered copy of this image. |
Image |
duplicate()
Duplicates this image. |
double |
get(Coordinates coords)
Returns the value of the image element at the given coordinates. |
void |
get(Coordinates coords,
double[] values)
Reads values in one dimension from the image into the array. |
void |
get(Coordinates coords,
double[][] values)
Reads values in two dimensions from the image into the array. |
void |
get(Coordinates coords,
double[][][] values)
Reads values in three dimensions from the image into the array. |
void |
get(Coordinates coords,
double[][][][] values)
Reads values in four dimensions from the image into the array. |
void |
get(Coordinates coords,
double[][][][][] values)
Reads values in all five dimensions from the image into the array. |
void |
get(Coordinates coords,
float[] values)
Reads values in one dimension from the image into the array. |
void |
get(Coordinates coords,
float[][] values)
Reads values in two dimensions from the image into the array. |
void |
get(Coordinates coords,
float[][][] values)
Reads values in three dimensions from the image into the array. |
void |
get(Coordinates coords,
float[][][][] values)
Reads values in four dimensions from the image into the array. |
void |
get(Coordinates coords,
float[][][][][] values)
Reads values in all five dimensions from the image into the array. |
ij.ImagePlus |
imageplus()
Returns this image in the form of an ImagePlus object. |
int |
memory()
Returns the amount of memory occupied by the image data. |
void |
mirror(Borders borders)
Sets the image elements in the borders by mirroring the remainder of the image. |
void |
set(Borders borders,
double value)
Sets every image element in the borders to the given value. |
void |
set(Coordinates coords,
double value)
Sets the image element at the given coordinates to the given value. |
void |
set(Coordinates coords,
double[] values)
Writes values in one dimension from the array into the image. |
void |
set(Coordinates coords,
double[][] values)
Writes values in two dimensions from the array into the image. |
void |
set(Coordinates coords,
double[][][] values)
Writes values in three dimensions from the array into the image. |
void |
set(Coordinates coords,
double[][][][] values)
Writes values in four dimensions from the array into the image. |
void |
set(Coordinates coords,
double[][][][][] values)
Writes values in all five dimensions from the array into the image. |
void |
set(Coordinates coords,
float[] values)
Writes values in one dimension from the array into the image. |
void |
set(Coordinates coords,
float[][] values)
Writes values in two dimensions from the array into the image. |
void |
set(Coordinates coords,
float[][][] values)
Writes values in three dimensions from the array into the image. |
void |
set(Coordinates coords,
float[][][][] values)
Writes values in four dimensions from the array into the image. |
void |
set(Coordinates coords,
float[][][][][] values)
Writes values in all five dimensions from the array into the image. |
void |
set(double value)
Sets every image element to the given value. |
java.lang.String |
type()
Returns the image type. |
Methods inherited from class imagescience.image.Image |
---|
absolute, add, add, aspects, aspects, axes, axes, create, dimensions, divide, divide, elements, extrema, id, invert, maximum, minimum, multiply, multiply, name, name, power, square, squareroot, subtract, subtract, wrap |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FloatImage(Dimensions dims)
dims
- The dimensions of the new image.
java.lang.NullPointerException
- If dims
is null
.public FloatImage(ij.ImagePlus imageplus)
imageplus
- The ImagePlus
object whose image data is to be wrapped. The actual image data is not copied but shared.
java.lang.IllegalArgumentException
- If the image elements of imageplus
are not of type float
.
java.lang.NullPointerException
- If imageplus
is null
.public FloatImage(Image image)
image
- The image to copy from. Image element values are copied using a get
method of the given image and the corresponding set
method of this image. This enables copying from images that are of different type than this image. Be aware, however, of the value conversion rules of the respective methods when copying from images that are not of the same type as this image.
java.lang.NullPointerException
- If image
is null
.public FloatImage(Image image, Borders borders)
image
- The image to copy from. Image element values are copied using a get
method of the given image and the corresponding set
method of this image, taking into account the new border sizes. This enables copying from images that are of a different type than this image. Be aware, however, of the value conversion rules of the respective methods when copying from images that are not of the same type as this image.borders
- Specifies the border size in each dimension of the new image.
java.lang.NullPointerException
- If any of the parameters is null
.Method Detail |
---|
public Image border(Borders borders)
Image
border
in class Image
borders
- Specifies the border size in each dimension.
public ij.ImagePlus imageplus()
Image
ImagePlus
object.
imageplus
in class Image
ImagePlus
object of this Image
object. The two objects share the actual image data.public java.lang.String type()
Image
type
in class Image
String
contains the fully qualified name of the subclass which this image is an object of.public int memory()
Image
memory
in class Image
public Image duplicate()
Image
duplicate
in class Image
Image
object that is an exact copy of this object. All information is copied and no memory is shared between this and the returned object.public double get(Coordinates coords)
Image
get
in class Image
coords
- The coordinates of the image element whose value is to be obtained. Coordinates must be within the range determined by the image dimensions. For consistency with the other get
methods, none of the Cartesian coordinate axes should be active. However, this condition is not strictly necessary in order for this method to behave unambiguously and is therefore not checked, so as to increase efficiency.
public void get(Coordinates coords, double[] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinate corresponding to the active axis is allowed to be outside the range determined by the image size in the corresponding dimension. Out-of-range positions in the active dimension are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, double[][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, double[][][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, double[][][][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, double[][][][][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. Coordinates are allowed to be outside the range determined by the image size. Out-of-range positions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, float[] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinate corresponding to the active axis is allowed to be outside the range determined by the image size in the corresponding dimension. Out-of-range positions in the active dimension are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, float[][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, float[][][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, float[][][][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually read but simply skipped.values
- The array to which the image values are copied.public void get(Coordinates coords, float[][][][][] values)
Image
get
in class Image
coords
- The coordinates of the starting position in the image for reading image values into the array. Coordinates are allowed to be outside the range determined by the image size. Out-of-range positions are not actually read but simply skipped.values
- The array to which the image values are copied.public void set(double value)
Image
set
in class Image
value
- The value to which every image element is to be set.public void mirror(Borders borders)
Image
mirror
in class Image
borders
- Specifies the size of the border in each dimension.public void set(Borders borders, double value)
Image
set
in class Image
borders
- Specifies the size of the border in each dimension.value
- The value to which every border element is to be set.public void set(Coordinates coords, double value)
Image
set
in class Image
coords
- The coordinates of the image element to be set. Coordinates must be within the range determined by the image size. For consistency with the other set
methods, none of the Cartesian coordinate axes should be active. However, this condition is not strictly necessary in order for this method to behave unambiguously and is therefore not checked, so as to increase efficiency.value
- The value to which the image element is to be set.public void set(Coordinates coords, double[] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinate corresponding to the active axis is allowed to be outside the range determined by the image size in the corresponding dimension. Out-of-range positions in the active dimension are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, double[][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, double[][][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, double[][][][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, double[][][][][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. Coordinates are allowed to be outside the range determined by the image size. Out-of-range positions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, float[] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinate corresponding to the active axis is allowed to be outside the range determined by the image size in the corresponding dimension. Out-of-range positions in the active dimension are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, float[][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, float[][][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, float[][][][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. The coordinates corresponding to the active axes are allowed to be outside the range determined by the image size in the corresponding dimensions. Out-of-range positions in the active dimensions are not actually written but simply skipped.values
- The array from which values are copied to the image.public void set(Coordinates coords, float[][][][][] values)
Image
set
in class Image
coords
- The coordinates of the starting position in the image for writing values into the image. Coordinates are allowed to be outside the range determined by the image size. Out-of-range positions are not actually written but simply skipped.values
- The array from which values are copied to the image.
|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) Erik Meijering. Permission to use this software and corresponding documentation for educational, research, and not-for-profit purposes, without a fee and without a signed licensing agreement, is granted, subject to the following terms and conditions.
IT IS NOT ALLOWED TO REDISTRIBUTE, SELL, OR LEASE THIS SOFTWARE, OR DERIVATIVE WORKS THEREOF, WITHOUT PERMISSION IN WRITING FROM THE COPYRIGHT HOLDER. THE COPYRIGHT HOLDER IS FREE TO MAKE VERSIONS OF THE SOFTWARE AVAILABLE FOR A FEE OR COMMERCIALLY ONLY.
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OF ANY KIND WHATSOEVER, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND CORRESPONDING DOCUMENTATION IS PROVIDED "AS IS". THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.