Main Page   Modules   Data Structures   File List   Data Fields   Globals  

incl/funcdef.h File Reference

Functions definition for usual i/o. More...

Go to the source code of this file.

Defines

#define RD_spec(spectre, i)
#define WR_spec(spectre, i, val)
#define RD_qspec(spectre, i)   (spectre)->quality[i]
#define WR_qspec(spectre, i, val)   (spectre)->quality[i] = (long)(val)
#define in_spectrum(spectre, x)   (((x)<((spectre)->start-(spectre)->step/2)) || ((x)>((spectre)->end+(spectre)->step/2))) ? 0:1
#define coord_spec(spectre, i)   ((spectre)->start + (i)*(spectre)->step)
#define pixel_spec(spectre, x)   (0.5 + ((x) - (spectre)->start)/(spectre)->step)
#define RD_slice(slice, i)
#define WR_slice(slice, i, val)
#define RD_qslice(slice, i)   (slice)->quality[i]
#define WR_qslice(slice, i, val)   (slice)->quality[i] = (long)(val)
#define RD_frame(frame, i, j)
#define WR_frame(frame, i, j, val)
#define RD_qframe(frame, i, j)   (frame)->quality[(i)+(j)*(frame)->nx]
#define WR_qframe(frame, i, j, val)   (frame)->quality[(i)+(j)*(frame)->nx] = (long)(val)
#define in_frame(frame, x, y)   (((x)<(frame)->startx) || ((x)>(frame)->endx) || ((y)<(frame)->starty) || ((y)>(frame)->endy)) ? 0:1
#define RD_cube(cube, i, j, k)
#define WR_cube(cube, i, j, k, val)
#define RD_qcube(cube, i, j, k)   (cube)->quality[(i)+(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny]
#define WR_qcube(cube, i, j, k, val)   (cube)->quality[(i)+(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny] = (long)(val)
#define in_cube(cube, x, y, z)


Detailed Description

Functions definition for usual i/o.

Author:
A.Rousset
Version:
4.0 1992-June-12 : Creation, AR
Copyright:
(c) 1992 Observatoire de Lyon - St Genis-Laval (France)

Definition in file funcdef.h.


Define Documentation

#define RD_spec spectre,
 ) 
 

Value:

(((spectre)->data_type) == SHORT ? (spectre)->data.s_data[i] : \
        (((spectre)->data_type) == LONG ? (spectre)->data.l_data[i] : \
        (((spectre)->data_type) == INT ? (spectre)->data.l_data[i] : \
        (((spectre)->data_type) == FLOAT ? (spectre)->data.f_data[i] : \
        (((spectre)->data_type) == DOUBLE ? (spectre)->data.d_data[i] : MAXSHORT)))))

Definition at line 13 of file funcdef.h.

Referenced by convert_spec(), get_E3D_frame(), and interpolate_noise().

#define WR_spec spectre,
i,
val   ) 
 

Value:

switch ((spectre)->data_type) {\
                case SHORT  : (spectre)->data.s_data[i] = (short)(val); break; \
                case LONG   : (spectre)->data.l_data[i] = (long)(val); break; \
                case INT   : (spectre)->data.l_data[i] = (long)(val); break; \
                case FLOAT  : (spectre)->data.f_data[i] = (float)(val); break; \
                case DOUBLE : (spectre)->data.d_data[i] = (double)(val); break; \
        }

Definition at line 20 of file funcdef.h.

Referenced by convert_spec(), interpolate_noise(), and save_E3D_slice().

#define RD_qspec spectre,
 )     (spectre)->quality[i]
 

Definition at line 29 of file funcdef.h.

Referenced by get_E3D_frame().

#define WR_qspec spectre,
i,
val   )     (spectre)->quality[i] = (long)(val)
 

Definition at line 30 of file funcdef.h.

#define in_spectrum spectre,
 )     (((x)<((spectre)->start-(spectre)->step/2)) || ((x)>((spectre)->end+(spectre)->step/2))) ? 0:1
 

Definition at line 32 of file funcdef.h.

#define coord_spec spectre,
 )     ((spectre)->start + (i)*(spectre)->step)
 

Definition at line 33 of file funcdef.h.

#define pixel_spec spectre,
 )     (0.5 + ((x) - (spectre)->start)/(spectre)->step)
 

Definition at line 34 of file funcdef.h.

#define RD_slice slice,
 ) 
 

Value:

(((slice)->data_type) == SHORT ? (slice)->data.s_data[i] : \
        (((slice)->data_type) == LONG ? (slice)->data.l_data[i] : \
        (((slice)->data_type) == INT ? (slice)->data.l_data[i] : \
        (((slice)->data_type) == FLOAT ? (slice)->data.f_data[i] : \
        (((slice)->data_type) == DOUBLE ? (slice)->data.d_data[i] : MAXSHORT)))))

Definition at line 38 of file funcdef.h.

Referenced by save_E3D_slice().

#define WR_slice slice,
i,
val   ) 
 

Value:

switch ((slice)->data_type) {\
                case SHORT  : (slice)->data.s_data[i] = (short)(val); break; \
                case LONG   : (slice)->data.l_data[i] = (long)(val); break; \
                case INT    : (slice)->data.l_data[i] = (long)(val); break; \
                case FLOAT  : (slice)->data.f_data[i] = (float)(val); break; \
                case DOUBLE : (slice)->data.d_data[i] = (double)(val); break; \
        }

