org.jboss.media.format.image.iio
Class StandardMediaHeader

java.lang.Object
  extended byorg.jboss.media.format.image.iio.IIOMediaHeader (src) 
      extended byorg.jboss.media.format.image.iio.StandardMediaHeader
All Implemented Interfaces:
MediaHeader (src) , java.io.Serializable

public class StandardMediaHeader
extends IIOMediaHeader (src)

MediaHeader based on the Standard (Plug-in Neutral) Metadata Format Specification of the Java Image I/O API.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.media.format.image.iio.IIOMediaHeader (src)
imageMetadata, metadataRootNode
 
Constructor Summary
StandardMediaHeader(javax.imageio.metadata.IIOMetadata imageMetadata)
          Constructor.
 
Method Summary
 float getBitRate()
          The estimated bit rate of the compression scheme.
 java.lang.String getBitsPerSample()
          The number of bits per sample.
 java.lang.String getBlackIsZero()
          True if smaller values represent darker shades.
 java.lang.String getColorSpaceType()
          The raw color space of the image.
 java.lang.String getCompressionTypeName()
          The name of the compression scheme in use.
 java.lang.Object getField(java.lang.String fieldname)
          Returns the field with the given name downcast to Object.
 java.lang.String[] getFieldNames()
          Returns an array of Strings containing all the field names defined for the header.
 java.lang.String getFormatVersion()
          The version of the format used by the stream.
 float getGamma()
          The image gamma.
 float getHorizontalPhysicalPixelSpacing()
          The horizontal distance in the subject of the image, in millimeters, represented by one pixel at the center of the image.
 int getHorizontalPixelOffset()
          The horizonal position, in pixels, where the image should be rendered onto a raster display.
 float getHorizontalPixelSize()
          The width of a pixel, in millimeters, as it should be rendered on media.
 float getHorizontalPosition()
          The horizontal position, in millimeters, where the image should be rendered on media.
 int getHorizontalScreenSize()
          The width, in pixels, of the raster display into which the image should be rendered.
 int getImageCreationYear()
          The full year of image creation (e.g., 1967, not 67).
 java.lang.String getImageOrientation()
          The desired orientation of the image in terms of flips and counter-clockwise rotations.
 java.lang.String getLossless()
          True if the compression scheme is lossless.
 java.lang.String getNumChannels()
          The number of channels in the raw image, including alpha.
 int getNumProgressiveScans()
          The number of progressive scans used in the image encoding.
 float getPixelAspectRatio()
          The width of a pixel divided by its height.
 java.lang.String getPlanarConfiguration()
          The organization of image samples in the stream.
 java.lang.String getSampleFormat()
          The numeric format of image samples.
 java.lang.String getSampleMSB()
          The position of the most significant bit of each sample.
 java.lang.String getSignificantBitsPerSample()
          The number of significant bits per sample.
 java.lang.String getSubimageInterpretation()
          The interpretation of this image in relation to the other images stored in the same stream.
 float getVerticalPhysicalPixelSpacing()
          The vertical distance in the subject of the image, in millimeters, represented by one pixel at the center of the image.
 int getVerticalPixelOffset()
          The vertical position, in pixels, where the image should be rendered onto a raster display.
 float getVerticalPixelSize()
          The height of a pixel, in millimeters, as it should be rendered on media.
 float getVerticalPosition()
          The vertical position, in millimeters, where the image should be rendered on media.
 int getVerticalScreenSize()
          The height, in pixels, of the raster display into which the image should be rendered.
 
Methods inherited from class org.jboss.media.format.image.iio.IIOMediaHeader (src)
getAttribute, getAttribute, getNode, getNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardMediaHeader

public StandardMediaHeader(javax.imageio.metadata.IIOMetadata imageMetadata)
Constructor.

Method Detail

getFieldNames

public java.lang.String[] getFieldNames()
Description copied from interface: MediaHeader (src)
Returns an array of Strings containing all the field names defined for the header.

Specified by:
getFieldNames in interface MediaHeader (src)
Specified by:
getFieldNames in class IIOMediaHeader (src)
See Also:
MediaHeader.getFieldNames()

getField

public java.lang.Object getField(java.lang.String fieldname)
Description copied from interface: MediaHeader (src)
Returns the field with the given name downcast to Object. If the field is modeled as a Java base type, an instance of the corresponding wrapper class has to be returned. The value null is returned if a field name is passed that is not defined for the receiver.

Specified by:
getField in interface MediaHeader (src)
Specified by:
getField in class IIOMediaHeader (src)
See Also:
MediaHeader.getField(java.lang.String)

getColorSpaceType

public java.lang.String getColorSpaceType()
The raw color space of the image.

