Class AbstractImageWrapper<I>
- java.lang.Object
-
- science.aist.imaging.api.domain.wrapper.AbstractImageWrapper<I>
-
- Type Parameters:
I
- Target type representing an image which should be wrapped.
- All Implemented Interfaces:
Serializable
,AutoCloseable
,ImageWrapper<I>
- Direct Known Subclasses:
FImageWrapper
,Image2Byte
,Image8Byte
,ImageProcessorWrapper
,ImageStackWrapper
,INDArrayWrapper
,JavaCVImageWrapper
,MBFImageWrapper
,OpenCVImageWrapper
,WritableImageWrapper
public abstract class AbstractImageWrapper<I> extends Object implements ImageWrapper<I>
Abstract generic implementation of the ImageWrapper Interface
- Since:
- 1.0
- Author:
- Christoph Praschl
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ChannelType
channelType
Channel type of the wrapped imageprotected boolean
closed
Flag to check if an image is closedprotected I
image
The wrapped image.
-
Constructor Summary
Constructors Constructor Description AbstractImageWrapper(I image)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Overrides signature of close method fromAutoCloseable
Interface to not throw an exceptionboolean
equals(Object obj)
UsesGenericImageCompareFunction
to compare if the two image wrappers are equal.static void
freeAllocatedImageWrappers()
Frees all allocated Image wrappers by calling close methodChannelType
getChannelType()
Getter for the channel typeI
getImage()
Getter for the wrapped image.int
hashCode()
Generated Code-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface science.aist.imaging.api.domain.wrapper.ImageWrapper
applyColumnFunction, applyFunction, applyFunction, applyFunction, applyFunction, copyTo, createCopy, createCopy, getChannels, getHeight, getSupportedType, getValue, getValues, getValuesAsColor, getWidth, setValue, setValues, setValues, supportsParallelAccess
-
-
-
-
Field Detail
-
image
protected I image
The wrapped image. It is a good idea to use a serializable type, but since there may be non-serializable types it is also ok if not.
-
channelType
protected ChannelType channelType
Channel type of the wrapped image
-
closed
protected boolean closed
Flag to check if an image is closed
-
-
Constructor Detail
-
AbstractImageWrapper
public AbstractImageWrapper(I image)
-
-
Method Detail
-
freeAllocatedImageWrappers
public static void freeAllocatedImageWrappers()
Frees all allocated Image wrappers by calling close method
-
getImage
public I getImage()
Getter for the wrapped image.- Specified by:
getImage
in interfaceImageWrapper<I>
- Returns:
- Returns the wrapped image.
-
getChannelType
public ChannelType getChannelType()
Getter for the channel type- Specified by:
getChannelType
in interfaceImageWrapper<I>
- Returns:
- the channel type
-
close
public void close()
Description copied from interface:ImageWrapper
Overrides signature of close method fromAutoCloseable
Interface to not throw an exception- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceImageWrapper<I>
-
equals
public boolean equals(Object obj)
UsesGenericImageCompareFunction
to compare if the two image wrappers are equal. If the obj is not a imagewrapper then super.equals will be called.
-
-