Definition at line 45 of file funcdef.h.

Referenced by extract_E3D_slice().

#define RD_qslice slice,
 )     (slice)->quality[i]
 

Definition at line 54 of file funcdef.h.

#define WR_qslice slice,
i,
val   )     (slice)->quality[i] = (long)(val)
 

Definition at line 55 of file funcdef.h.

#define RD_frame frame,
i,
 ) 
 

Value:

(((frame)->data_type) == SHORT ? (frame)->data.s_data[(i)+(j)*(frame)->nx]: \
   (((frame)->data_type) == LONG ? (frame)->data.l_data[(i)+(j)*(frame)->nx] : \
   (((frame)->data_type) == INT ? (frame)->data.l_data[(i)+(j)*(frame)->nx] : \
   (((frame)->data_type) == FLOAT ? (frame)->data.f_data[(i)+(j)*(frame)->nx]: \
   (((frame)->data_type) == DOUBLE ? (frame)->data.d_data[(i)+(j)*(frame)->nx]: MAXSHORT)))))

Definition at line 59 of file funcdef.h.

Referenced by convert_image(), and image_minmax().

#define WR_frame frame,
i,
j,
val   ) 
 

Value:

switch ((frame)->data_type) {\
                case SHORT  : (frame)->data.s_data[(i)+(j)*(frame)->nx]=(short)(val); \
                                                break; \
                case LONG   : (frame)->data.l_data[(i)+(j)*(frame)->nx]=(long)(val); \
                                                break; \
                case INT   : (frame)->data.l_data[(i)+(j)*(frame)->nx]=(long)(val); \
                                                break; \
                case FLOAT  : (frame)->data.f_data[(i)+(j)*(frame)->nx]=(float)(val); \
                                                break; \
                case DOUBLE : (frame)->data.d_data[(i)+(j)*(frame)->nx]=(double)(val);\
                                                break; \
 }

Definition at line 66 of file funcdef.h.

Referenced by convert_image(), and get_E3D_frame().

#define RD_qframe frame,
i,
 )     (frame)->quality[(i)+(j)*(frame)->nx]
 

Definition at line 80 of file funcdef.h.

#define WR_qframe frame,
i,
j,
val   )     (frame)->quality[(i)+(j)*(frame)->nx] = (long)(val)
 

Definition at line 81 of file funcdef.h.

Referenced by get_E3D_frame().

#define in_frame frame,
x,
 )     (((x)<(frame)->startx) || ((x)>(frame)->endx) || ((y)<(frame)->starty) || ((y)>(frame)->endy)) ? 0:1
 

Definition at line 83 of file funcdef.h.

#define RD_cube cube,
i,
j,
 ) 
 

Value:

(((cube)->data_type) == SHORT ? (cube)->data.s_data[(i)\
                +(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny]: \
 (((cube)->data_type) == INT ? (cube)->data.l_data[(i)\
                +(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny] : \
 (((cube)->data_type) == LONG ? (cube)->data.l_data[(i)\
                +(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny] : \
 (((cube)->data_type) == FLOAT ? (cube)->data.f_data[(i)\
                +(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny]: \
 (((cube)->data_type) == DOUBLE ? (cube)->data.d_data[(i)\
                +(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny]: MAXSHORT)))))

Definition at line 87 of file funcdef.h.

Referenced by cube_minmax().

#define WR_cube cube,
i,
j,
k,
val   ) 
 

Value:

switch ((cube)->data_type) {\
                case SHORT  : (cube)->data.s_data[(i) \
                        +(j)*(cube)->nx +(k)*(cube)->nx*(cube)->ny]=(short)(val); \
                                                break; \
                case LONG   : (cube)->data.l_data[(i) \
                        +(j)*(cube)->nx +(k)*(cube)->nx*(cube)->ny]=(long)(val); \
                                                break; \
                case INT   : (cube)->data.l_data[(i) \
                        +(j)*(cube)->nx +(k)*(cube)->nx*(cube)->ny]=(long)(val); \
                                                break; \
                case FLOAT  : (cube)->data.f_data[(i) \
                        +(j)*(cube)->nx +(k)*(cube)->nx*(cube)->ny]=(float)(val); \
                                                break; \
                case DOUBLE : (cube)->data.d_data[(i) \
                        +(j)*(cube)->nx +(k)*(cube)->nx*(cube)->ny]=(double)(val);\
                                                break; \
 }

Definition at line 99 of file funcdef.h.

#define RD_qcube cube,
i,
j,
 )     (cube)->quality[(i)+(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny]
 

Definition at line 118 of file funcdef.h.

#define WR_qcube cube,
i,
j,
k,
val   )     (cube)->quality[(i)+(j)*(cube)->nx+(k)*(cube)->nx*(cube)->ny] = (long)(val)
 

Definition at line 119 of file funcdef.h.

#define in_cube cube,
x,
y,
 ) 
 

Value:

(((x)<(cube)->startx) || ((x)>(cube)->endx) \
 || ((y)<(cube)->starty) || ((y)>(cube)->endy) \
 || ((z)<(cube)->startz) || ((z)>(cube)->endz)) ? 0:1

Definition at line 121 of file funcdef.h.


Generated on Tue Jul 1 17:35:46 2003 for IFU_C_iolibs by doxygen1.3