Class BufferedImageWrapper
- java.lang.Object
-
- science.aist.imaging.api.domain.wrapper.implementation.BufferedImageWrapper
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
,ImageWrapper<BufferedImage>
public class BufferedImageWrapper extends Object implements ImageWrapper<BufferedImage>
Wrapper of an buffered image
- Since:
- 1.0
- Author:
- Christoph Praschl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BufferedImageWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Overrides signature of close method fromAutoCloseable
Interface to not throw an exceptionChannelType
getChannelType()
int
getHeight()
BufferedImage
getImage()
Getter for the wrapped image.Class<BufferedImage>
getSupportedType()
double
getValue(int x, int y, int channel)
Generally seeImageWrapper.getValue(int, int, int)
} Note: Getter is based on theImageWrapper.getChannelType()
NOT on the actualBufferedImage.getType()
int
getWidth()
void
setValue(int x, int y, int channel, double val)
Generally seeImageWrapper.setValue(int, int, int, double)
Note: Setter is based on theImageWrapper.getChannelType()
NOT on the actualBufferedImage.getType()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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, getValues, getValuesAsColor, setValues, setValues, supportsParallelAccess
-
-
-
-
Method Detail
-
getImage
public BufferedImage getImage()
Description copied from interface:ImageWrapper
Getter for the wrapped image.- Specified by:
getImage
in interfaceImageWrapper<BufferedImage>
- Returns:
- Returns the wrapped image.
-
getWidth
public int getWidth()
- Specified by:
getWidth
in interfaceImageWrapper<BufferedImage>
- Returns:
- The image width
-
getHeight
public int getHeight()
- Specified by:
getHeight
in interfaceImageWrapper<BufferedImage>
- Returns:
- The image height
-
getChannelType
public ChannelType getChannelType()
- Specified by:
getChannelType
in interfaceImageWrapper<BufferedImage>
- Returns:
- The channelType of the image
-
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<BufferedImage>
-
getValue
public double getValue(int x, int y, int channel)
Generally seeImageWrapper.getValue(int, int, int)
} Note: Getter is based on theImageWrapper.getChannelType()
NOT on the actualBufferedImage.getType()
- Specified by:
getValue
in interfaceImageWrapper<BufferedImage>
- Parameters:
x
- the x-coordinate of the pixely
- the y-coordinate of the pixelchannel
- the channel to select of a specific pixel- Returns:
- the value at the given position
-
setValue
public void setValue(int x, int y, int channel, double val)
Generally seeImageWrapper.setValue(int, int, int, double)
Note: Setter is based on theImageWrapper.getChannelType()
NOT on the actualBufferedImage.getType()
- Specified by:
setValue
in interfaceImageWrapper<BufferedImage>
- Parameters:
x
- the x-coordinate of the pixely
- the y-coordinate of the pixelchannel
- the channel to select of a specific pixelval
- the value for the pixel and channel
-
getSupportedType
public Class<BufferedImage> getSupportedType()
- Specified by:
getSupportedType
in interfaceImageWrapper<BufferedImage>
- Returns:
- the supported image type.
-
-