BRL-CAD

Definitions used in the LIBICV image processing library. More...

Collaboration diagram for Definitions:

Files

file  defines.h
 

Data Structures

struct  icv_image
 

Macros

#define ICV_NULL_IMAGE   0X0001
 
#define ICV_SANITIZED   0X0002
 
#define ICV_OPERATIONS_MODE   0x0004
 
#define ICV_UNDEFINED_1   0x0008
 
#define ICV_IMAGE_NULL   ((struct icv_image *)0)
 
#define ICV_CK_IMAGE(_i)   ICV_CKMAG(_i, ICV_IMAGE_MAGIC, "icv_image")
 
#define ICV_IMAGE_INIT(_i)
 
#define ICV_IMAGE_IS_INITIALIZED(_i)   (((struct icv_image *)(_i) != ICV_IMAGE_NULL) && LIKELY((_i)->magic == ICV_IMAGE_MAGIC))
 
#define ICV_IMAGE_VAL_INT(_i)   if (!ICV_IMAGE_IS_INITIALIZED(_i)) return -1
 
#define ICV_IMAGE_VAL_PTR(_i)   if (!ICV_IMAGE_IS_INITIALIZED(_i)) return NULL
 
#define ICV_CONV_8BIT(data)   ((double)(data))/255.0
 

Typedefs

typedef struct icv_image icv_image_t
 

Enumerations

enum  ICV_COLOR_SPACE { ICV_COLOR_SPACE_RGB , ICV_COLOR_SPACE_GRAY }
 
enum  ICV_DATA { ICV_DATA_DOUBLE , ICV_DATA_UCHAR }
 

Detailed Description

Definitions used in the LIBICV image processing library.

Macro Definition Documentation

◆ ICV_NULL_IMAGE

#define ICV_NULL_IMAGE   0X0001

Definition at line 62 of file defines.h.

◆ ICV_SANITIZED

#define ICV_SANITIZED   0X0002

Definition at line 63 of file defines.h.

◆ ICV_OPERATIONS_MODE

#define ICV_OPERATIONS_MODE   0x0004

Definition at line 64 of file defines.h.

◆ ICV_UNDEFINED_1

#define ICV_UNDEFINED_1   0x0008

Definition at line 65 of file defines.h.

◆ ICV_IMAGE_NULL

#define ICV_IMAGE_NULL   ((struct icv_image *)0)

Definition at line 78 of file defines.h.

◆ ICV_CK_IMAGE

#define ICV_CK_IMAGE (   _i)    ICV_CKMAG(_i, ICV_IMAGE_MAGIC, "icv_image")

asserts the integrity of a icv_image_file struct.

Definition at line 83 of file defines.h.

◆ ICV_IMAGE_INIT

#define ICV_IMAGE_INIT (   _i)
Value:
{ \
(_i)->magic = ICV_IMAGE_MAGIC; \
(_i)->width = (_i)->height = (_i)->channels = (_i)->alpha_channel = 0; \
(_i)->gamma_corr = 0.0; \
(_i)->data = NULL; \
}
#define ICV_IMAGE_MAGIC
Definition: magic.h:235

initializes a icv_image_file struct without allocating any memory.

Definition at line 88 of file defines.h.

◆ ICV_IMAGE_IS_INITIALIZED

#define ICV_IMAGE_IS_INITIALIZED (   _i)    (((struct icv_image *)(_i) != ICV_IMAGE_NULL) && LIKELY((_i)->magic == ICV_IMAGE_MAGIC))

returns truthfully whether a icv_image_file has been initialized.

Definition at line 98 of file defines.h.

◆ ICV_IMAGE_VAL_INT

#define ICV_IMAGE_VAL_INT (   _i)    if (!ICV_IMAGE_IS_INITIALIZED(_i)) return -1

Validates input icv_struct, if failure (in validation) returns -1

Definition at line 104 of file defines.h.

◆ ICV_IMAGE_VAL_PTR

#define ICV_IMAGE_VAL_PTR (   _i)    if (!ICV_IMAGE_IS_INITIALIZED(_i)) return NULL

Validates input icv_struct, if failure (in validation) returns NULL

Definition at line 109 of file defines.h.

◆ ICV_CONV_8BIT

#define ICV_CONV_8BIT (   data)    ((double)(data))/255.0

Converts to double (icv data) type from unsigned char(8bit).

Definition at line 116 of file defines.h.

Typedef Documentation

◆ icv_image_t

typedef struct icv_image icv_image_t

Definition at line 77 of file defines.h.

Enumeration Type Documentation

◆ ICV_COLOR_SPACE

Enumerator
ICV_COLOR_SPACE_RGB 
ICV_COLOR_SPACE_GRAY 

Definition at line 50 of file defines.h.

◆ ICV_DATA

enum ICV_DATA
Enumerator
ICV_DATA_DOUBLE 
ICV_DATA_UCHAR 

Definition at line 56 of file defines.h.