T
- the NativeType
this is attached toA
- the Access
family (ByteAccess
,
DoubleAccess
, and so on)public final class NativeTypeFactory<T extends NativeType<T>,A> extends Object
NativeTypeFactory
is used to create
a linked type T
for a matching NativeImg
.
It also provides
information about the primitive
java type that backs the type T
.
NativeTypeFactory
binds a {code PrimitiveType} enum constant to a
Access
interface (ByteAccess
, DoubleAccess
, and so
on). Instances can only be constructed via static methods
BYTE(Function)
, DOUBLE(Function)
, etc. to prevent
non-matching combinations of Access
interface and
PrimitiveType
constant.
Modifier and Type | Method and Description |
---|---|
static <T extends NativeType<T>,A extends BooleanAccess> |
BOOLEAN(Function<NativeImg<T,? extends A>,T> createLinkedType) |
static <T extends NativeType<T>,A extends ByteAccess> |
BYTE(Function<NativeImg<T,? extends A>,T> createLinkedType) |
static <T extends NativeType<T>,A extends CharAccess> |
CHAR(Function<NativeImg<T,? extends A>,T> createLinkedType) |
T |
createLinkedType(NativeImg<T,? extends A> img)
Creates a new
T instance which is linked to img . |
static <T extends NativeType<T>,A extends DoubleAccess> |
DOUBLE(Function<NativeImg<T,? extends A>,T> createLinkedType) |
static <T extends NativeType<T>,A extends FloatAccess> |
FLOAT(Function<NativeImg<T,? extends A>,T> createLinkedType) |
PrimitiveType |
getPrimitiveType()
Get the primitive java type that backs the
NativeType T . |
static <T extends NativeType<T>,A extends IntAccess> |
INT(Function<NativeImg<T,? extends A>,T> createLinkedType) |
static <T extends NativeType<T>,A extends LongAccess> |
LONG(Function<NativeImg<T,? extends A>,T> createLinkedType) |
static <T extends NativeType<T>,A extends ShortAccess> |
SHORT(Function<NativeImg<T,? extends A>,T> createLinkedType) |
public PrimitiveType getPrimitiveType()
NativeType T
.T
public T createLinkedType(NativeImg<T,? extends A> img)
T
instance which is linked to img
. This
means that the instance will ask img
for the Access
that
stores the pixel data.img
- a matching NativeImg
T
that is linked to on img
.public static <T extends NativeType<T>,A extends BooleanAccess> NativeTypeFactory<T,A> BOOLEAN(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends ByteAccess> NativeTypeFactory<T,A> BYTE(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends CharAccess> NativeTypeFactory<T,A> CHAR(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends ShortAccess> NativeTypeFactory<T,A> SHORT(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends IntAccess> NativeTypeFactory<T,A> INT(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends LongAccess> NativeTypeFactory<T,A> LONG(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends FloatAccess> NativeTypeFactory<T,A> FLOAT(Function<NativeImg<T,? extends A>,T> createLinkedType)
public static <T extends NativeType<T>,A extends DoubleAccess> NativeTypeFactory<T,A> DOUBLE(Function<NativeImg<T,? extends A>,T> createLinkedType)
Copyright © 2015–2022 ImgLib2. All rights reserved.