Package net.imglib2.img.array
Class ArrayImgFactory<T extends NativeType<T>>
- java.lang.Object
-
- net.imglib2.img.ImgFactory<T>
-
- net.imglib2.img.NativeImgFactory<T>
-
- net.imglib2.img.array.ArrayImgFactory<T>
-
public class ArrayImgFactory<T extends NativeType<T>> extends NativeImgFactory<T>
- Author:
- Stephan Preibisch, Stephan Saalfeld
-
-
Constructor Summary
Constructors Constructor Description ArrayImgFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayImg<T,?>
create(long[] dim, T type)
ArrayImg<T,ByteArray>
createByteInstance(long[] dimensions, Fraction entitiesPerPixel)
ArrayImg<T,CharArray>
createCharInstance(long[] dimensions, Fraction entitiesPerPixel)
ArrayImg<T,DoubleArray>
createDoubleInstance(long[] dimensions, Fraction entitiesPerPixel)
ArrayImg<T,FloatArray>
createFloatInstance(long[] dimensions, Fraction entitiesPerPixel)
ArrayImg<T,IntArray>
createIntInstance(long[] dimensions, Fraction entitiesPerPixel)
ArrayImg<T,LongArray>
createLongInstance(long[] dimensions, Fraction entitiesPerPixel)
ArrayImg<T,ShortArray>
createShortInstance(long[] dimensions, Fraction entitiesPerPixel)
<S> ImgFactory<S>
imgFactory(S type)
Creates the sameImgFactory
for a different generic parameter if possible.static int
numEntitiesRangeCheck(long[] dimensions, Fraction entitiesPerPixel)
-
Methods inherited from class net.imglib2.img.ImgFactory
create, create, create, create, create, imgFactory
-
-
-
-
Method Detail
-
create
public ArrayImg<T,?> create(long[] dim, T type)
Description copied from class:NativeImgFactory
This class will ask theType
to create a suitableImg
for theType
and the dimensionality.Type
will then call one of the abstract methods defined below to create theNativeImg
- Overrides:
create
in classNativeImgFactory<T extends NativeType<T>>
- Returns:
Img
- the instantiated Container
-
numEntitiesRangeCheck
public static int numEntitiesRangeCheck(long[] dimensions, Fraction entitiesPerPixel)
-
createByteInstance
public ArrayImg<T,ByteArray> createByteInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createByteInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createCharInstance
public ArrayImg<T,CharArray> createCharInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createCharInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createDoubleInstance
public ArrayImg<T,DoubleArray> createDoubleInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createDoubleInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createFloatInstance
public ArrayImg<T,FloatArray> createFloatInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createFloatInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createIntInstance
public ArrayImg<T,IntArray> createIntInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createIntInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createLongInstance
public ArrayImg<T,LongArray> createLongInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createLongInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createShortInstance
public ArrayImg<T,ShortArray> createShortInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createShortInstance
in classNativeImgFactory<T extends NativeType<T>>
-
imgFactory
public <S> ImgFactory<S> imgFactory(S type) throws IncompatibleTypeException
Description copied from class:ImgFactory
Creates the sameImgFactory
for a different generic parameter if possible. If the type "S" does not suit the needs of theImgFactory
(for example implementNativeType
in allNativeImgFactory
, this method will throw anIncompatibleTypeException
.- Specified by:
imgFactory
in classImgFactory<T extends NativeType<T>>
- Type Parameters:
S
- the new type- Parameters:
type
- an instance of S- Returns:
ImgFactory
of type S- Throws:
IncompatibleTypeException
- if type S is not compatible
-
-