Mamba C API reference

Version 2.0

MB_Common.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  MB_Image
 
struct  MB3D_Image
 

Macros

#define MB_API_ENTRY
 
#define MB_API_CALL
 
#define MB_ROUND_W   64
 
#define MB_ROUND_H   2
 
#define MB_MAX_IMAGE_SIZE   ((Uint64)4294967296)
 

Typedefs

typedef uint8_t Uint8
 
typedef uint16_t Uint16
 
typedef uint32_t Uint32
 
typedef uint64_t Uint64
 
typedef int8_t Sint8
 
typedef int16_t Sint16
 
typedef int32_t Sint32
 
typedef int64_t Sint64
 
typedef uint8_t PIX8
 
typedef PIX8PLINE
 
typedef uint32_t PIX32
 
typedef PIX32PLINE32
 

Enumerations

enum  MB_grid_t { MB_HEXAGONAL_GRID = 1, MB_SQUARE_GRID = 0 }
 
enum  MB_edgemode_t { MB_EMPTY_EDGE = 0, MB_FILLED_EDGE = 1 }
 
enum  MB3D_grid_t { MB3D_INVALID_GRID = -1, MB3D_CUBIC_GRID = 1024, MB3D_FCC_GRID = 1025 }
 
enum  MB_Neighbors_code_t {
  MB_NEIGHBOR_0 = 0x0001, MB_NEIGHBOR_1 = 0x0002, MB_NEIGHBOR_2 = 0x0004, MB_NEIGHBOR_3 = 0x0008,
  MB_NEIGHBOR_4 = 0x0010, MB_NEIGHBOR_5 = 0x0020, MB_NEIGHBOR_6 = 0x0040, MB_NEIGHBOR_7 = 0x0080,
  MB_NEIGHBOR_8 = 0x0100, MB_NEIGHBOR_ALL_HEXAGONAL = 0x07f, MB_NEIGHBOR_ALL_SQUARE = 0x01ff
}
 

Macro Definition Documentation

#define MB_MAX_IMAGE_SIZE   ((Uint64)4294967296)

Image limit size in total number of pixels. When considering the limits on the image size, remember that the function computing the volume which returns Uint64 should not overflow on the 32-bit images. (that is, max volume for the 32-bit image is 2^64-1) which yields approx 4.3 billions pixels so roughly 65536*65536 images size. However, if we compute a watershed transform, the number of allowed labels is 2^24 (3 lower bytes of the label image). Therefore, if, in a large image, the number of labels exceeds this value, some basins of the watershed transform will share the same label. You must be aware of this possibility.

#define MB_ROUND_H   2

Making sure the image size is multiple of 2 for the height.

#define MB_ROUND_W   64

Making sure the image size is multiple of 64 for the width.

Typedef Documentation

typedef uint32_t PIX32

Signed 32-bit pixels value type

typedef uint8_t PIX8

grey-scale pixels value type

typedef PIX8* PLINE

Pixels line pointers type

typedef PIX32* PLINE32

32-bit pixels line pointers type

typedef int16_t Sint16

Signed 16-bit value type

typedef int32_t Sint32

Signed 32-bit value type

typedef int64_t Sint64

Signed 64-bit value type

typedef int8_t Sint8

Signed 8-bit value type

typedef uint16_t Uint16

Unsigned 16-bit value type

typedef uint32_t Uint32

Unsigned 32-bit value type

typedef uint64_t Uint64

Unsigned 64-bit value type

typedef uint8_t Uint8

Unsigned 8-bit value type

Enumeration Type Documentation

Possible 3D grid values: Values are specificly chosen not to match 2D grid values.

Enumerator
MB3D_INVALID_GRID 

Invalid grid

MB3D_CUBIC_GRID 

Cubic grid

MB3D_FCC_GRID 

Face centered cubic grid (fcc, also known as cubic close-packed or ccp)

Possible edge modes:

Enumerator
MB_EMPTY_EDGE 

Empty edge (zero)

MB_FILLED_EDGE 

Filled edge (maximum value for a given depth)

enum MB_grid_t

Possible grid values:

Enumerator
MB_HEXAGONAL_GRID 

Hexagonal grid

MB_SQUARE_GRID 

Square grid

Neighbors encoding: