areaDetector  3-5-0
EPICS areaDetector framework
Macros | Functions | Variables
mar3xx_pck.c File Reference
#include <stdio.h>
#include <stddef.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include "types.h"
#include "mar3xx_pck.h"

Macros

#define PACKIDENTIFIER   "\nCCP4 packed image, X: %04d, Y: %04d\n"
 
#define PACKBUFSIZ   BUFSIZ
 
#define DIFFBUFSIZ   16384
 
#define max(x, y)   (((x) > (y)) ? (x) : (y))
 
#define min(x, y)   (((x) < (y)) ? (x) : (y))
 
#define abs(x)   (((x) < 0) ? (-(x)) : (x))
 
#define shift_left(x, n)   (((x) & setbits[32 - (n)]) << (n))
 
#define shift_right(x, n)   (((x) >> (n)) & setbits[32 - (n)])
 

Functions

int put_pck (INT16 *img, int x, int y, int fdesc)
 
void get_pck (FILE *fp, INT16 *img)
 

Variables

const INT32 setbits [33]
 

Macro Definition Documentation

◆ abs

#define abs (   x)    (((x) < 0) ? (-(x)) : (x))

◆ DIFFBUFSIZ

#define DIFFBUFSIZ   16384

◆ max

#define max (   x,
 
)    (((x) > (y)) ? (x) : (y))

◆ min

#define min (   x,
 
)    (((x) < (y)) ? (x) : (y))

◆ PACKBUFSIZ

#define PACKBUFSIZ   BUFSIZ

◆ PACKIDENTIFIER

#define PACKIDENTIFIER   "\nCCP4 packed image, X: %04d, Y: %04d\n"

◆ shift_left

#define shift_left (   x,
 
)    (((x) & setbits[32 - (n)]) << (n))

◆ shift_right

#define shift_right (   x,
 
)    (((x) >> (n)) & setbits[32 - (n)])

Function Documentation

◆ get_pck()

void get_pck ( FILE *  fp,
INT16 img 
)

◆ put_pck()

int put_pck ( INT16 img,
int  x,
int  y,
int  fdesc 
)

Variable Documentation

◆ setbits

const INT32 setbits[33]
Initial value:
= {0x00000000, 0x00000001, 0x00000003, 0x00000007,
0x0000000F, 0x0000001F, 0x0000003F, 0x0000007F,
0x000000FF, 0x000001FF, 0x000003FF, 0x000007FF,
0x00000FFF, 0x00001FFF, 0x00003FFF, 0x00007FFF,
0x0000FFFF, 0x0001FFFF, 0x0003FFFF, 0x0007FFFF,
0x000FFFFF, 0x001FFFFF, 0x003FFFFF, 0x007FFFFF,
0x00FFFFFF, 0x01FFFFFF, 0x03FFFFFF, 0x07FFFFFF,
0x0FFFFFFF, 0x1FFFFFFF, 0x3FFFFFFF, 0x7FFFFFFF,
0xFFFFFFFF}