1.1.0
CCC
 
Morpho.cpp File Reference
#include "geoslib_old_f.h"
#include "geoslib_f_private.h"
#include "Enum/EMorpho.hpp"
#include "Basic/Utilities.hpp"
#include "Db/Db.hpp"
#include "Morpho/Morpho.hpp"
#include <math.h>

Functions

void _st_morpho_image_radius_define (const VectorInt &radius)
 
int _st_morpho_label_size (const VectorDouble &compnum, int nbcomp, VectorInt &sizes)
 
void _st_morpho_label_order (VectorDouble &compnum, const VectorInt &order, int nbcomp)
 
void morpho_duplicate (const BImage &imagin, BImage &imagout)
 
VectorDouble morpho_labelling (int option, int flag_size, const BImage &imagin, double ccvoid, bool verbose)
 
VectorInt morpho_labelsize (int option, const BImage &imagin)
 
void morpho_erosion (int option, const VectorInt &radius, const BImage &imagin, BImage &imagout, bool verbose)
 
void morpho_dilation (int option, const VectorInt &radius, const BImage &imagin, BImage &imagout, bool verbose)
 
void morpho_intersection (const BImage &image1, const BImage &image2, BImage &imagout, bool verbose)
 
void morpho_union (const BImage &image1, const BImage &image2, BImage &imagout, bool verbose)
 
void morpho_negation (const BImage &imagin, BImage &imagout, bool verbose)
 
int morpho_count (const BImage &imagin)
 
void morpho_opening (int option, const VectorInt &radius, const BImage &imagin, BImage &imagout, bool verbose)
 
void morpho_closing (int option, const VectorInt &radius, const BImage &imagin, BImage &imagout, bool verbose)
 
void morpho_double2imageInPlace (const VectorInt &nx, const VectorDouble &tab, double vmin, double vmax, BImage &imagout, bool verbose)
 
BImage morpho_double2image (const VectorInt &nx, const VectorDouble &tab, double vmin, double vmax, bool verbose)
 
void morpho_image2double (const BImage &imagin, int mode, double grain, double pore, VectorDouble &tab, bool verbose)
 
void morpho_distance (int option, const VectorInt &radius, bool flagDistErode, BImage &imagin, VectorDouble &dist, bool verbose)
 
VectorInt gridcell_neigh (int ndim, int option, int radius, bool flag_center, bool verbose)
 
void _morpho_angle2D (DbGrid *dbgrid, const VectorInt &radius, int iptr0)
 
void _morpho_gradients (DbGrid *dbgrid, int iptr)
 
int _db_morpho_calc (DbGrid *dbgrid, int iptr0, const EMorpho &oper, double vmin, double vmax, int option, const VectorInt &radius, bool flagDistErode, bool verbose)
 
Spill_Res spillPoint (DbGrid *dbgrid, const String &name_depth, const String &name_data, int option, bool flag_up, int verbose_step, double hmax)
 

Function Documentation

int _db_morpho_calc ( DbGrid dbgrid,
int  iptr0,
const EMorpho &  oper,
double  vmin,
double  vmax,
int  option,
const VectorInt radius,
bool  flagDistErode,
bool  verbose 
)

Perform a morphological operation with a DbGrid

void _morpho_angle2D ( DbGrid dbgrid,
const VectorInt radius,
int  iptr0 
)

Calculate the gradient orientations of a colored image

void _morpho_gradients ( DbGrid dbgrid,
int  iptr 
)

Calculate the gradient components of a colord image

void _st_morpho_image_radius_define ( const VectorInt radius)

Defines the image radius (global variables)

Parameters
[in]radiusRadius of the structural element
void _st_morpho_label_order ( VectorDouble compnum,
const VectorInt order,
int  nbcomp 
)

Orders the connected components using a rank array

Parameters
[in]compnumarray containing the component index
[in]orderarray containing the ordering criterion
[in]nbcompnumber of connected components
int _st_morpho_label_size ( const VectorDouble compnum,
int  nbcomp,
VectorInt sizes 
)

Returns the sizes of all the connected components

Returns
Total volume of the measured connected components
Parameters
[in]compnumarray containing the component index
[in]nbcompnumber of connected components to be measured
[out]sizesarray containing the sizes of the connected components labelled from 1 to nbcomp
Spill_Res spillPoint ( DbGrid dbgrid,
const String name_depth,
const String name_data,
int  option,
bool  flag_up,
int  verbose_step,
double  hmax 
)

Evaluates the spill point

Returns
The Spill_Res structure which contains:
h elevation of the spill point
th maximum reservoir thickness
ix0 location of the spill point grid node along X
iy0 location of the spill point grid node along Y
Parameters
[in]dbgridGrid Db structure
[in]name_depthName of the variable containing the depth
[in]name_dataName of the variable containing the data
[in]option0 for 4-connectivity; 1 for 8-connectivity
[in]flag_upTRUE when working in elevation; FALSE in depth
[in]verbose_stepStep for the verbose flag
[in]hmaxmaximum reservoir thickness (FFFF not used)
Remarks
The variable 'ind_data', which contains the constraints, must
be set to:
0 for an idle node
1 for a node located outside the reservoir
2 for a node belonging to the reservoir
The numbering of the grid node corresponding to the spill point
must start with 1