Skip to content

Processing

Run AFMSlicer modules.

This module provides entry points for running AFMSlicer as a command line programme.

Functions:

Name Description
filter_scan

Filter an image and save to ''.topostats''.

process_scan

Process a single image, filtering, slicing and calculating statistics.

slicer_scan

Flatten images and save to ''.topostats''.

filter_scan

filter_scan(topostats_object, config=None)

Filter an image and save to ''.topostats''.

Runs just the first key step of flattening images to remove noise, tilt and optionally scars saving to .topostats for subsequent processing and analyses.

Parameters:

Name Type Description Default

topostats_object

TopoStats

A TopoStats object.

required

config

dict

Dictionary of configuration options for running the Filter stage.

None

Returns:

Type Description
tuple[str, bool]

Returns a tuple of topostats_object.filename and a bool of whether it successfully filtered.

process_scan

process_scan(topostats_object, config=None)

Process a single image, filtering, slicing and calculating statistics.

Parameters:

Name Type Description Default

topostats_object

dict[str, Union[NDArray, Path, float]]

A dictionary with keys 'image', 'img_path' and 'pixel_to_nm_scaling' containing a file or frames' image, it's path and it's pixel to namometre scaling value.

required

config

dict

Dictionary of configuration options for processing images.

None

Returns:

Type Description
tuple(str, bool)

Tuple of filename and whether it processed correctly.

slicer_scan

slicer_scan(topostats_object, config=None)

Flatten images and save to ''.topostats''.

Runs just the first key step of flattening images to remove noise, tilt and optionally scars saving to ''.topostats'' for subsequent processing and analyses.

Parameters:

Name Type Description Default

topostats_object

TopoStats

A TopoStats object.

required

config

dict

Dictionary of configuration options for running the Slicing stage.

None

Returns:

Type Description
tuple[str, AFMSlicer]

Returns a tuple of the AFMSlicer.filename and the processed AFMSlicer object.