public class ImageJFunctions extends Object
When interacting between ImageJ 1.x and ImgLib2, it is desirable to adapt data structures instead of copying data.
For example, when an ImagePlus
is made available by ImageJ 1.x, you
can pass it to ImgLib2 as an Img
via
ImageJFunctions.wrap(imp)
.
Likewise, when an ImgLib2 RandomAccessibleInterval
needs to be passed
to ImageJ 1.x, it can be wrapped into an ImagePlus
via
ImageJFunctions.wrap(img, title)
.
(For details on this see ImageJVirtualStack
).
Constructor and Description |
---|
ImageJFunctions() |
Modifier and Type | Method and Description |
---|---|
static Img<FloatType> |
convertFloat(ij.ImagePlus imp) |
static <T extends NumericType<T>> |
show(RandomAccessibleInterval<T> img) |
static <T extends ComplexType<T>> |
show(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter) |
static <T extends ComplexType<T>> |
show(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
ExecutorService service)
Displays a complex type as power spectrum, phase spectrum, real values or
imaginary values depending on the converter
|
static <T extends ComplexType<T>> |
show(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
String title) |
static <T extends ComplexType<T>> |
show(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
String title,
ExecutorService service)
Displays a complex type as power spectrum, phase spectrum, real values or
imaginary values depending on the converter
|
static <T extends NumericType<T>> |
show(RandomAccessibleInterval<T> img,
ExecutorService service)
Display and return a single channel
ImagePlus , wrapping a
RandomAccessibleInterval . |
static <T extends NumericType<T>> |
show(RandomAccessibleInterval<T> img,
String title) |
static <T extends NumericType<T>> |
show(RandomAccessibleInterval<T> img,
String title,
ExecutorService service) |
static <T extends RealType<T>> |
showFloat(RandomAccessibleInterval<T> img) |
static <T> ij.ImagePlus |
showFloat(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
String title) |
static <T> ij.ImagePlus |
showFloat(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
String title,
ExecutorService service)
|
static <T extends RealType<T>> |
showFloat(RandomAccessibleInterval<T> img,
ExecutorService service)
Show a
RandomAccessibleInterval of RealType pixels as
single channel 32-bit float using a default Converter . |
static <T extends RealType<T>> |
showFloat(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
showFloat(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Show a
RandomAccessibleInterval of RealType pixels as
single channel 32-bit float using a default Converter . |
static <T> ij.ImagePlus |
showRGB(RandomAccessibleInterval<T> img,
Converter<T,ARGBType> converter,
String title) |
static <T> ij.ImagePlus |
showRGB(RandomAccessibleInterval<T> img,
Converter<T,ARGBType> converter,
String title,
ExecutorService service)
|
static <T extends RealType<T>> |
showUnsignedByte(RandomAccessibleInterval<T> img) |
static <T> ij.ImagePlus |
showUnsignedByte(RandomAccessibleInterval<T> img,
Converter<T,UnsignedByteType> converter,
String title) |
static <T> ij.ImagePlus |
showUnsignedByte(RandomAccessibleInterval<T> img,
Converter<T,UnsignedByteType> converter,
String title,
ExecutorService service)
Show a
RandomAccessibleInterval as single channel 8-bit unsigned
integer ImagePlus using a custom Converter . |
static <T extends RealType<T>> |
showUnsignedByte(RandomAccessibleInterval<T> img,
ExecutorService service)
Show a
RandomAccessibleInterval of RealType pixels as
single channel 8-bit unsigned integer ImagePlus using a default
Converter . |
static <T extends RealType<T>> |
showUnsignedByte(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
showUnsignedByte(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Show a
RandomAccessibleInterval of RealType pixels as
single channel 8-bit unsigned integer ImagePlus using a default
Converter (clamp values to range [0, 255]). |
static <T extends RealType<T>> |
showUnsignedShort(RandomAccessibleInterval<T> img) |
static <T> ij.ImagePlus |
showUnsignedShort(RandomAccessibleInterval<T> img,
Converter<T,UnsignedShortType> converter,
String title) |
static <T> ij.ImagePlus |
showUnsignedShort(RandomAccessibleInterval<T> img,
Converter<T,UnsignedShortType> converter,
String title,
ExecutorService service)
Show a
RandomAccessibleInterval as single channel 16-bit unsigned
integer ImagePlus using a custom Converter . |
static <T extends RealType<T>> |
showUnsignedShort(RandomAccessibleInterval<T> img,
ExecutorService service)
Show a
RandomAccessibleInterval of RealType pixels as
single channel 16-bit unsigned integer ImagePlus using a default
Converter . |
static <T extends RealType<T>> |
showUnsignedShort(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
showUnsignedShort(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Show a
RandomAccessibleInterval of RealType pixels as
single channel 16-bit unsigned integer ImagePlus using a default
Converter . |
static <T extends NumericType<T> & NativeType<T>> |
wrap(ij.ImagePlus imp) |
static <T extends NumericType<T>> |
wrap(RandomAccessibleInterval<T> img,
String title) |
static <T extends NumericType<T>> |
wrap(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Create a single channel
ImagePlus from a
RandomAccessibleInterval . |
static <T extends RealType<T>> |
wrapBit(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
wrapBit(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Create a single channel 8-bit unsigned integer
ImagePlus from a
BitType RandomAccessibleInterval using a custom Converter
. |
static Img<UnsignedByteType> |
wrapByte(ij.ImagePlus imp) |
static Img<FloatType> |
wrapFloat(ij.ImagePlus imp) |
static <T> ij.ImagePlus |
wrapFloat(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
String title) |
static <T> ij.ImagePlus |
wrapFloat(RandomAccessibleInterval<T> img,
Converter<T,FloatType> converter,
String title,
ExecutorService service)
Create a single channel 32-bit float
ImagePlus from a
RandomAccessibleInterval using a custom Converter . |
static <T extends RealType<T>> |
wrapFloat(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
wrapFloat(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Create a single channel 32-bit float
ImagePlus from a
RandomAccessibleInterval using a custom Converter . |
static <T extends NumericType<T>> |
wrapNumeric(ij.ImagePlus imp) |
static <T extends NumericType<T> & NativeType<T>> |
wrapNumericNative(ij.ImagePlus imp) |
static <T extends RealType<T>> |
wrapReal(ij.ImagePlus imp) |
static <T extends RealType<T> & NativeType<T>> |
wrapRealNative(ij.ImagePlus imp) |
static ij.ImagePlus |
wrapRGB(RandomAccessibleInterval<ARGBType> img,
String title) |
static ij.ImagePlus |
wrapRGB(RandomAccessibleInterval<ARGBType> img,
String title,
ExecutorService service)
Create a 24bit RGB
ImagePlus from a
RandomAccessibleInterval a using a default (identity)
Converter . |
static <T> ij.ImagePlus |
wrapRGB(RandomAccessibleInterval<T> img,
Converter<T,ARGBType> converter,
String title) |
static <T> ij.ImagePlus |
wrapRGB(RandomAccessibleInterval<T> img,
Converter<T,ARGBType> converter,
String title,
ExecutorService service)
|
static Img<ARGBType> |
wrapRGBA(ij.ImagePlus imp) |
static Img<UnsignedShortType> |
wrapShort(ij.ImagePlus imp) |
static <T> ij.ImagePlus |
wrapUnsignedByte(RandomAccessibleInterval<T> img,
Converter<T,UnsignedByteType> converter,
String title) |
static <T> ij.ImagePlus |
wrapUnsignedByte(RandomAccessibleInterval<T> img,
Converter<T,UnsignedByteType> converter,
String title,
ExecutorService service)
Create a single channel 8-bit unsigned integer
ImagePlus from a
RandomAccessibleInterval using a custom Converter . |
static <T extends RealType<T>> |
wrapUnsignedByte(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
wrapUnsignedByte(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Create a single channel 8-bit unsigned integer
ImagePlus from a
RandomAccessibleInterval using a custom Converter . |
static <T> ij.ImagePlus |
wrapUnsignedShort(RandomAccessibleInterval<T> img,
Converter<T,UnsignedShortType> converter,
String title) |
static <T> ij.ImagePlus |
wrapUnsignedShort(RandomAccessibleInterval<T> img,
Converter<T,UnsignedShortType> converter,
String title,
ExecutorService service)
Create a single channel 16-bit unsigned integer
ImagePlus from a
RandomAccessibleInterval using a custom Converter . |
static <T extends RealType<T>> |
wrapUnsignedShort(RandomAccessibleInterval<T> img,
String title) |
static <T extends RealType<T>> |
wrapUnsignedShort(RandomAccessibleInterval<T> img,
String title,
ExecutorService service)
Create a single channel 16-bit unsigned integer
ImagePlus from a
RandomAccessibleInterval using a default Converter (clamp
values to range [0, 65535]). |
public static <T extends NumericType<T> & NativeType<T>> Img<T> wrap(ij.ImagePlus imp)
public static <T extends RealType<T> & NativeType<T>> Img<T> wrapRealNative(ij.ImagePlus imp)
public static <T extends NumericType<T>> Img<T> wrapNumeric(ij.ImagePlus imp)
public static <T extends NumericType<T> & NativeType<T>> Img<T> wrapNumericNative(ij.ImagePlus imp)
public static Img<UnsignedByteType> wrapByte(ij.ImagePlus imp)
public static Img<UnsignedShortType> wrapShort(ij.ImagePlus imp)
public static <T extends NumericType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, ExecutorService service)
ImagePlus
, wrapping a
RandomAccessibleInterval
. The image type of the result
(ImagePlus.GRAY8, ImagePlus.GRAY16, ImagePlus.GRAY32, ImagePlus.COLOR_256
or ImagePlus.COLOR_RGB) is inferred from the generic type of the input
RandomAccessibleInterval
.public static <T extends NumericType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img)
public static <T extends ComplexType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, ExecutorService service)
public static <T extends ComplexType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter)
public static <T extends ComplexType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, String title, ExecutorService service)
public static <T extends ComplexType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, String title)
public static <T extends NumericType<T>> ij.ImagePlus wrap(RandomAccessibleInterval<T> img, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
. The image type of the result
(ImagePlus.GRAY8, ImagePlus.GRAY16, ImagePlus.GRAY32, ImagePlus.COLOR_256
or ImagePlus.COLOR_RGB) is inferred from the generic type of the input
RandomAccessibleInterval
.public static <T extends NumericType<T>> ij.ImagePlus wrap(RandomAccessibleInterval<T> img, String title)
public static <T extends NumericType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, String title, ExecutorService service)
public static <T extends NumericType<T>> ij.ImagePlus show(RandomAccessibleInterval<T> img, String title)
public static <T extends RealType<T>> ij.ImagePlus wrapFloat(RandomAccessibleInterval<T> img, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
using a custom Converter
.public static <T extends RealType<T>> ij.ImagePlus wrapFloat(RandomAccessibleInterval<T> img, String title)
public static <T> ij.ImagePlus wrapFloat(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
using a custom Converter
.public static <T> ij.ImagePlus wrapFloat(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, String title)
public static <T> ij.ImagePlus showFloat(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, String title, ExecutorService service)
public static <T> ij.ImagePlus showFloat(RandomAccessibleInterval<T> img, Converter<T,FloatType> converter, String title)
public static <T extends RealType<T>> ij.ImagePlus showFloat(RandomAccessibleInterval<T> img, String title, ExecutorService service)
RandomAccessibleInterval
of RealType
pixels as
single channel 32-bit float using a default Converter
.public static <T extends RealType<T>> ij.ImagePlus showFloat(RandomAccessibleInterval<T> img, String title)
public static <T extends RealType<T>> ij.ImagePlus showFloat(RandomAccessibleInterval<T> img, ExecutorService service)
RandomAccessibleInterval
of RealType
pixels as
single channel 32-bit float using a default Converter
.public static <T extends RealType<T>> ij.ImagePlus showFloat(RandomAccessibleInterval<T> img)
public static ij.ImagePlus wrapRGB(RandomAccessibleInterval<ARGBType> img, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
a using a default (identity)
Converter
.public static ij.ImagePlus wrapRGB(RandomAccessibleInterval<ARGBType> img, String title)
public static <T> ij.ImagePlus wrapRGB(RandomAccessibleInterval<T> img, Converter<T,ARGBType> converter, String title, ExecutorService service)
public static <T> ij.ImagePlus wrapRGB(RandomAccessibleInterval<T> img, Converter<T,ARGBType> converter, String title)
public static <T> ij.ImagePlus showRGB(RandomAccessibleInterval<T> img, Converter<T,ARGBType> converter, String title, ExecutorService service)
public static <T> ij.ImagePlus showRGB(RandomAccessibleInterval<T> img, Converter<T,ARGBType> converter, String title)
public static <T extends RealType<T>> ij.ImagePlus wrapUnsignedByte(RandomAccessibleInterval<T> img, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
using a custom Converter
.public static <T extends RealType<T>> ij.ImagePlus wrapUnsignedByte(RandomAccessibleInterval<T> img, String title)
public static <T extends RealType<T>> ij.ImagePlus wrapBit(RandomAccessibleInterval<T> img, String title, ExecutorService service)
ImagePlus
from a
BitType RandomAccessibleInterval
using a custom Converter
.public static <T extends RealType<T>> ij.ImagePlus wrapBit(RandomAccessibleInterval<T> img, String title)
public static <T> ij.ImagePlus wrapUnsignedByte(RandomAccessibleInterval<T> img, Converter<T,UnsignedByteType> converter, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
using a custom Converter
.public static <T> ij.ImagePlus wrapUnsignedByte(RandomAccessibleInterval<T> img, Converter<T,UnsignedByteType> converter, String title)
public static <T> ij.ImagePlus showUnsignedByte(RandomAccessibleInterval<T> img, Converter<T,UnsignedByteType> converter, String title, ExecutorService service)
RandomAccessibleInterval
as single channel 8-bit unsigned
integer ImagePlus
using a custom Converter
.public static <T> ij.ImagePlus showUnsignedByte(RandomAccessibleInterval<T> img, Converter<T,UnsignedByteType> converter, String title)
public static <T extends RealType<T>> ij.ImagePlus showUnsignedByte(RandomAccessibleInterval<T> img, String title, ExecutorService service)
RandomAccessibleInterval
of RealType
pixels as
single channel 8-bit unsigned integer ImagePlus
using a default
Converter
(clamp values to range [0, 255]).public static <T extends RealType<T>> ij.ImagePlus showUnsignedByte(RandomAccessibleInterval<T> img, String title)
public static <T extends RealType<T>> ij.ImagePlus showUnsignedByte(RandomAccessibleInterval<T> img, ExecutorService service)
RandomAccessibleInterval
of RealType
pixels as
single channel 8-bit unsigned integer ImagePlus
using a default
Converter
.public static <T extends RealType<T>> ij.ImagePlus showUnsignedByte(RandomAccessibleInterval<T> img)
public static <T extends RealType<T>> ij.ImagePlus wrapUnsignedShort(RandomAccessibleInterval<T> img, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
using a default Converter
(clamp
values to range [0, 65535]).public static <T extends RealType<T>> ij.ImagePlus wrapUnsignedShort(RandomAccessibleInterval<T> img, String title)
public static <T> ij.ImagePlus wrapUnsignedShort(RandomAccessibleInterval<T> img, Converter<T,UnsignedShortType> converter, String title, ExecutorService service)
ImagePlus
from a
RandomAccessibleInterval
using a custom Converter
.public static <T> ij.ImagePlus wrapUnsignedShort(RandomAccessibleInterval<T> img, Converter<T,UnsignedShortType> converter, String title)
public static <T> ij.ImagePlus showUnsignedShort(RandomAccessibleInterval<T> img, Converter<T,UnsignedShortType> converter, String title, ExecutorService service)
RandomAccessibleInterval
as single channel 16-bit unsigned
integer ImagePlus
using a custom Converter
.public static <T> ij.ImagePlus showUnsignedShort(RandomAccessibleInterval<T> img, Converter<T,UnsignedShortType> converter, String title)
public static <T extends RealType<T>> ij.ImagePlus showUnsignedShort(RandomAccessibleInterval<T> img, String title, ExecutorService service)
RandomAccessibleInterval
of RealType
pixels as
single channel 16-bit unsigned integer ImagePlus
using a default
Converter
.public static <T extends RealType<T>> ij.ImagePlus showUnsignedShort(RandomAccessibleInterval<T> img, String title)
public static <T extends RealType<T>> ij.ImagePlus showUnsignedShort(RandomAccessibleInterval<T> img, ExecutorService service)
RandomAccessibleInterval
of RealType
pixels as
single channel 16-bit unsigned integer ImagePlus
using a default
Converter
.public static <T extends RealType<T>> ij.ImagePlus showUnsignedShort(RandomAccessibleInterval<T> img)
Copyright © 2015–2022 ImgLib2. All rights reserved.