﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
25	psImage format/ union naming	robert.desonia@…	eugene	"As the union in psImage consists of pointers of pointers, it is misleading to
call it 'rows'.  Also, using rows_TYPE for the members further makes things
awkward looking.  I suggest something like the following definition for psImage
so that image data is accessed as img->data.f32[row][col] as opposed to
img->rows.rows_f32[row][col] :

typedef struct psImage
{
    const psType type;                  ///< Image data type and dimension.
    const unsigned int numCols;         ///< Number of columns in image
    const unsigned int numRows;         ///< Number of rows in image.
    const int col0;                     ///< Column position relative to parent.
    const int row0;                     ///< Row position relative to parent.

    union {
        uint8_t **ui8;                  ///< unsigned 8-bit integer data.
        uint16_t **ui16;                ///< unsigned 16-bit integer data.
        uint32_t **ui32;                ///< unsigned 32-bit integer data.
        int8_t **i8;                    ///< signed 8-bit integer data.
        int16_t **i16;                  ///< signed 16-bit integer data.
        int32_t **i32;                  ///< signed 32-bit integer data.
        float **f32;                    ///< single-precision float data.
        double **f64;                   ///< double-precision float data.
        complex float **c32;            ///< single-precision complex data.
        void    **v;                    ///< void pointers to data
    } data;                             ///< Union for data types.
    struct psImage *parent;             ///< Parent, if a subimage.
    int nChildren;                      ///< Number of subimages.
    struct psImage *children;           ///< Children of this region.
}
psImage;"	defect	closed	high		PSLib SDRS	unspecified	normal	fixed		
