Class: TPixelLayout

Declaration: PixelLayout.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TPixelLayout describes the physical layout of image data in memory. TPixelLayout objects are used to communicate between images, pixel buffers, and pixel stream readers as to the format of the image data. TPixelLayout supports a flexible number of color channels--paths through the image data that extract a single component of a color specification. For example, when specifying RGB colors there are three channels; one each for the red, green, and blue components of the color.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TPixelLayout::~TPixelLayout

~ TPixelLayout ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetNumberOfChannels

unsigned long GetNumberOfChannels () const

Interface Category:

API.

Purpose:

Gets the number of channels in this pixel layout. The maximum number of channels is 16.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns an unsigned long integer that is the number of channels.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetPixelLayoutHash

unsigned long GetPixelLayoutHash () const

Interface Category:

API.

Purpose:

Gets the unique pixel layout number that identifies the layout of the image pixels. Used to compare different pixel layouts without comparing all of the other layout attributes.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns an unsigned long integer that is the pixel layout hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetInterleaveType

EInterleaveType GetInterleaveType () const

Interface Category:

API.

Purpose:

Gets the interleave type used to store the image data. The result is one of the values of the enumerated type EInterleaveType, defined by this class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns an EInterleaveType that is the interleave type for this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetChannelContent

unsigned long GetChannelContent (unsigned long channelNumber) const

Interface Category:

API.

Purpose:

Gets the content of the specified channel. The content indicates which component of a color is stored in that particular channel. For example, one channel for RGB colors contains the red component of the color. If the channel number is invalid, this function returns kCustomStorageFormaty.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns an unsigned long integer that indicates the content of the channel.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetChannelFormat

EStorageFormat GetChannelFormat (unsigned long channelNumber) const

Interface Category:

API.

Purpose:

Gets the channel format for the specified channel. The channel format is the data type used to store the image data. The result is one of the values of the enumerated type EStorageFormat, defined by this class. If the channel number is invalid, this function returns kCustomStorageFormaty.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns an EStorageFormat value indicating the data type used to store the image data.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetChannelRangeAsStored

void GetChannelRangeAsStored (unsigned long channelNumber, double & min, double & max) const

Interface Category:

API.

Purpose:

Gets the minimum and maximum values that can be stored in the pixel buffer. This range is tightly coupled to the data type used to store the data. For example, if a single bit is used to store the data, the minimum value that can be stored is 0, and the maximum value that can be stored is 1. If the channel number is invalid, this function returns NULL for both the minimum and the maximum values.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::GetChannelRangeAsRepresented

void GetChannelRangeAsRepresented (unsigned long channelNumber, double & min, double & max) const

Interface Category:

API.

Purpose:

Gets the minimum and maximum values that can be represented by the pixel buffer. This range is tightly coupled to the color model used to specify colors. For example, if RGB is used to represent the colors, the smallest value that can be used is 0, and the largest is 1. If the channel number is invalid, this function returns NULL for both the minimum and the maximum values.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetNumberOfChannels

void SetNumberOfChannels (unsigned long)

Interface Category:

API.

Purpose:

Sets the number of channels in this pixel layout. The maximum number of channels is 16.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetInterleaveType

void SetInterleaveType (EInterleaveType interleaveType)

Interface Category:

API.

Purpose:

Sets the interleave type used to store the image data. The required parameter is one of the values of the enumerated type EInterleaveType, defined by this class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetChannelContent

void SetChannelContent (unsigned long channelNumber, unsigned long content)

Interface Category:

API.

Purpose:

Sets the content of the specified channel. The content indicates which component of a color is stored in that particular channel. For example, one channel for RGB colors contains the red component of the color. If the channel number is invalid, this function returns kCustomStorageFormaty.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetChannelFormat

void SetChannelFormat (unsigned long channelNumber, EStorageFormat format)

Interface Category:

API.

Purpose:

Sets the channel format for the specified channel. The channel format is the data type used to store the image data. The required parameter is one of the values of the enumerated type EStorageFormat, defined by this class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetChannelRangeAsStored

void SetChannelRangeAsStored (unsigned long channelNumber, double min, double max)

Interface Category:

API.

Purpose:

Sets the minimum and maximum values that can be stored in the pixel buffer. This range is tightly coupled to the data type used to store the data. For example, if a single bit is used to store the data, the minimum value that can be stored is 0, and the maximum value that can be stored is 1.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetChannelRangeAsRepresented

void SetChannelRangeAsRepresented (unsigned long channelNumber, double min, double max)

Interface Category:

API.

Purpose:

Sets the minimum and maximum values that can be represented by the pixel buffer. This range is tightly coupled to the color model used to specify colors. For example, if RGB is used to represent the colors, the smallest value that can be used is 0, and the largest is 1.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::SetPixelLayoutHash

void SetPixelLayoutHash (unsigned long)

Interface Category:

API.

Purpose:

Sets the unique pixel layout number that identifies this layout.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::operator>>=

TStream & operator >>=(TStream & towhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::operator<<=

TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::PrintDebugInfo

void PrintDebugInfo (bool) const

Interface Category:

API.

Purpose:

This function will be removed in the next release. Prints the channel count, signature hash, interleave type, channel format, and channel content for this pixel layout. Used for debugging purposes.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::operator=

TPixelLayout & operator =(const TPixelLayout & a)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::operator==

bool operator ==(const TPixelLayout & a) const

Interface Category:

API.

Purpose:

Tests whether two objects are equal.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if the two objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::operator!=

bool operator != (const TPixelLayout & a) const

Interface Category:

API.

Purpose:

Tests whether two objects are equal.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if the two objects are not equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::IsPixelLayoutStandard

static bool IsPixelLayoutStandard (unsigned long pixelLayoutHash)

Interface Category:

API.

Purpose:

Test whether the pixellayouthash is a built in or standard type.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if pixelLayoutHash is a standard type .

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPixelLayout::TPixelLayout

  1. TPixelLayout ()
  2. TPixelLayout (const TPixelLayout &)
  3. TPixelLayout (unsigned long pixelHash)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.
  3. Initializes the instance variables to correspond to the given pixelhash.

Calling Context:

  1. Called by the stream-in operators. You can also call this function directly.
  2. Called to copy an object. Call this function directly.
  3. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.