Returns:
"XYZ", "Lab", "Luv", "YCbCr", "Yxy", "YCCK", "PhotoYCC", "RGB", "GRAY", "HSV", "HLS", "CMYK", "CMY", "2CLR", "3CLR", "4CLR", "5CLR", "6CLR", "7CLR", "8CLR", "9CLR", "ACLR", "BCLR", "CCLR", "DCLR", "ECLR" or "FCLR".

getNumChannels

public java.lang.String getNumChannels()
The number of channels in the raw image, including alpha.

Returns:
number of channels.

getGamma

public float getGamma()
The image gamma.

Returns:
gamma.

getBlackIsZero

public java.lang.String getBlackIsZero()
True if smaller values represent darker shades.

Returns:
"TRUE" or "FALSE".

getCompressionTypeName

public java.lang.String getCompressionTypeName()
The name of the compression scheme in use.

Returns:
compression type name.

getLossless

public java.lang.String getLossless()
True if the compression scheme is lossless.

Returns:
lossless.

getNumProgressiveScans

public int getNumProgressiveScans()
The number of progressive scans used in the image encoding.


getBitRate

public float getBitRate()
The estimated bit rate of the compression scheme.

Returns:
bit rate.

getPlanarConfiguration

public java.lang.String getPlanarConfiguration()
The organization of image samples in the stream.

Returns:
"PixelInterleaved", "PlaneInterleaved", "LineInterleaved" or "TileInterleaved".

getSampleFormat

public java.lang.String getSampleFormat()
The numeric format of image samples.

Returns:
"SignedIntegral", "UnsignedIntegral", "Real" or "Index".

getBitsPerSample

public java.lang.String getBitsPerSample()
The number of bits per sample.

Returns:
bits per sample.

getSignificantBitsPerSample

public java.lang.String getSignificantBitsPerSample()
The number of significant bits per sample.

Returns:
significant bits per sample.

getSampleMSB

public java.lang.String getSampleMSB()
The position of the most significant bit of each sample.

Returns:
sample most significant bit.

getPixelAspectRatio

public float getPixelAspectRatio()
The width of a pixel divided by its height.

Returns:
pixel aspect ratio.

getImageOrientation

public java.lang.String getImageOrientation()
The desired orientation of the image in terms of flips and counter-clockwise rotations.

Returns:
image orientation.

getHorizontalPixelSize

public float getHorizontalPixelSize()
The width of a pixel, in millimeters, as it should be rendered on media.

Returns:
horizontal pixel size.

getVerticalPixelSize

public float getVerticalPixelSize()
The height of a pixel, in millimeters, as it should be rendered on media.

Returns:
vertical pixel size.

getHorizontalPhysicalPixelSpacing

public float getHorizontalPhysicalPixelSpacing()
The horizontal distance in the subject of the image, in millimeters, represented by one pixel at the center of the image.

Returns:
horizontal physical pixel spacing.

getVerticalPhysicalPixelSpacing

public float getVerticalPhysicalPixelSpacing()
The vertical distance in the subject of the image, in millimeters, represented by one pixel at the center of the image.

Returns:
vertical physical pixel spacing.

getHorizontalPosition

public float getHorizontalPosition()
The horizontal position, in millimeters, where the image should be rendered on media.

Returns:
horizontal position.

getVerticalPosition

public float getVerticalPosition()
The vertical position, in millimeters, where the image should be rendered on media.

Returns:
vertical position.

getHorizontalPixelOffset

public int getHorizontalPixelOffset()
The horizonal position, in pixels, where the image should be rendered onto a raster display.

Returns:
horizontal pixel offset.

getVerticalPixelOffset

public int getVerticalPixelOffset()
The vertical position, in pixels, where the image should be rendered onto a raster display.

Returns:
vertical pixel offset.

getHorizontalScreenSize

public int getHorizontalScreenSize()
The width, in pixels, of the raster display into which the image should be rendered.

Returns:
horizontal screen size.

getVerticalScreenSize

public int getVerticalScreenSize()
The height, in pixels, of the raster display into which the image should be rendered.

Returns:
vertical screen size.

getFormatVersion

public java.lang.String getFormatVersion()
The version of the format used by the stream.

Returns:
format version.

getSubimageInterpretation

public java.lang.String getSubimageInterpretation()
The interpretation of this image in relation to the other images stored in the same stream.

Returns:
"Standalone", "SinglePage", "FullResolution", "ReducedResolution" "PyramidLayer", "Preview", "VolumeSlice", "ObjectView", "Panorama", "AnimationFrame", "TransparencyMask", "CompositingLayer", "SpectralSlice" or "Unknown".

getImageCreationYear

public int getImageCreationYear()
The full year of image creation (e.g., 1967, not 67).

Returns:
image creation year.