FilFinderPPV

class fil_finder.FilFinderPPV(image, mask=None, save_name='FilFinderPPV_output')[source]

Bases: Skeleton3D

Extract and analyze filamentary structure from a 3D dataset.

Parameters:
image: `~numpy.ndarray`

A 3D array of the data to be analyzed.

mask: numpy.ndarray, optional

A pre-made, boolean mask may be supplied to skip the segmentation process. The algorithm will skeletonize and run the analysis portions only.

save_name: str, optional

Sets the prefix name that is used for output files.

Attributes Summary

image

Methods Summary

analyze_skeletons([compute_longest_path, ...])

create_mask([adapt_thresh, glob_thresh, ...])

Runs the segmentation process and returns a mask of the filaments found.

network_plot_3D([filament, angle, filename, ...])

Gives a 3D plot for networkX using coordinates information of the nodes

network_plot_3D_plotly([filament, angle, ...])

Gives a 3D plot for networkX using coordinates information of the nodes

plot_data_mask_slice(slice_number[, ...])

Plots slice of mask, alongside image.

preprocess_image([skip_flatten, flatten_percent])

Preprocess and flatten the dataset before running the masking process.

Attributes Documentation

image

Methods Documentation

analyze_skeletons(compute_longest_path=True, do_prune=True, verbose=False, save_png=False, save_name=None, prune_criteria='all', relintens_thresh=0.2, max_prune_iter=10, branch_spatial_thresh=<Quantity 0. pix>, branch_spectral_thresh=<Quantity 0. pix>, test_print=0)[source]
create_mask(adapt_thresh=9, glob_thresh=0.0, selem_disc_radius=2, selem_spectral_width=1, min_object_size=81, max_hole_size=100, verbose=False, save_png=False, use_existing_mask=False, **adapt_kwargs)[source]

Runs the segmentation process and returns a mask of the filaments found.

Parameters:
glob_threshfloat, optional

Minimum value to keep in mask. Default is None.

verbosebool, optional

Enables plotting. Default is False.

save_pngbool, optional

Saves the plot in verbose mode. Default is False.

use_existing_maskbool, optional

If mask is already specified, enabling this skips recomputing the mask.

Attributes:
masknumpy.ndarray

The mask of the filaments.

network_plot_3D(filament=None, angle=40, filename='plot.pdf', save=False)[source]

Gives a 3D plot for networkX using coordinates information of the nodes

Parameters:
filamentFilament

Filament object or list of objects from self.filaments. The default is None and will plot all the filaments in the network.

angleint

Angle to view the graph plot

filenamestr

Filename to save the plot

savebool

boolen value when true saves the plot

network_plot_3D_plotly(filament=None, angle=40, filename='plot.pdf', save=False)[source]

Gives a 3D plot for networkX using coordinates information of the nodes

Parameters:
filamentFilament

Filament object or list of objects from self.filaments. The default is None and will plot all the filaments in the network.

angleint

Angle to view the graph plot

filenamestr

Filename to save the plot

savebool

boolen value when true saves the plot

plot_data_mask_slice(slice_number, show_flat_img=False)[source]

Plots slice of mask, alongside image.

Parameters:
slice_numberint

Array indice in major axis to slice 3D set.

preprocess_image(skip_flatten=False, flatten_percent=85)[source]

Preprocess and flatten the dataset before running the masking process.

Parameters:
skip_flattenbool, optional

Skip the flattening process and use the original image to construct the mask. Default is False.

flatten_percentint, optional

The percentile of the data (0-100) to set the normalization. Default is 85th.