upxo.pxtalops.vox2geom module

class upxo.pxtalops.vox2geom.geometryfi3d(lfi)[source]

Bases: object

Usage

from upxo.pxtalops.vox2geom import geometryfi3d

n_plotTypes = 6
lfi
mprops
scaleHistory
bboxes
find_neigh()[source]

Find neigh.

get_feature_sizes()[source]

Return the feature sizes.

find_mprops()[source]

Find mprops.

scale(scaleFactor, reindex=False, plotgs=True, alpha=1.0, cmap='nipy_spectral', quickPlot_kwargs={'alpha': 0.75, 'cmap': 'viridis', 'scalar_name': 'lfi'})[source]

Scale.

find_spb()[source]

Find spb.

reindex(findMprops=True, plotgs=True, quickPlot_kwargs={'alpha': 0.75, 'cmap': 'viridis', 'scalar_name': 'lfi'})[source]

Reindex the feature IDs to be contiguous and start from 0.

prepare(run_pre_cleaning_step=True)[source]

Prepare.

prepare_pre_vox_cleaning(plotgs=False, quickPlot_kwargs={'alpha': 0.75, 'cmap': 'viridis', 'scalar_name': 'lfi'})[source]

Prepare pre vox cleaning.

detect_and_merge_islands()[source]

Detect and merge islands.

detect_islands(neigh_fids)[source]

Detect islands.

merge_islands(lfi, islands, neigh_fids)[source]

Merge islands.

filter_small_inconsistant_features()[source]

Filter small inconsistant features.

voxel_smoother(addMajFilter=True, majority_filter_kwargs={'n': 2, 'sizes': [3, 3]}, addDilErs=True, dilers_kwargs={'DILfpSizes': [4, 4], 'ERSfpSizes': [4, 4], 'footprints': ['ball', 'ball'], 'removeEndVox': [True, True]}, reindex=False, plotgs=False, quickPlot_kwargs={'alpha': 0.75, 'cmap': 'viridis', 'scalar_name': 'lfi'})[source]

Voxel smoother.

cleanVoxMorph_majority_filter_npass(lfi=None, plotgs=True, quickPlot_kwargs={'alpha': 0.75, 'cmap': 'viridis', 'scalar_name': 'lfi'}, **majority_filter_kwargs)[source]

majority_filter_kwargs={‘n’: 2, ‘sizes’: [3, 3]}

cleanVoxMorph_DE_npass(niterations=2, DILfpSizes=[4, 4], ERSfpSizes=[4, 4], footprints=['ball', 'ball'], removeEndVox=[True, True], plotgs=True, alpha=1.0, cmap='nipy_spectral', quickPlot_kwargs={'alpha': 0.75, 'cmap': 'viridis', 'scalar_name': 'lfi'})[source]

Cleanvoxmorph de npass.

report(message='Report: \n')[source]

Report.

quick_plot(scalar_name='lfi', alpha=0.9, cmap='nipy_spectral', show_edges=False, title='', xname='', yname='', zname='')[source]

Quick plot.

see(plotType, **kwargs)[source]

plotType: 0 to n for different gsviz.vox2geom_plots. Value of n depends on the UPXO version. I will add more features and n will increase to allow you more ways to plot. For now, we have the following options for plotType, which are the options for gsviz.vox2geom_plots:

0: quick plot of the voxel grid with default settings. This is the same as

geometryfi3d.quick_plot() with default settings.

1: grain_viewer. -1 falls back to grain viewer. 2: view_boundary_voxels 3: see_clip_plane 4: see_mesh_slice 5: see_mesh_slice_ortho

fid
n
neigh_fid
spb