Media Authoring
with Java API

tv.amwa.maj.entity
Class RGBADescriptor

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.EssenceDescriptor
          extended by tv.amwa.maj.entity.AAFFileDescriptor
              extended by tv.amwa.maj.entity.DigitalImageDescriptor
                  extended by tv.amwa.maj.entity.RGBADescriptor
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, AAFFileDescriptor, DigitalImageDescriptor, EssenceDescriptor, InterchangeObject, RGBADescriptor, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=10496,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="RGBADescriptor",
          description="The RGBADescriptor class specifies that a File SourceMob is associated with video essence formatted with three color component or with three color components and an alpha component as specified in this document.")
public class RGBADescriptor
extends DigitalImageDescriptor
implements RGBADescriptor, Serializable, Cloneable, MAJCommon

Implements the description of a file of video essence formatted with three color components or with three color components and an alpha component.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class RGBADescriptor.PaletteLayoutXMLHandler
           
static class RGBADescriptor.PixelLayoutXMLHandler
           
static class RGBADescriptor.RGBAComponentXMLHandler
           
static class RGBADescriptor.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.DigitalImageDescriptor
DigitalImageDescriptor.DigitalImageDescriptorXMLHandler, DigitalImageDescriptor.VideoLineMapXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.AAFFileDescriptor
AAFFileDescriptor.FileDescriptorXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.EssenceDescriptor
EssenceDescriptor.EssenceDescriptorXMLHandler, EssenceDescriptor.LocatorXMLHandler, EssenceDescriptor.SubDescriptorXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String RGBADESCRIPTOR_TAG
           
 
Fields inherited from class tv.amwa.maj.entity.DigitalImageDescriptor
DIGITALIMAGEDESCRIPTOR_ITEM
 
Fields inherited from class tv.amwa.maj.entity.AAFFileDescriptor
FILEDESCRIPTOR_ITEM
 
Fields inherited from class tv.amwa.maj.entity.EssenceDescriptor
ESSENCEDESCRIPTOR_ITEM
 
Fields inherited from interface tv.amwa.maj.iface.RGBADescriptor
ALPHAMAXREF_DEFAULT, ALPHAMINREF_DEFAULT, COMPONENTMAXREF_DEFAULT, COMPONENTMINREF_DEFAULT, SCANNINGDIRECTION_DEFAULT
 
Fields inherited from interface tv.amwa.maj.iface.DigitalImageDescriptor
ALPHATRANSPARENCY_DEFAULT, DISPLAYF2OFFSET_DEFAULT, FIELDENDOFFSET_DEFAULT, FIELDSTARTOFFSET_DEFAULT, IMAGEALIGNMENTFACTOR_DEFAULT, STOREDF2OFFSET_DEFAULT, Uncompressed
 
Constructor Summary
RGBADescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, RGBAComponent[] pixelLayout)
          Creates and initalizes a new RGBA descriptor without a palette.
RGBADescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, RGBAComponent[] pixelLayout, byte[] palette, RGBAComponent[] paletteLayout)
          Creates and initalizes a new RGBA descriptor that includes a palette.
 
