magmap.settings.roi_prof module#

Profile settings for processing regions of interests.

These setting typically involve high-resolution such as microscopy images.

class magmap.settings.roi_prof.ROIProfile(*args, **kwargs)[source]#

Bases: SettingsDict

ROI profile dictionary.

Variables:
  • PATH_PREFIX (str) – Prefix for ROI profile files.

  • BLOB_PREPROCESSING (tuple) – Keys for blob preprocessing.

  • BLOCK_SIZES (tuple) – Keys for block process sizing.

BLOB_PREPROCESSING = ('clip_vmin', 'clip_vmax', 'clip_min', 'clip_max', 'max_thresh_factor', 'tot_var_denoise', 'unsharp_strength', 'erosion_threshold', 'adapt_hist_lim')#
BLOCK_SIZES = ('segment_size', 'denoise_size', 'prune_tol_factor', 'verify_tol_factor', 'sub_stack_max_pixels', 'isotropic')#
PATH_PREFIX = 'roi'#
static get_files(profiles_dir=None, filename_prefix=None)[source]#

Get ROI profile files.

Parameters:
  • profiles_dir (str) – Directory from which to get files; defaults to None.

  • filename_prefix (str) – Only get files starting with this string; defaults to None to use PATH_PREFIX.

Returns:

List of files in profiles_dir matching the given filename_prefix.

Return type:

List[str]

profiles: Dict[str, Dict]#
spectral_unmixing: Optional[Dict[int, Tuple[int, float]]]#

Spectral unmixing for channel subtraction. Provide as: {channel: {channel_to_subtract: factor, ...}, ...}. Eg, to subtract 90% of channel 1 from 3: {3: [1, 0.9]}.