Go to the source code of this file.
|
MB_API_ENTRY MB_errcode MB_API_CALL | MB3D_Watershed (MB3D_Image *src, MB3D_Image *marker, Uint32 max_level, enum MB3D_grid_t grid) |
|
MB_API_ENTRY MB_errcode MB_API_CALL | MB3D_Basins (MB3D_Image *src, MB3D_Image *marker, Uint32 max_level, enum MB3D_grid_t grid) |
|
MB_API_ENTRY MB_errcode MB_API_CALL | MB3D_HierarBld (MB3D_Image *mask, MB3D_Image *srcdest, enum MB3D_grid_t grid) |
|
MB_API_ENTRY MB_errcode MB_API_CALL | MB3D_HierarDualBld (MB3D_Image *mask, MB3D_Image *srcdest, enum MB3D_grid_t grid) |
|
MB_API_ENTRY MB_errcode MB_API_CALL | MB3D_Label (MB3D_Image *src, MB3D_Image *dest, Uint32 lblow, Uint32 lbhigh, Uint32 *pNbobj, enum MB3D_grid_t grid) |
|
MB_API_ENTRY MB_errcode MB_API_CALL | MB3D_Distanceb (MB3D_Image *src, MB3D_Image *dest, enum MB3D_grid_t grid, enum MB_edgemode_t edge) |
|
Performs a watershed segmentation of the 3D image using the 3D marker image as a starting point for the flooding. The function returns the catchment basins of the watershed but no actual watershed line. It is recommended to use this function rather than MB_Watershed if you are only interested in catchment basins (faster).
The result is put into the 32-bit marker image.
The segmentation is coded as follows into the 32-bit values.
0 | 1 | 2 | 3 |
<— | label | —> | unused |
- See also
- MB_CopyBytePlane to access each byte individually.
- Parameters
-
src | the 3D image (greyscale or 32-bit) to segment |
marker | the 3D marker image in which the result of segmentation will be put |
max_level | the maximum level reached by the water |
grid | the grid used (either square or hexagonal) |
- Returns
- An error code (NO_ERR if successful)
Computes for each pixel the distance to the edge of the set in which the pixel is found.
- Parameters
-
src | the binary source 3D image |
dest | the 32-bit 3D image in which the distance for each pixel is stored |
grid | the grid used (either cubic or face_center_cubic) |
edge | the kind of edge to use (behavior for pixels near edge depends on it) |
- Returns
- An error code (NO_ERR if successful)
(re)Builds a 3D image according to a 3D mask image and using a hierarchical list to compute the rebuild.
- Parameters
-
mask | the mask image |
srcdest | the rebuild image |
grid | the grid used (either square or hexagonal) |
- Returns
- An error code (NO_ERR if successful)
(re)Builds (dual operation) a 3D image according to a 3D mask image and using a hierarchical list to compute the rebuild.
- Parameters
-
mask | the mask image |
srcdest | the rebuild image |
grid | the grid used (either square or hexagonal) |
- Returns
- An error code (NO_ERR if successful)
Labeling the object found in src 3D image.
- Parameters
-
src | the source 3D image where the object must be labelled |
dest | the 32-bit 3D image where object are labelled |
lblow | the lowest value allowed for label on the low byte (must be inferior to lbhigh) |
lbhigh | the first high value NOT allowed for label on the low byte (maximum allowed is 256) |
pNbobj | the number of object found |
grid | the grid used (either square or hexagonal) |
- Returns
- An error code (NO_ERR if successful)
Performs a watershed segmentation of the 3D image using the marker image as a starting point for the flooding. The function builds the actual watershed line (idempotent) plus catchment basins (not idempotent). The result is put into the 32-bit marker image.
The segmentation is coded as follows into the 32-bit values.
0 | 1 | 2 | 3 |
<— | label | —> | isLine |
isLine is a value indicating if the pixel belongs to the watershed (255 if this is the case, undefined otherwise).
- See also
- MB_CopyBytePlane to access each byte individually.
- Parameters
-
src | the 3D image (greyscale or 32-bit) to segment |
marker | the marker 3D image in which the result of segmentation will be put |
max_level | the maximum level reach by the water. |
grid | the grid used (either square or hexagonal) |
- Returns
- An error code (NO_ERR if successful)