passing image data



Hi,

I want a client sequence (image data) to be filled by an ORBit server.
As I did it, I defined an octet sequence and then defined a structure to
keep all the additional information.

How do I allocate the memory in the client, before asking the sever to
fill the data and how do I fill the sequence "buffer" with data. How do
I reach the addres of the "EzxImgObj->EzxImgBuf->buffer" pointer to
write to in the server ????

What if I already have allocated a guchar buffer for GDK to contain the
image data on the client, can I just point EzxImgBuf.buffer in the
sequence to the same memory space ? In the server "EzxImgObj"
subelements are pointers, but i cannot reach the embedded "EzxImgBuf"
"_buffer" by "EzxImgObj->EzxImgBuf->buffer"

Is there any example which can be found in a simple way to show how a
server fills a "nested" structure as in this case ?

typedef sequence<octet> EzxImgBuf;

struct EzxImgObj {
	char name[64];
	EzxImgBuf data;
	short type;
	long width;
	long height;
	long depth;
	long slice;
	short axis;
	long clut;
};

short ReadImage( inout EzxImgObj Ezximg, out string message);


Best regards,

Peter Van Osta

Union Biometrica N.V./S.A.
European Scientific Operations (ESO)
Cipalstraat 3
B-2440 Geel
Belgium
Tel.: +32 (0)14 570 619
Fax.: +32 (0)14 570 621

http://www.unionbio.com/

http://ourworld.compuserve.com/homepages/pvosta/cvwww.htm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]