Package de.pco.common
Class ImageData
java.lang.Object
de.pco.common.AbstractImageData
de.pco.common.ImageData
public class ImageData extends AbstractImageData
Class represents the image as unsigned short[] and its metadata .
- Author:
- PCO
-
Field Summary
Fields inherited from class de.pco.common.AbstractImageData
image, metadata -
Constructor Summary
Constructors Constructor Description ImageData(int[] image, int width, int height, ImageMetadata imageMetadata)Constructor from the array of the real unsigned values.ImageData(UShortArray image, int width, int height, long recorderImageNumber, PcoMetadataStruct pcoMetadataStruct, Timestamp timestamp)Constructor from the wrapped array of values and from the metadata subobjects.ImageData(UShortArray image, int width, int height, ImageMetadata imageMetadata)Constructor from the wrapped array of values. -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)intgetDataElementMaxValue()Returns the maximal value that can be stored in the returned data array: 65535 which is the maximum of unsigned short.inthashCode()booleanisCompressed()Returns always false because ImageData are based on UShortArray and not on UByteArray.voidsetData(int[] data)Sets the image data.StringtoString()Methods inherited from class de.pco.common.AbstractImageData
getData, getHeight, getInputStream, getMetadata, getWidth
-
Constructor Details
-
ImageData
Constructor from the wrapped array of values.- Parameters:
image-width-height-imageMetadata-
-
ImageData
Constructor from the array of the real unsigned values. Wrapps the ints intoUShortArrayby checking the maximal value which unsigned short can hold.- Parameters:
image-width-height-imageMetadata-
-
ImageData
public ImageData(UShortArray image, int width, int height, long recorderImageNumber, PcoMetadataStruct pcoMetadataStruct, Timestamp timestamp)Constructor from the wrapped array of values and from the metadata subobjects.- Parameters:
image-width-height-recorderImageMetadata-pcoMetadataStruct-timestamp-
-
-
Method Details
-
isCompressed
public boolean isCompressed()Returns always false because ImageData are based on UShortArray and not on UByteArray.- Specified by:
isCompressedin classAbstractImageData
-
setData
public void setData(int[] data)Sets the image data. Checks the parameter whether all the data values fit in an unsigned short.- Specified by:
setDatain classAbstractImageData- Parameters:
data-
-
getDataElementMaxValue
public final int getDataElementMaxValue()Returns the maximal value that can be stored in the returned data array: 65535 which is the maximum of unsigned short.- Specified by:
getDataElementMaxValuein classAbstractImageData- Returns:
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractImageData
-
equals
- Overrides:
equalsin classAbstractImageData
-
toString
- Overrides:
toStringin classAbstractImageData
-