IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#516 closed defect (fixed)

psImage struct

Reported by: David.Robbins@… Owned by: Paul Price
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc: robert.desonia@…

Description

psLib image struct uses a psPtr rawDataBuffer that is not in the SDRS but is needed.
it is required so that subimages can reference count the raw data buffer.

Change History (3)

comment:1 by Paul Price, 21 years ago

Status: newassigned

Since the user shouldn't be mucking with the rawDataBuffer, shouldn't we bury it?

typedef psPtr p_psImageRaw;

typedef struct psImage {
....

p_psImageRaw *private;

} psImage;

comment:2 by robert.desonia@…, 21 years ago

Cc: robert.desonia@… added

You have a point, but I think it would be really sufficient to just rename it to 'p_rawDataBuffer', i.e.,
mark it private by our naming convention. Agree?

comment:3 by Paul Price, 21 years ago

Resolution: fixed
Status: assignedclosed

The idea of introducing a new type is so that it can be hidden from the user,
but I'm not fussy. Here's what I've got:

typedef struct psImage {

psMathType type; /< image data type and dimension
const int numCols;
/< Number of columns in image
const int numRows; /< Number of rows in image.
const int col0;
/< Column position relative to parent.
const int row0; /< Row position relative to parent.
union {

psS8 S8; /< Pointers to char data
psS16
S16; /< Pointers to short-integer data
psS32 S32; /< Pointers to integer data
psS64
S64; /< Pointers to long-integer data
psU8 U8; /< Pointers to unsigned-char data
psU16
U16; /< Pointers to unsigned-short-integer data
psU32 U32; /< Pointers to unsigned-integer data
psU64
U64; /< Pointers to unsigned-long-integer data
psF32 F32; /< Pointers to floating-point data
psF64
F64; /< Pointers to double-precision data
psC32 C32; /< Pointers to complex floating-point data
psC64
C64; /< Pointers to complex floating-point data
psPtr V; /< Pointers to untyped data

} data;
const struct psImage *parent; /< parent, if a subimage
psPtr p_rawDataBuffer;
/< Raw data; private
psArray *children; /< children of this region
void *lock;
/< Lock for thread safety

} psImage;

Note: See TracTickets for help on using tickets.