Method Summary
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 RGBADescriptor clone()
          Creates a cloned copy of this entity.
 int countPaletteLayoutElements()
          Returns the number of components per pixel in the palette of this RGBA descriptor.
 int countPixelLayoutElements()
          Returns the number of components per pixel in data represented by this RGBA descriptor.
 boolean equals(Object o)
          Tests to see if the given object is equal to this interchange object.
 int getAlphaMaxRef()
          Returns the maximum alpha value of this RGBA descriptor, for example 239 or 959 (8 or 10 bits).
 int getAlphaMinRef()
          Returns the minimum alpha value of the RGBA descriptor, for example 16 or 64 (8 or 10 bits).
 int getComponentMaxRef()
          Returns the maximum value for RGB components of this RGBA descriptor, for example 239 or 959 (8 or 10 bits).
 int getComponentMinRef()
          Returns the minimum value for RGB components of the RGBA descriptor, for example 16 or 64 (8 or 10 bits).
 byte[] getPalette()
          Returns the palette property of the RGBA descriptor, which is an array of color values that are used to specify an image.
 RGBAComponent[] getPaletteLayout()
          Returns the layout and structure of the components of a single entry for the palette of the RGBA descriptor.
 int getPaletteSize()
           
 RGBAComponent[] getPixelLayout()
          Returns the layout and structure of the components in a single pixel of data represented by the RGBA descriptor.
 ScanningDirectionType getScanningDirection()
          Returns the scanning direction of this RGBA descriptor, which specifies the scanning direction of the image.
 int hashCode()
          Returns a hash code value for this interchange object.
 void setAlphaMaxRef(Integer alphaMaxRef)
          Sets the maximum alpha value of the RGBA descriptor, for example 239 or 959 (8 or 10 bits).
 void setAlphaMinRef(Integer alphaMinRef)
          Sets the minimum alpha value of this RGBA descriptor, for example 16 or 64 (8 or 10 bits).
 void setComponentMaxRef(Integer componentMaxRef)
          Sets the maximum value for RGB components of this RGBA descriptor, for example 239 or 959 (8 or 10 bits).
 void setComponentMinRef(Integer componentMinRef)
          Sets the minimum value for RGB components of the RGBA descriptor, for example 16 or 64 (8 or 10 bits).
 void setPalette(byte[] palette)
          Sets the palette property of the RGBA descriptor, which is an array of color values that are used to specify an image.
 void setPaletteLayout(RGBAComponent[] paletteLayoutArray)
          Sets the layout and structure of the components of a single entry for the palette of the RGBA descriptor.
 void setPixelLayout(RGBAComponent[] pixelLayoutArray)
          Sets the layout and structure of the components in a single pixel of data represented by the RGBA descriptor.
 void setPropertiesFromInterface(RGBADescriptor castFrom)
           
 void setScanningDirection(ScanningDirectionType scanningDirection)
          Sets the scanning direction of this RGBA descriptor, which specifies the scanning direction of the image.
 
Methods inherited from class tv.amwa.maj.entity.DigitalImageDescriptor
areDisplayValuesPresent, areSampledValuesPresent, getActiveFormatDescriptor, getAlphaTransparency, getCodingEquations, getColorPrimaries, getCompression, getDisplayF2Offset, getDisplayHeight, getDisplayView, getDisplayWidth, getDisplayXOffset, getDisplayYOffset, getFieldDominance, getFieldEndOffset, getFieldStartOffset, getFrameLayout, getImageAlignmentFactor, getImageAspectRatio, getSampledHeight, getSampledView, getSampledWidth, getSampledXOffset, getSampledYOffset, getSignalStandard, getStoredF2Offset, getStoredHeight, getStoredView, getStoredWidth, getTransferCharacteristic, getVideoLineMap, getVideoLineMapSize, setActiveFormatDescriptor, setAlphaTransparency, setCodingEquations, setColorPrimaries, setCompression, setDisplayF2Offset, setDisplayView, setFieldDominance, setFieldEndOffset, setFieldStartOffset, setFrameLayout, setImageAlignmentFactor, setImageAspectRatio, setPropertiesFromInterface, setSampledView, setSignalStandard, setStoredF2Offset, setStoredHeight, setStoredView, setStoredWidth, setTransferCharacteristic, setVideoLineMap
 
Methods inherited from class tv.amwa.maj.entity.AAFFileDescriptor
describesStaticEssence, getCodecDefinition, getContainerFormat, getLength, getLinkedSlotID, getSampleRate, setCodecDefinition, setContainerFormat, setDescribesStaticEssence, setDescribesTimeVaryingEssence, setLength, setLinkedSlotID, setPropertiesFromInterface, setSampleRate
 
