Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Watershed.C File Reference

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <climits>
#include "WKFUtils.h"
#include "ProfileHooks.h"
#include "Watershed.h"

Go to the source code of this file.

Defines

#define WATERSHED_INTERNAL   1
#define UPDATE_VOXEL(and_value, idx, curr_group, smallest_value, smallest_offset)
#define CALCULATE_NEIGHBORS(offset_str)
#define INST_WATERSHED(G_T)


Define Documentation

#define CALCULATE_NEIGHBORS offset_str   
 

Value:

{\
  const int idx_offset = idx + offset_str##_offset;\
  slope = float(curr_intensity - image[idx_offset]);\
  if (slope < smallest_slope) {\
    smallest_slope = slope;\
    curr_lower = offset_str##_idx;\
  } else if (slope >= -FLOAT_DIFF && slope <= FLOAT_DIFF) {\
    curr_n_eq |= offset_str;\
    if (idx_offset < min_group) {\
      min_group = idx_offset;\
    }\
  } }

Definition at line 47 of file Watershed.C.

#define INST_WATERSHED G_T   
 

Value:

Definition at line 688 of file Watershed.C.

#define UPDATE_VOXEL and_value,
idx,
curr_group,
smallest_value,
smallest_offset   
 

Value:

{\
  if (n_eq & and_value) {\
    const int idx_offset = idx + and_value##_offset;\
    if (current_state.value[idx_offset] + FLOAT_DIFF < smallest_value) {\
      smallest_value = current_state.value[idx_offset];\
      offset_number = and_value##_idx;\
      smallest_offset = and_value##_offset;\
    }\
    curr_group = current_state.group[idx_offset] < curr_group ?\
    current_state.group[idx_offset] : curr_group;\
  }}

Definition at line 35 of file Watershed.C.

#define WATERSHED_INTERNAL   1
 

Definition at line 29 of file Watershed.C.


Generated on Thu Mar 28 02:44:55 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002