|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectimagescience.utility.I5DResource
public class I5DResource
Provides Image5D utility methods. Use of this class requires the Image5D package to be installed.
Field Summary | |
---|---|
static int |
COLOR
The color displaying mode. |
static int |
GRAY
The gray-scale displaying mode. |
static int |
OVERLAY
The overlay displaying mode. |
static int |
TILED
The tiled displaying mode. |
Constructor Summary | |
---|---|
I5DResource()
Default constructor. |
Method Summary | |
---|---|
static ij.ImagePlus |
convert(ij.ImagePlus image,
boolean properties)
Converts an image to an Image5D object. |
static ij.measure.Calibration |
density(ij.ImagePlus image,
int channel)
Returns the density calibration of a specific channel of an image. |
static boolean |
instance(ij.ImagePlus image)
Indicates whether an image is an instance of Image5D . |
static void |
minmax(ij.ImagePlus image,
double min,
double max)
Sets the minimum and maximum displayed value of all channels of an image. |
static void |
mode(ij.ImagePlus image,
int mode)
Sets the displaying mode of an image. |
static void |
nocolor(ij.ImagePlus image)
Disables the color model of all channels of an image. |
static void |
nodensity(ij.ImagePlus image)
Disables the density calibration of all channels of an image. |
static int |
position(ij.ImagePlus image,
int dimension)
Returns the current position of an image in a specific dimension. |
static void |
position(ij.ImagePlus image,
int dimension,
int position)
Sets the position of an image in a specific dimension. |
static void |
position(ij.ImagePlus image,
int x,
int y,
int c,
int z,
int t)
Sets the position of an image in each dimension. |
static ij.process.ImageProcessor |
processor(ij.ImagePlus image,
int channel)
Returns the processor of a specific channel of an image. |
static void |
transfer(ij.ImagePlus source,
ij.ImagePlus destination)
Transfers all channel properties from source to destination image. |
static void |
transfer(ij.ImagePlus source,
ij.ImagePlus destination,
int channel)
Transfers the properties of a specific source image channel to the current processor and stack of a destination image. |
static void |
transfer(ij.ImagePlus source,
ij.ImagePlus destination,
int[][] channels)
Transfers the properties of specific channels from source to destination image. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GRAY
public static final int COLOR
public static final int OVERLAY
public static final int TILED
Constructor Detail |
---|
public I5DResource()
Method Detail |
---|
public static void mode(ij.ImagePlus image, int mode)
image
- The image.mode
- The displaying mode. Must be one of GRAY
, COLOR
, OVERLAY
, TILED
.
java.lang.IllegalArgumentException
- If image
is not an Image5D
object or if mode
is invalid.
java.lang.NullPointerException
- If image
is null
.public static ij.measure.Calibration density(ij.ImagePlus image, int channel)
image
- The image.channel
- The channel number. Must be larger than or equal to 1
and less than or equal to the number of channels.
java.lang.IllegalArgumentException
- If image
is not an Image5D
object or if channel
is out of range.
java.lang.NullPointerException
- If image
is null
.public static boolean instance(ij.ImagePlus image)
Image5D
.
image
- The image whose identity is to be tested.
true
if image
is an instance of Image5D
, or false
if this is not the case.public static int position(ij.ImagePlus image, int dimension)
image
- The image.dimension
- The dimension. Must be 0
(x), 1
(y), 2
(c), 3
(z), or 4
(t).
java.lang.IllegalArgumentException
- If image
is not an Image5D
object.
java.lang.ArrayIndexOutOfBoundsException
- If dimension
is out of range.
java.lang.NullPointerException
- If image
is null
.public static void position(ij.ImagePlus image, int dimension, int position)
image
- The image.dimension
- The dimension. Must be 0
(x), 1
(y), 2
(c), 3
(z), or 4
(t).position
- The position. Should be larger than or equal to 0
and less than N
, where N
is the size of the image in the specified dimension. Values outside this range are simply ignored (no exception is generated).
java.lang.IllegalArgumentException
- If image
is not an Image5D
object, or if dimension
is out of range.
java.lang.NullPointerException
- If image
is null
.public static void position(ij.ImagePlus image, int x, int y, int c, int z, int t)
image
- The image.x
- y
- c
- z
- t
- The position in, respectively, the x, y, c, z, and t dimension. Should be larger than or equal to 0
and less than N
, where N
is the size of the image in the corresponding dimension. Values outside this range are simply ignored (no exception is generated).
java.lang.IllegalArgumentException
- If image
is not an Image5D
object.
java.lang.NullPointerException
- If image
is null
.public static ij.process.ImageProcessor processor(ij.ImagePlus image, int channel)
image
- The image.channel
- The channel number. Must be larger than or equal to 1
and less than or equal to the number of channels.
java.lang.IllegalArgumentException
- If image
is not an Image5D
object, or if channel
is out of range.
java.lang.NullPointerException
- If image
is null
.public static ij.ImagePlus convert(ij.ImagePlus image, boolean properties)
Image5D
object.
image
- The image to be converted.properties
- If true
, the density calibration, color model, and window/level settings of image
are copied to every channel of the new Image5D
object; if false
, these properties assume their default values.
Image5D
version of the given image. Returns the given image directly if it is already an Image5D
object. Otherwise it converts the image to a new Image5D
object.
java.lang.IllegalArgumentException
- If image
is not a gray-level image or if the ImageJ version is not supported.
java.lang.NullPointerException
- If image
is null
.public static void minmax(ij.ImagePlus image, double min, double max)
image
- The image whose minimum and maximum displayed values are to be set.min
- The minimum value to be displayed.max
- The maximum value to be displayed.
java.lang.IllegalArgumentException
- If image
is not an Image5D
object.
java.lang.NullPointerException
- If image
is null
.public static void transfer(ij.ImagePlus source, ij.ImagePlus destination)
source
- The source image from which channel properties are to be copied.destination
- The destination image to which channel properties are to be copied.
java.lang.IllegalArgumentException
- If source
or destination
is not an Image5D
object, or if they do not have an equal number of channels.
java.lang.NullPointerException
- If source
or destination
is null
.public static void transfer(ij.ImagePlus source, ij.ImagePlus destination, int[][] channels)
source
- The source image from which channel properties are to be copied.destination
- The destination image to which channel properties are to be copied.channels
- A double array containing the source and destination channel indices. The channels[0]
array contains the channel indices of the source image, and the channels[1]
array the corresponding channel indices of the destination image. Channel indices may range from 1
to the number of channels (inclusive).
java.lang.IllegalArgumentException
- If source
or destination
is not an Image5D
object, if the channels[0]
and channels[1]
arrays have different lengths, or if any of the indices in these arrays is out of range.
java.lang.NullPointerException
- If any of the parameters is null
.public static void transfer(ij.ImagePlus source, ij.ImagePlus destination, int channel)
source
- The source image from which channel properties are to be copied.destination
- The destination image to which channel properties are to be copied.channel
- The source channel index. Must be larger than or equal to 1
and less than or equal to the number of channels.
java.lang.IllegalArgumentException
- If source
is not an Image5D
object, or if channel
is out of range.
java.lang.NullPointerException
- If source
or destination
is null
.public static void nodensity(ij.ImagePlus image)
image
- The image whose density calibrations are to be disabled.
java.lang.IllegalArgumentException
- If image
is not an Image5D
object.
java.lang.NullPointerException
- If image
is null
.public static void nocolor(ij.ImagePlus image)
image
- The image whose color models are to be disabled.
java.lang.IllegalArgumentException
- If image
is not an Image5D
object.
java.lang.NullPointerException
- If image
is null
.
|
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.