revanalyzer.REV_analyzer.REVAnalyzer
- class revanalyzer.REV_analyzer.REVAnalyzer(metric, image, size, n_steps, sREV_max_step, datadir=None, outputdir='output')
Bases:
object
analysis of representativity of a given image for a given scalar or vector metric.
Input:
metric (subclass of BasicMetric): metric to be analyzed;
image (str or numpy.ndarray): name of binary (‘uint8’) file or numpy.ndarray representing the image;
size (tuple (int, int, int)): linear image sizes in x, y and z directions;
n_steps (int): number of subsamples selection steps;
sREV_max_step (int): maximal step for which sREV and stationarity analysis can be performed;
datadir (str): path to the folder containing image, default: None;
outputdir (str): path to the output folder containing generated data, default: ‘output’.
Methods
Perform the analysis of representativity.
Perform the analysis of stationarity.
Generator of metric values for all selected subsamples.
Read the generated metric value for a given subsample.
Vizualize the vector metric for a specific subsample.
Visualization of REV analysis results.
Vectorization of generated metric data using vetorizer.
- analyze(dREV_threshold, sREV_threshold)
Perform the analysis of representativity.
Input:
dREV_threshold (float, <1): threshold to estimate dREV size;
sREV_threshold (float, <1): threshold to estimate sREV size.
- analyze_stationarity(stationarity_threshold)
Perform the analysis of stationarity.
Input:
stationarity_threshold (float, <1): threshold to analyze stationarity.
Output
True or False: is image stationary.
- generate()
Generator of metric values for all selected subsamples.
- read(step, cut_id=0)
Read the generated metric value for a given subsample.
Input:
step (int): subsamples selection step;
cut_id (int: 0,..8): cut index .
Output
metric value (float or np.array(dtype=’float’)).
- show(step, cut_id=0, nbins=None)
Vizualize the vector metric for a specific subsample.
Input:
step (int): subsamples selection step;
cut_id (int: 0,..8): cut index;
nbins (int): number of bins in histogram. For PNM-based metric only.
- show_results()
Visualization of REV analysis results.
- vectorize()
Vectorization of generated metric data using vetorizer. For vector metric only.