Methods inherited from class tv.amwa.maj.entity.EssenceDescriptor
appendLocator, appendSubDescriptor, countLocators, countSubDescriptors, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt, setPropertiesFromInterface
 
Methods inherited from class tv.amwa.maj.entity.InterchangeObject
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.DigitalImageDescriptor
areDisplayValuesPresent, areSampledValuesPresent, getActiveFormatDescriptor, getAlphaTransparency, getCodingEquations, getColorPrimaries, getCompression, getDisplayF2Offset, getDisplayView, getFieldDominance, getFieldEndOffset, getFieldStartOffset, getFrameLayout, getImageAlignmentFactor, getImageAspectRatio, getSampledView, getSignalStandard, getStoredF2Offset, getStoredView, getTransferCharacteristic, getVideoLineMap, getVideoLineMapSize, setActiveFormatDescriptor, setAlphaTransparency, setCodingEquations, setColorPrimaries, setCompression, setDisplayF2Offset, setDisplayView, setFieldDominance, setFieldEndOffset, setFieldStartOffset, setFrameLayout, setImageAlignmentFactor, setImageAspectRatio, setSampledView, setSignalStandard, setStoredF2Offset, setStoredView, setTransferCharacteristic, setVideoLineMap
 
Methods inherited from interface tv.amwa.maj.iface.AAFFileDescriptor
getCodecDefinition, getContainerFormat, getLength, getLinkedSlotID, getSampleRate, setCodecDefinition, setContainerFormat, setLength, setLinkedSlotID, setSampleRate
 
Methods inherited from interface tv.amwa.maj.iface.EssenceDescriptor
appendLocator, appendSubDescriptor, countLocators, countSubDescriptors, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
toString
 

Field Detail

RGBADESCRIPTOR_TAG

public static final String RGBADESCRIPTOR_TAG
See Also:
Constant Field Values
Constructor Detail

RGBADescriptor

public RGBADescriptor(ContainerDefinition containerFormat,
                      @UInt32
                      int storedHeight,
                      @UInt32
                      int storedWidth,
                      LayoutType frameLayout,
                      @VideoLineMap
                      int[] videoLineMap,
                      Rational imageAspectRatio,
                      RGBAComponent[] pixelLayout)
               throws NullPointerException,
                      IllegalArgumentException

Creates and initalizes a new RGBA descriptor without a palette. An RGBA descriptor specifies that a file source mob is associated with video essence formatted with three color components or with three color components and an alpha component.

Parameters:
containerFormat - Container mechanism used to store the essence.
storedHeight - Number of pixels in vertical dimension of stored view.
storedWidth - Number of pixels in horizontal dimension of stored view.
frameLayout - Describes whether all data for a complete sample is in one frame or is split into more than one field.
videoLineMap - The scan line in the analog source that corresponds to the beginning of each digitized field. For single-field video, there is 1 value in the array; for interlaced video, there are 2 values in the array.
imageAspectRatio - Describes the ratio between the horizontal size and the vertical size in the intended final image.
pixelLayout - Order and size of the components within the pixel.
Throws:
NullPointerException - One or more of the arguments is null.
IllegalArgumentException - The given values are outside acceptable bounds or the pixel layout requires a palette and a palette is not provided. In this case, use RGBADescriptor(..., byte[], RGBAComponent[]) instead.

RGBADescriptor

public RGBADescriptor(ContainerDefinition containerFormat,
                      @UInt32
                      int storedHeight,
                      @UInt32
                      int storedWidth,
                      LayoutType frameLayout,
                      @VideoLineMap
                      int[] videoLineMap,
                      Rational imageAspectRatio,
                      RGBAComponent[] pixelLayout,
                      @DataValue
                      byte[] palette,
                      RGBAComponent[] paletteLayout)
               throws NullPointerException,
                      IllegalArgumentException

Creates and initalizes a new RGBA descriptor that includes a palette. An RGBA descriptor specifies that a file source mob is associated with video essence formatted with three color components or with three color components and an alpha component.

