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 ChannelTypechannelTypeChannel type of the wrapped imageprotected booleanclosedFlag to check if an image is closedprotected IimageThe 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 voidclose()Overrides signature of close method fromAutoCloseableInterface to not throw an exceptionbooleanequals(Object obj)UsesGenericImageCompareFunctionto compare if the two image wrappers are equal.static voidfreeAllocatedImageWrappers()Frees all allocated Image wrappers by calling close methodChannelTypegetChannelType()Getter for the channel typeIgetImage()Getter for the wrapped image.inthashCode()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:
getImagein interfaceImageWrapper<I>- Returns:
- Returns the wrapped image.
-
getChannelType
public ChannelType getChannelType()
Getter for the channel type- Specified by:
getChannelTypein interfaceImageWrapper<I>- Returns:
- the channel type
-
close
public void close()
Description copied from interface:ImageWrapperOverrides signature of close method fromAutoCloseableInterface to not throw an exception- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceImageWrapper<I>
-
equals
public boolean equals(Object obj)
UsesGenericImageCompareFunctionto compare if the two image wrappers are equal. If the obj is not a imagewrapper then super.equals will be called.
-
-