Package net.imglib2.img.planar
Class PlanarImgFactory<T extends NativeType<T>>
- java.lang.Object
-
- net.imglib2.img.ImgFactory<T>
-
- net.imglib2.img.NativeImgFactory<T>
-
- net.imglib2.img.planar.PlanarImgFactory<T>
-
public class PlanarImgFactory<T extends NativeType<T>> extends NativeImgFactory<T>
Factory that creates an appropriatePlanarImg
.- Author:
- Jan Funke, Stephan Preibisch, Stephan Saalfeld, Johannes Schindelin
-
-
Constructor Summary
Constructors Constructor Description PlanarImgFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanarImg<T,?>
create(long[] dim, T type)
NativeImg<T,ByteArray>
createByteInstance(long[] dimensions, Fraction entitiesPerPixel)
NativeImg<T,CharArray>
createCharInstance(long[] dimensions, Fraction entitiesPerPixel)
NativeImg<T,DoubleArray>
createDoubleInstance(long[] dimensions, Fraction entitiesPerPixel)
NativeImg<T,FloatArray>
createFloatInstance(long[] dimensions, Fraction entitiesPerPixel)
NativeImg<T,IntArray>
createIntInstance(long[] dimensions, Fraction entitiesPerPixel)
NativeImg<T,LongArray>
createLongInstance(long[] dimensions, Fraction entitiesPerPixel)
NativeImg<T,ShortArray>
createShortInstance(long[] dimensions, Fraction entitiesPerPixel)
<S> ImgFactory<S>
imgFactory(S type)
Creates the sameImgFactory
for a different generic parameter if possible.-
Methods inherited from class net.imglib2.img.ImgFactory
create, create, create, create, create, imgFactory
-
-
-
-
Method Detail
-
create
public PlanarImg<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
-
createByteInstance
public NativeImg<T,ByteArray> createByteInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createByteInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createCharInstance
public NativeImg<T,CharArray> createCharInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createCharInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createDoubleInstance
public NativeImg<T,DoubleArray> createDoubleInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createDoubleInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createFloatInstance
public NativeImg<T,FloatArray> createFloatInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createFloatInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createIntInstance
public NativeImg<T,IntArray> createIntInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createIntInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createLongInstance
public NativeImg<T,LongArray> createLongInstance(long[] dimensions, Fraction entitiesPerPixel)
- Specified by:
createLongInstance
in classNativeImgFactory<T extends NativeType<T>>
-
createShortInstance
public NativeImg<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
-
-