Note that this method can be used to create a descriptor for image data that does not have a palette, although this will result in the storage of redundant data within the descriptor. If not palette is required, use RGBADescriptor(tv.amwa.maj.iface.ContainerDefinition, int, int, LayoutType, int[], tv.amwa.maj.record.Rational, tv.amwa.maj.record.RGBAComponent[]) instead.

Parameters:
containerFormat - Container mechanism used to store the essence.
storedHeight - Number of pixels in vertical dimension of stored view.
storedWidth - Number of pixels in horizontal dimension of stored view.
frameLayout - Describes whether all data for a complete sample is in one frame or is split into more than one field.
videoLineMap - The scan line in the analog source that corresponds to the beginning of each digitized field. For single-field video, there is 1 value in the array; for interlaced video, there are 2 values in the array.
imageAspectRatio - Describes the ratio between the horizontal size and the vertical size in the intended final image.
pixelLayout - Order and size of the components within the pixel.
palette - Palette to include with this digital image descriptor.
paletteLayout - Layout of the values within the palette.
Throws:
NullPointerException - One or more of the arguments is null.
IllegalArgumentException - The given values are outside acceptable bounds or the pixel layout requires a palette and an adequate palette is not provided.
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(RGBADescriptor castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

getAlphaMaxRef

@AAFProperty(uuid1=67175683,
             uuid2=3328,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="AlphaMaxRef",
             typeName="UInt32",
             optional=true,
             uniqueIdentifier=false,
             pid=13320)
public int getAlphaMaxRef()
Description copied from interface: RGBADescriptor

Returns the maximum alpha value of this RGBA descriptor, for example 239 or 959 (8 or 10 bits).

If this optional property is not present, the default value of 255 is returned.

Specified by:
getAlphaMaxRef in interface RGBADescriptor
Returns:
Maximum alpha value of this RGBA descriptor.
See Also:
RGBADescriptor.ALPHAMAXREF_DEFAULT, RGBADescriptor.getAlphaMinRef(), DigitalImageDescriptor.getAlphaTransparency(), RGBAComponentKind.Alpha

setAlphaMaxRef

public void setAlphaMaxRef(Integer alphaMaxRef)
                    throws IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the maximum alpha value of the RGBA descriptor, for example 239 or 959 (8 or 10 bits).

The default value for this optional property is 255. To omit this optional property, call this method with null.

Specified by:
setAlphaMaxRef in interface RGBADescriptor
Parameters:
alphaMaxRef - Maximum alpha value of this RGBA descriptor.
Throws:
IllegalArgumentException - The given maximum alpha reference level is negative.
See Also:
RGBADescriptor.ALPHAMAXREF_DEFAULT, RGBADescriptor.setAlphaMinRef(Integer), DigitalImageDescriptor.getAlphaTransparency(), RGBAComponentKind.Alpha

getAlphaMinRef

@AAFProperty(uuid1=67175683,
             uuid2=3584,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="AlphaMinRef",
             typeName="UInt32",
             optional=true,
             uniqueIdentifier=false,
             pid=13321)
public int getAlphaMinRef()
Description copied from interface: RGBADescriptor

Returns the minimum alpha value of the RGBA descriptor, for example 16 or 64 (8 or 10 bits).

If this optional property is not present, the default value of 0 is returned.

Specified by:
getAlphaMinRef in interface RGBADescriptor
Returns:
Minimum alpha value of this RGBA descriptor.
See Also:
RGBADescriptor.ALPHAMINREF_DEFAULT, RGBADescriptor.getAlphaMaxRef(), DigitalImageDescriptor.getAlphaTransparency(), RGBAComponentKind.Alpha

setAlphaMinRef

public void setAlphaMinRef(Integer alphaMinRef)
                    throws IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the minimum alpha value of this RGBA descriptor, for example 16 or 64 (8 or 10 bits).

The default value for this property is 0. To omit this optional property, call this method with null.

Specified by:
setAlphaMinRef in interface RGBADescriptor
Parameters:
alphaMinRef - Minimum alpha value of this RGBA descriptor.
Throws:
IllegalArgumentException
See Also:
RGBADescriptor.ALPHAMINREF_DEFAULT, RGBADescriptor.setAlphaMaxRef(Integer), DigitalImageDescriptor.getAlphaTransparency(), RGBAComponentKind.Alpha

getComponentMaxRef

@AAFProperty(uuid1=67175683,
             uuid2=2816,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="ComponentMaxRef",
             typeName="UInt32",
             optional=true,
             uniqueIdentifier=false,
             pid=13318)
public int getComponentMaxRef()
Description copied from interface: RGBADescriptor

Returns the maximum value for RGB components of this RGBA descriptor, for example 239 or 959 (8 or 10 bits).

If this optional property is not present, its default value of 255 is returned.

Specified by:
getComponentMaxRef in interface RGBADescriptor
Returns:
Maximum value for RGB components of this RGBA descriptor.
See Also:
RGBADescriptor.COMPONENTMAXREF_DEFAULT, RGBADescriptor.getComponentMinRef(), RGBAComponentKind.Red, RGBAComponentKind.Green, RGBAComponentKind.Blue

setComponentMaxRef

public void setComponentMaxRef(Integer componentMaxRef)
                        throws IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the maximum value for RGB components of this RGBA descriptor, for example 239 or 959 (8 or 10 bits).

The default value for this optional property is 255. To omit this optional property, call this method with null.

Specified by:
setComponentMaxRef in interface RGBADescriptor
Parameters:
componentMaxRef - Maximum value for RGB components of this RGBA descriptor.
Throws:
IllegalArgumentException - The given component maximum reference level is negative.
See Also:
RGBADescriptor.COMPONENTMAXREF_DEFAULT, RGBADescriptor.setComponentMinRef(Integer), RGBAComponentKind.Red, RGBAComponentKind.Green, RGBAComponentKind.Blue

getComponentMinRef

@AAFProperty(uuid1=67175683,
             uuid2=3072,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="ComponentMinRef",
             typeName="UInt32",
             optional=true,
             uniqueIdentifier=false,
             pid=13319)
public int getComponentMinRef()
Description copied from interface: RGBADescriptor

Returns the minimum value for RGB components of the RGBA descriptor, for example 16 or 64 (8 or 10 bits).

If this optional property is not present, its default value of 0 is returned.

Specified by:
getComponentMinRef in interface RGBADescriptor
Returns:
Minimum value for RGB components.
See Also:
RGBADescriptor.COMPONENTMINREF_DEFAULT, RGBADescriptor.getComponentMaxRef(), RGBAComponentKind.Red, RGBAComponentKind.Green, RGBAComponentKind.Blue

setComponentMinRef

public void setComponentMinRef(Integer componentMinRef)
                        throws IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the minimum value for RGB components of the RGBA descriptor, for example 16 or 64 (8 or 10 bits).

The default value for this optional property is 0. To omit this optional property, call this method with null.

Specified by:
setComponentMinRef in interface RGBADescriptor
Parameters:
componentMinRef - Minimum value for RGB components of the RGBA descriptor.
Throws:
IllegalArgumentException - The given component minimum reference level is negative.
See Also:
RGBADescriptor.COMPONENTMINREF_DEFAULT, RGBADescriptor.setComponentMaxRef(Integer), RGBAComponentKind.Red, RGBAComponentKind.Green, RGBAComponentKind.Blue

getPalette

@AAFProperty(uuid1=67175683,
             uuid2=2048,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Palette",
             typeName="DataValue",
             optional=true,
             uniqueIdentifier=false,
             pid=13315)
public byte[] getPalette()
                  throws PropertyNotPresentException
Description copied from interface: RGBADescriptor

Returns the palette property of the RGBA descriptor, which is an array of color values that are used to specify an image. The palette is in the form specified by the palette layout. This property is optional.

Specified by:
getPalette in interface RGBADescriptor
Returns:
Palette of the RGBA descriptor.
Throws:
PropertyNotPresentException - The optional palette property is not present in this RGBA descriptor.
See Also:
RGBADescriptor.getPixelLayout(), RGBADescriptor.getPaletteLayout(), RGBAComponentKind.Palette

setPalette

public void setPalette(byte[] palette)
                throws IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the palette property of the RGBA descriptor, which is an array of color values that are used to specify an image. The palette must be in the form specified by the palette layout.

To omit this optional property, set this value to null. If the layout of this RGBA descriptor requires a palette, an IllegalArgumentException will be thrown if an attempt is made to omit the palette property.

Specified by:
setPalette in interface RGBADescriptor
Parameters:
palette - Palette of the RGBA descriptor.
Throws:
IllegalArgumentException - Cannot omit the palette for an RGBA descriptor that requires a palette.
See Also:
RGBADescriptor.getPixelLayout(), RGBADescriptor.getPaletteLayout(), RGBAComponentKind.Palette

countPaletteLayoutElements

public int countPaletteLayoutElements()
Description copied from interface: RGBADescriptor

Returns the number of components per pixel in the palette of this RGBA descriptor.

Specified by:
countPaletteLayoutElements in interface RGBADescriptor
Returns:
Number of component per pixel in the palette of this RGBA descriptor.
See Also:
RGBADescriptor.getPaletteLayout()

getPaletteSize

public int getPaletteSize()

getPaletteLayout

@AAFProperty(uuid1=67175683,
             uuid2=2304,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="PaletteLayout",
             typeName="RGBALayout",
             optional=true,
             uniqueIdentifier=false,
             pid=13316)
public RGBAComponent[] getPaletteLayout()
                                 throws PropertyNotPresentException
Description copied from interface: RGBADescriptor

Returns the layout and structure of the components of a single entry for the palette of the RGBA descriptor. The layout array contains RGBAComponent items. Each item defines a size in bits for a component and the kind of component (red, green etc.).

Specified by:
getPaletteLayout in interface RGBADescriptor
Returns:
Array of RGBA components, indicating the order and size of components in the palette of the RGBA descriptor.
Throws:
PropertyNotPresentException - The optional palette layout property is not present for this RGBA descriptor.
See Also:
RGBADescriptor.getPalette(), RGBAComponent, RGBAComponentKind.Palette

setPaletteLayout

public void setPaletteLayout(RGBAComponent[] paletteLayoutArray)
                      throws IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the layout and structure of the components of a single entry for the palette of the RGBA descriptor. The layout array contains RGBAComponent items. Each item defines a size in bits for a component and the kind of component (red, green etc.).

If you set less than 8 entries, the remaining entries will be padded with RGBAComponentKind.None and a size of zero.

To omit this optional property, call this method with null. If the RGBA descriptor requires a palette and an attempt is made to omit the property, an IllegalArgumentException will be thrown.

Specified by:
setPaletteLayout in interface RGBADescriptor
Parameters:
paletteLayoutArray - Array of RGBA components, indicating the order and size of components in the palette of the RGBA descriptor.
Throws:
IllegalArgumentException - Cannot omit the palette layout for an RGBA descriptor that requires a palette, or the given layout refers to a palette.
See Also:
RGBADescriptor.getPalette(), RGBAComponent, RGBAComponentKind.Palette

getPixelLayout

@AAFProperty(uuid1=67175683,
             uuid2=1536,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="PixelLayout",
             typeName="RGBALayout",
             optional=false,
             uniqueIdentifier=false,
             pid=13313)
public RGBAComponent[] getPixelLayout()
Description copied from interface: RGBADescriptor

Returns the layout and structure of the components in a single pixel of data represented by the RGBA descriptor. The layout array contains RGBAComponent items. Each item defines a size in bits for a component and the kind of component (red, green etc.).

Specified by:
getPixelLayout in interface RGBADescriptor
Returns:
Array of RGBA components, indicating the order and size of components in the data represented by the RGBA descriptor.

setPixelLayout

public void setPixelLayout(RGBAComponent[] pixelLayoutArray)
                    throws NullPointerException,
                           IllegalArgumentException
Description copied from interface: RGBADescriptor

Sets the layout and structure of the components in a single pixel of data represented by the RGBA descriptor. The layout array contains RGBAComponent items. Each item defines a size in bits for a component and the kind of component (red, green etc.).

If you set less than 8 entries, the remaining entries will be padded with RGBAComponentKind.None and a size of zero.

Specified by:
setPixelLayout in interface RGBADescriptor
Parameters:
pixelLayoutArray - Array of RGBA components, indicating the order and size of components in the data represented by the RGBA descriptor.
Throws:
NullPointerException - The given array of RGBA components is null or one or more of the elements of the array are null.
IllegalArgumentException
See Also:
RGBAComponent, RGBAComponentKind

countPixelLayoutElements

public int countPixelLayoutElements()
Description copied from interface: RGBADescriptor

Returns the number of components per pixel in data represented by this RGBA descriptor.

Specified by:
countPixelLayoutElements in interface RGBADescriptor
Returns:
Number of components per pixel in data represented by this RGBA descriptor.

getScanningDirection

@AAFProperty(uuid1=67175428,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="ScanningDirection",
             typeName="ScanningDirectionType",
             optional=true,
             uniqueIdentifier=false,
             pid=13317)
public ScanningDirectionType getScanningDirection()
Description copied from interface: RGBADescriptor

Returns the scanning direction of this RGBA descriptor, which specifies the scanning direction of the image. The value exactly matches the equivalent property in SMPTE 268M.

This property is optional and has a default value of ScanningDirectionType.LeftToRightTopToBottom. If the optional property is not present, the default value is returned.

Specified by:
getScanningDirection in interface RGBADescriptor
Returns:
Scanning direction of this RGBA descriptor.
See Also:
RGBADescriptor.SCANNINGDIRECTION_DEFAULT, ScanningDirectionType

setScanningDirection

public void setScanningDirection(ScanningDirectionType scanningDirection)
Description copied from interface: RGBADescriptor

Sets the scanning direction of this RGBA descriptor, which specifies the scanning direction of the image. The value exactly matches the equivalent property in SMPTE 268M.

This property is optional and has a default value of ScanningDirectionType.LeftToRightTopToBottom. To omit this optional property, call this method with null.

Specified by:
setScanningDirection in interface RGBADescriptor
Parameters:
scanningDirection - Scanning direction of this RGBA descriptor.
See Also:
RGBADescriptor.SCANNINGDIRECTION_DEFAULT, ScanningDirectionType

equals

public boolean equals(Object o)
Description copied from interface: MAJCommon

Tests to see if the given object is equal to this interchange object. To be equal, the given value must be not null, share the same interface to its value and each of the properties of the value must each be equal.

Specified by:
equals in interface MAJCommon
Overrides:
equals in class DigitalImageDescriptor
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from interface: MAJCommon

Returns a hash code value for this interchange object.

Specified by:
hashCode in interface MAJCommon
Overrides:
hashCode in class DigitalImageDescriptor
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public RGBADescriptor clone()
Description copied from interface: MAJCommon

Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.

This method does not throw a CloneNotSupportedException as all entity values must implement the Cloneable interface. If a cloning error does occur, a null value will be returned but this is very unlikely to happen.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class EssenceDescriptor
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: XMLSerializable

Append child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the XMLBuilder class are provided to help with this process.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class DigitalImageDescriptor
Parameters:
parent - XML parent element to append child nodes to.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.