1.3.1
CCC
 
Convert arrays (provided as a Vector of double values) into Bimage (binary image) and vice-versa

Functions

GSTLEARN_EXPORT void morpho_double2imageInPlace (const VectorInt &nx, const VectorDouble &tabin, double vmin, double vmax, BImage &imagout, bool verbose=false)
 
GSTLEARN_EXPORT BImage morpho_double2image (const VectorInt &nx, const VectorDouble &tabin, double vmin, double vmax, bool verbose=false)
 
GSTLEARN_EXPORT void morpho_image2double (const BImage &imagin, int mode, double grain, double pore, VectorDouble &tabout, bool verbose=false)
 

Detailed Description

Parameters
nxVector giving the number of nodes for each space dimension
tabinArray of double values containing the input information
taboutArray of double values which will receive the output values (It must have been allocated beforehand)
imaginPointer to the BImage containing the one input image
imagoutPointer to the BImage which will receive the output image. This is used when converting "to" a BImage (in place) (It must have been allocated beforehand: same dimension as 'imagin')
vmin,vmaxIf the value of 'tab' lies within [vmin, vmax], BImage is set to 1; 0 otherwise (used when converting from double to BImage)
grain,poreDouble values assigned to 1 or 0 of the input BImage (used when converting from BImage to double)
verboseVerbose flag

Function Documentation

◆ morpho_double2image()

GSTLEARN_EXPORT BImage morpho_double2image ( const VectorInt nx,
const VectorDouble tab,
double  vmin,
double  vmax,
bool  verbose 
)

Converts an input image (double) into a returned image

◆ morpho_double2imageInPlace()

GSTLEARN_EXPORT void morpho_double2imageInPlace ( const VectorInt nx,
const VectorDouble tab,
double  vmin,
double  vmax,
BImage imagout,
bool  verbose 
)

Converts an input image (double) into an image (in place)

◆ morpho_image2double()

GSTLEARN_EXPORT void morpho_image2double ( const BImage imagin,
int  mode,
double  grain,
double  pore,
VectorDouble tab,
bool  verbose 
)

Converts an image into an array (double)