Horus Doc ||
Corba Reference ||
Corba
Client Server
Stubs C++
Stubs Java
Servant Generator
RGB image display data transfer
Transferring image data from server to client for the purpose of image display is a frequent operation that requires quite a lot of resources. For reasons of efficiency and easy of use, we introduce several ways to transfer image data in RGB format for a Corba object from server to client. The efficiency and feasibility of an approach depend upon the client-server connection.
IDL definitions related to RGB data transfer
- Using the Corba (image data) object itself
- Call the getRgb2d member function of the Corba object to obtain an RgbSeq. An RgbSeq is an array of integers with pixel values in RGB format. Currently, the ImageData and ImageSeq IDL definitions support this (see ad 1.1 - getRgb2d of image object).
- Call the fillRgb2d member function of the Corba object to have it fill an RgbBuffer. An RgbBuffer is an object that is capable of storing image data in RGB format. In case the RgbBuffer servant was constructed around your own destination buffer the transfer is now completed. Otherwise, you can ask the RgbBuffer to produce an RgbSeq via getRgb. Currently, the ImageData and ImageSeq IDL definitions support filling of an RgbBuffer (see ad 1.2 - fillRgb2d of image object).
- Using an RgbSource obtained from the Corba (image data) object. An RgbSource is used to abstract from the Corba (image data) object, the parameters used in preparing the RGB data, and the actual transfer mechanism used.
- Call the getRgb member function of the RgbSource object to obtain an RgbSeq. Currently, the ImageRepRgbSource IDL definition support this (see ad 2.1 - getRgb of RgbSource). NOTE that ImageSeq uses an ImageSeqDisplayer that has a function similar to RgbSource but it still has to be rewritten.
- Call the fillRgb member function of the RgbSource object to have it fill an RgbBuffer. Currently, the ImageRepRgbSource IDL definition support this (see ad 2.2 - fillRgb of RgbSource). NOTE that ImageSeq uses an ImageSeqDisplayer that has a function similar to RgbSource but it still has to be rewritten.
Server side classes related to RGB data transfer
Classes in the diagram: HxImageRepTiedSvt, HxImageRepRgbSource, HxRgbBuffer, HxRgbBufferServant. A similar structure holds for HxImageSeqTiedSvt and HxImageSeqDisplayer.
ad 1.1 - getRgb2d of image object
IDL interface excerpt:
interface ImageData
{
RgbSeq getRgb2d(in string displayMode);
}
interface ImageSeq
{
RgbSeq getRgb2d(in long frameNr, in string displayMode);
}
The actual functions called are HxImageRepTiedSvt::getRgb2d and HxImageSeqTiedSvt::getRgb2d. They create an HxRgbBuffer, ask the corresponding image object to fill the buffer, and ask the HxRgbBuffer to produce an RgbSeq.
ad 1.2 - fillRgb2d of image object
IDL interface excerpt:
interface ImageData
{
void fillRgb2d(in RgbBuffer buf, in string displayMode);
}
interface ImageSeq
{
void fillRgb2d(in long frameNr, in RgbBuffer buf, in string displayMode);
}
The actual functions called are HxImageRepTiedSvt::fillRgb2d and HxImageSeqTiedSvt::fillRgb2d. They create an HxRgbBuffer and ask the corresponding image object to fill the buffer.
IDL interface excerpt:
interface RgbBuffer
{
RgbSeq getRgb();
}
The actual function called is HxRgbBufferServant::getRgb. It creates an RgbSeq from data in its internal buffer.
ad 2.1 - getRgb of RgbSource
IDL interface excerpt:
interface RgbSource
{
RgbSeq getRgb();
}
The actual functions called are HxImageRepRgbSource::getRgb and HxImageSeqDisplayer::getRgb2d. They ask the image data object to fill their internal buffer and create an RgbSeq from that buffer. The RgbSeq can be sent in batches or at once.
ad 2.2 - fillRgb of RgbSource
IDL interface excerpt:
interface RgbSource
{
void fillRgb(in RgbBuffer buffer);
}
The actual functions called are HxImageRepRgbSource::fillRgb and HxImageSeqDisplayer::fillRgb2d. They create an HxRgbBuffer and ask the corresponding image object to fill the buffer. The buffer can be filled in batches or at once.
Go to the next section or
return to the index.
Generated on Tue Feb 3 14:20:17 2004 for CorbaReference by
1.2.12 written by Dimitri van Heesch,
© 1997-2001