Package net.imglib2.img
Class ImgFactory<T>
java.lang.Object
net.imglib2.img.ImgFactory<T>
- Direct Known Subclasses:
ListImgFactory
,NativeImgFactory
TODO
- Author:
- Stephan Preibisch, Stephan Saalfeld
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTheImgFactory
can decide how to create theImg
.TheImgFactory
can decide how to create theImg
.TheImgFactory
can decide how to create theImg
.TheImgFactory
can decide how to create theImg
.create
(Supplier<T> typeSupplier, Dimensions dim) TheImgFactory
can decide how to create theImg
.create
(Dimensions dim, T type) TheImgFactory
can decide how to create theImg
.<S> ImgFactory
<S> imgFactory
(Supplier<S> typeSupplier) Creates the sameImgFactory
for a different generic parameter if possible.abstract <S> ImgFactory
<S> imgFactory
(S type) Creates the sameImgFactory
for a different generic parameter if possible.
-
Constructor Details
-
ImgFactory
public ImgFactory()
-
-
Method Details
-
create
TheImgFactory
can decide how to create theImg
. ANativeImgFactory
will ask theType
to create a suitableNativeImg
.- Returns:
Img
-
create
TheImgFactory
can decide how to create theImg
. ANativeImgFactory
will ask theType
to create a suitableNativeImg
.- Returns:
Img
-
create
TheImgFactory
can decide how to create theImg
. ANativeImgFactory
will ask theType
to create a suitableNativeImg
.- Returns:
Img
-
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
.- 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
-
create
TheImgFactory
can decide how to create theImg
. ANativeImgFactory
will ask the suppliedType
to create a suitableNativeImg
.- Returns:
Img
-
create
TheImgFactory
can decide how to create theImg
. ANativeImgFactory
will ask the suppliedType
to create a suitableNativeImg
.- Returns:
Img
-
create
TheImgFactory
can decide how to create theImg
. ANativeImgFactory
will ask the suppliedType
to create a suitableNativeImg
.Note: This is not a vararg function because the underlying int[] based methods alreay copies the int[] dimensions into a disposable long[] anyways. This would be an unnecessary copy for int... varargs.
- Returns:
Img
-
imgFactory
Creates the sameImgFactory
for a different generic parameter if possible. If the supplied type "S" does not suit the needs of theImgFactory
(for example implementNativeType
in allNativeImgFactory
, this method will throw anIncompatibleTypeException
.- Type Parameters:
S
- the new type- Parameters:
typeSupplier
- a supplier of S- Returns:
ImgFactory
of type S- Throws:
IncompatibleTypeException
- if type S is not compatible
-