syconn.extraction package

syconn.extraction.cs_extraction_steps module

syconn.extraction.cs_extraction_steps.extract_contact_sites(chunk_size=None, log=None, max_n_jobs=None, cube_of_interest_bb=None, n_folders_fs=1000, cube_shape=None, overwrite=False, transf_func_sj_seg=None)[source]

Extracts contact sites and their overlap with sj objects and stores them in a SegmentationDataset of type cs and syn respectively. If synapse type is available, this information will be stored as the voxel-ratio per class in the attribute dictionary of the syn objects (keys: sym_prop, asym_prop). These properties will further be used by combine_and_split_syn() which aggregates per-SV synapse fragments (syn) to per-SSV synapses (syn_ssv).

Examples

The synapse type labels and KnossosDatasets are defined in the config.yml file and can be set initially by changing the following attributes depending on how the synapse type prediction is stored.

(i) The type prediction is stored as segmentation in a single data set with three labels (0: background, 1: symmetric, 2: asymmetric):

kd_asym_path = root_dir + ‘kd_asym_sym/’ kd_sym_path = root_dir + ‘kd_asym_sym/’ key_val_pairs_conf = [

(‘cell_objects’, {‘sym_label’: 1, ‘asym_label’: 2,} )

]
generate_default_conf(working_dir, kd_sym=kd_sym_path, kd_asym=kd_asym_path,

key_value_pairs=key_val_pairs_conf)

(ii) The type prediction is stored as segmentation in a two data sets each with two labels (0: background, 1: symmetric and 0: background, 1: asymmetric):

kd_asym_path = root_dir + ‘kd_asym/’ kd_sym_path = root_dir + ‘kd_sym/’ key_val_pairs_conf = [

(‘cell_objects’, {‘sym_label’: 1, ‘asym_label’: 1,} )

]
generate_default_conf(working_dir, kd_sym=kd_sym_path, kd_asym=kd_asym_path,

key_value_pairs=key_val_pairs_conf)

(iii) The type prediction is stored as probability map in the raw channel (uint8, range: 0..255) in a data set for each type:

kd_asym_path = root_dir + ‘kd_asym/’ kd_sym_path = root_dir + ‘kd_sym/’ key_val_pairs_conf = [

(‘cell_objects’, {‘sym_label’: None, ‘asym_label’: None,} )

]
generate_default_conf(working_dir, kd_sym=kd_sym_path, kd_asym=kd_asym_path,

key_value_pairs=key_val_pairs_conf)

Notes

  • Deletes existing KnossosDataset and SegmentationDataset of type ‘syn’ and ‘cs’!

  • Replaced find_contact_sites, extract_agg_contact_sites, ` syn_gen_via_cset` and extract_synapse_type.

Parameters
  • chunk_size (Optional[Tuple[int, int, int]]) – Sub-cube volume which is processed at a time.

  • log (Optional[Logger]) – Logger.

  • max_n_jobs (Optional[int]) – Maximum number of jobs, only used as a lower bound.

  • cube_of_interest_bb (Optional[ndarray]) – Sub-volume of the data set which is processed. Default: Entire data set.

  • n_folders_fs (int) – Number of folders used for organizing supervoxel data.

  • cube_shape (Optional[Tuple[int]]) – Cube shape used within ‘syn’ and ‘cs’ KnossosDataset.

  • overwrite (bool) – Overwrite existing cache.

  • transf_func_sj_seg (Optional[Callable]) – Method that converts the cell organelle segmentation into a binary mask of background vs. sj foreground.

syconn.extraction.cs_processing_steps module

syconn.extraction.cs_processing_steps.cc_large_voxel_lists(voxel_list, cs_gap_nm, max_concurrent_nodes=5000, verbose=False)[source]
syconn.extraction.cs_processing_steps.classify_synssv_objects(wd, obj_version=None, log=None, nb_cpus=None)[source]

TODO: Replace by new synapse detection. Classify SSV contact sites into synaptic or non-synaptic using an RFC model and store the result in the attribute dict of the syn_ssv objects. For requirements see synssv_o_features.

Parameters
  • wd

  • obj_version

  • log

  • nb_cpus

Returns:

syconn.extraction.cs_processing_steps.collect_properties_from_ssv_partners(wd, obj_version=None, ssd_version=None, debug=False)[source]

Collect axoness, cell types and spiness from synaptic partners and stores them in syn_ssv objects. Also maps syn_type_sym_ratio to the synaptic sign (-1 for asym., 1 for sym. synapses).

The following keys will be available in the attr_dict of syn_ssv typed SegmentationObject:

  • ‘partner_axoness’: Cell compartment type (axon: 1, dendrite: 0, soma: 2, en-passant bouton: 3, terminal bouton: 4) of the partner neurons.

  • ‘partner_spiness’: Spine compartment predictions (0: dendritic shaft, 1: spine head, 2: spine neck, 3: other) of both neurons.

  • ‘partner_spineheadvol’: Spinehead volume in µm^3.

  • ‘partner_celltypes’: Celltype of the both neurons.

  • ‘latent_morph’: Local morphology embeddings of the pre- and post- synaptic partners.

Parameters
  • wd (str) –

  • obj_version (str) –

  • ssd_version (str) – Number of parallel jobs

  • debug – bool

syconn.extraction.cs_processing_steps.combine_and_split_cs(wd, ssd_version=None, cs_version=None, nb_cpus=None, n_folders_fs=10000, log=None, overwrite=False)[source]

Creates ‘cs_ssv’ objects from ‘cs’ objects. Computes connected cs-objects on SSV level and re-calculates their attributes (mesh_area, size, ..). In contrast to combine_and_split_syn() this method performs connected component analysis on the mesh of all cell-cell contacts instead of their voxels.

Notes

  • ‘rep_coord’ property is calculated as the mesh vertex closest to the center of mass of all mesh vertices.

Parameters
  • wd

  • ssd_version

  • cs_version

  • nb_cpus

  • log

  • n_folders_fs

  • overwrite

syconn.extraction.cs_processing_steps.combine_and_split_syn(wd, cs_gap_nm=300, ssd_version=None, syn_version=None, nb_cpus=None, n_folders_fs=10000, log=None, overwrite=False)[source]

Creates ‘syn_ssv’ objects from ‘syn’ objects. Therefore, computes connected syn-objects on SSV level and aggregates the respective ‘syn’ attributes [‘cs_id’, ‘asym_prop’, ‘sym_prop’, ].

All objects of the resulting ‘syn_ssv’ SegmentationDataset contain the following attributes: [‘syn_sign’, ‘syn_type_sym_ratio’, ‘asym_prop’, ‘sym_prop’, ‘cs_ids’, ‘neuron_partners’]

Notes

  • ‘rep_coord’ property is calculated as the voxel (part of the object) closest to the center of mass of all object voxels.

  • ‘cs_id’/’cs_ids’ is the same as syn_id (‘syn’ are just a subset of ‘cs’, preserving the IDs).

Parameters
  • wd

  • cs_gap_nm

  • ssd_version

  • syn_version

  • nb_cpus

  • log

  • n_folders_fs

  • overwrite

syconn.extraction.cs_processing_steps.connected_cluster_kdtree(voxel_coords, dist_intra_object, dist_inter_object, scale)[source]

Identify connected components within N objects. Two stage process: 1st stage adds edges between every object voxel which are at most 2 voxels apart. The edges are added to a global graph which is used to calculate connected components. In the 2nd stage, connected components are considered close if they are within a maximum distance of dist_inter_object between a random voxel used as their representative coordinate. Close connected components will then be connected if the minimum distance between any of their voxels is smaller than dist_intra_object.

Parameters
  • voxel_coords (List[ndarray]) – List of numpy arrays in voxel coordinates.

  • dist_intra_object (float) – Maximum distance between two voxels of different synapse fragments to consider them the same object. In nm.

  • dist_inter_object (float) – Maximum distance between two objects to check for close voxels between them. In nm.

  • scale (ndarray) – Voxel sizes in nm (XYZ).

Return type

List[set]

Returns

Connected components across all N input objects with at most dist_intra_cluster distance.

syconn.extraction.cs_processing_steps.create_syn_rfc(sd_syn_ssv, path2file, overwrite=False, rfc_path_out=None, max_dist_vx=20)[source]

Trains a random forest classifier (RFC) to distinguish between synaptic and non-synaptic objects. Features are generated from the objects in sd_syn_ssv associated with the annotated coordinates stored in path2file. Will write the trained classifier to global_params.config.mpath_syn_rfc.

Parameters
  • sd_syn_ssv (SegmentationDataset) – SegmentationDataset object of type syn_ssv. Used to identify synaptic object candidates annotated in the kzip/xls file at path2file.

  • path2file (str) – Path to kzip file with synapse labels as node comments (“non-synaptic”, “synaptic”; labels used for classifier are 0 and 1 respectively).

  • overwrite (bool) – Replace existing files.

  • rfc_path_out (Optional[str]) – Filename for dumped RFC.

  • max_dist_vx (int) – Maximum voxel distance between sample and target.

Return type

Tuple[RandomForestClassifier, ndarray, ndarray]

Returns

The trained random forest classifier and the feature and label data.

syconn.extraction.cs_processing_steps.export_matrix(obj_version=None, dest_folder=None, threshold_syn=0, export_kzip=False, log=None)[source]

Writes .csv and optionally .kzip (large memory consumption) summary file of connectivity matrix.

Parameters
  • obj_version (str) –

  • dest_folder (Optional[str]) – Path to csv file.

  • threshold_syn (float) – Threshold applied to filter synapses. Defaults to 0, i.e. exporting all synapses.

  • export_kzip (bool) – Export connectivity matrix as kzip - high memory consumption.

  • log (Optional[Logger]) – Logger.

syconn.extraction.cs_processing_steps.filter_relevant_syn(sd_syn, ssd, log)[source]

This function filters (likely ;-) ) the intra-ssv contact sites (inside of an ssv, not between ssvs) that do not need to be agglomerated.

Notes

  • Also applicable to cs.

Parameters
Return type

Dict[int, list]

Returns

Lookup from encoded SSV partner IDs (see sv_id_to_partner_ids_vec() for decoding into SSV IDs) to SV syn. object IDs, keys: encoded SSV syn IDs; values: List of SV syn IDs.

syconn.extraction.cs_processing_steps.map_objects_from_synssv_partners(wd, obj_version=None, ssd_version=None, n_jobs=None, debug=False, log=None, max_rep_coord_dist_nm=None)[source]

Map sub-cellular objects of the synaptic partners of ‘syn_ssv’ objects and stores them in their attribute dict.

The following keys will be available in the attr_dict of syn_ssv-typed SegmentationObject:

  • ‘n_mi_objs_%d’:

  • ‘n_mi_vxs_%d’:

  • ‘min_dst_mi_nm_%d’:

  • ‘n_vc_objs_%d’:

  • ‘n_vc_vxs_%d’:

  • ‘min_dst_vc_nm_%d’:

Parameters
  • wd (str) –

  • obj_version (Optional[str]) –

  • ssd_version (Optional[str]) –

  • n_jobs (Optional[int]) –

  • debug (bool) –

  • log (Optional[Logger]) –

  • max_rep_coord_dist_nm (Optional[float]) –

Returns:

syconn.extraction.cs_processing_steps.synssv_o_featurenames()[source]
Return type

list

syconn.extraction.cs_processing_steps.synssv_o_features(synssv_o)[source]

Collects syn_ssv feature for synapse prediction using an RFC.

Parameters

synssv_o (SegmentationObject) – SegmentationObject

Return type

list

Returns

list

syconn.extraction.cs_processing_steps.write_conn_gt_kzips(conn, n_objects, folder)[source]

syconn.extraction.object_extraction_steps module

syconn.extraction.object_extraction_steps.apply_merge_list(cset, chunk_list, filename, hdf5names, merge_list_dict, debug, suffix='', n_chunk_jobs=None, nb_cpus=1)[source]

Applies merge list to all chunks

Parameters
  • cset – chunkdataset instance

  • chunk_list (list) – list of int Selective list of chunks for which this function should work on. If None all chunks are used.

  • filename (str) – Filename of the prediction in the chunkdataset

  • hdf5names (list) – list of str List of names/ labels to be extracted and processed from the prediction file

  • merge_list_dict (dict) – mergedict for each hdf5name

  • debug (bool) – If true multiprocessed steps only operate on one core using ‘map’ which allows for better error messages

  • suffix (str) – Suffix for the intermediate results

  • n_chunk_jobs (int) – Number of total jobs.

  • nb_cpus

syconn.extraction.object_extraction_steps.export_cset_to_kd_batchjob(target_kd_paths, cset, name, hdf5names, n_cores=1, offset=None, size=None, stride=(512, 512, 512), overwrite=False, as_raw=False, fast_downsampling=False, n_max_job=None, unified_labels=False, orig_dtype=<class 'numpy.uint8'>, log=None, compresslevel=None)[source]

Batchjob version of knossos_utils.chunky.ChunkDataset.export_cset_to_kd method, see knossos_utils.chunky for details.

Notes

  • KnossosDataset needs to be initialized beforehand (see initialize_without_conf()).

  • Only works if data mag = 1.

Parameters
  • target_kd_paths – Target KnossosDatasets.

  • cset – Source ChunkDataset.

  • name

  • hdf5names

  • n_cores

  • offset

  • size

  • stride

  • overwrite

  • as_raw

  • fast_downsampling

  • n_max_job

  • unified_labels

  • orig_dtype

  • log

  • compresslevel – Compression level in case segmentation data is written for (seg.sz.zip files).

Returns:

syconn.extraction.object_extraction_steps.gauss_threshold_connected_components(*args, **kwargs)[source]
syconn.extraction.object_extraction_steps.make_merge_list(hdf5names, stitch_list, max_labels)[source]

Creates a merge list from a stitch list by mapping all connected ids to one id

Parameters
  • hdf5names (list) – list of str List of names/ labels to be extracted and processed from the prediction file

  • stitch_list (dict) – Contains pairs of overlapping component ids for each hdf5name

  • max_labels (dict) – dictionary Contains the number of different component ids for each hdf5name

Returns

mergelist for each hdf5name merge_list_dict (dict):

mergedict for each hdf5name

Return type

merge_dict (dict)

syconn.extraction.object_extraction_steps.make_stitch_list(cset, filename, hdf5names, chunk_list, stitch_overlap, overlap, debug, suffix='', nb_cpus=None, overlap_thresh=0, n_chunk_jobs=None)[source]

Creates a stitch list for the overlap region between chunks

Parameters
  • cset – chunkdataset instance

  • filename (str) – Filename of the prediction in the chunkdataset

  • hdf5names (list) – list of str List of names/ labels to be extracted and processed from the prediction file

  • chunk_list (list) – list of int Selective list of chunks for which this function should work on. If None all chunks are used.

  • overlap (np.array) – np.array Defines the overlap with neighbouring chunks that is left for later processing steps

  • stitch_overlap – np.array Defines the overlap with neighbouring chunks that is left for stitching

  • debug – boolean If true multiprocessed steps only operate on one core using ‘map’ which allows for better error messages

  • suffix – str Suffix for the intermediate results

  • nb_cpus – int Number of cores used per worker.

  • n_chunk_jobs – int Number of total jobs.

  • overlap_thresh – float Overlap fraction of object in different chunks to be considered stitched. If zero this behavior is disabled.

Returns

Dictionary of overlapping component ids

Return type

stitch_list(dict)

syconn.extraction.object_extraction_steps.make_unique_labels(cset, filename, hdf5names, chunk_list, max_nb_dict, chunk_translator, debug, suffix='', n_chunk_jobs=None, nb_cpus=1)[source]

Makes labels unique across chunks

Parameters
  • cset – chunkdataset instance

  • filename (str) – Filename of the prediction in the chunkdataset

  • hdf5names (list) – list of str List of names/ labels to be extracted and processed from the prediction file

  • chunk_list (list) – list of int Selective list of chunks for which this function should work on. If None all chunks are used.

  • max_nb_dict (dict) – Maps each chunk id to a integer describing which needs to be added to all its entries

  • chunk_translator (dict) – Remapping from chunk ids to position in chunk_list

  • debug (bool) – If true multiprocessed steps only operate on one core using ‘map’ which allows for better error messages

  • suffix – str Suffix for the intermediate results

  • n_chunk_jobs – int Number of total jobs.

  • nb_cpus – int

syconn.extraction.object_extraction_steps.object_segmentation(cset, filename, hdf5names, overlap='auto', sigmas=None, thresholds=None, chunk_list=None, debug=False, swapdata=False, prob_kd_path_dict=None, membrane_filename=None, membrane_kd_path=None, hdf5_name_membrane=None, fast_load=False, suffix='', nb_cpus=None, transform_func=None, transform_func_kwargs=None, transf_func_kd_overlay=None, load_from_kd_overlaycubes=False, n_chunk_jobs=None)[source]

Extracts connected component from probability maps.

By default the following procedure is used: 1. Gaussian filter (defined by sigma) 2. Thresholding (defined by threshold) 3. Connected components analysis

If transform_func is set, the specified method will be applied by every worker on the chunk’s probability map to generate the segmentation instead. Add transform_func_kwargs in case transform_func specific arguments.

In case of vesicle clouds (hdf5_name in [“p4”, “vc”]) the membrane segmentation is used to cut connected vesicle clouds across cells apart (only if membrane segmentation is provided).

Args: cset : chunkdataset instance filename (str) : Filename of the prediction in the ChunkDataset. hdf5names (list): list of strings

List of names/ labels to be extracted and processed from the prediction file.

overlap (str): str or np.array

Defines the overlap with neighbouring chunks that is left for later processing steps; if ‘auto’ the overlap is calculated from the sigma and the stitch_overlap (here: [1., 1., 1.]) and the number of binary erosion in global_params.config[‘cell_objects’][‘extract_morph_op’].

sigmas (list): list of lists or None

Defines the sigmas of the gaussian filters applied to the probability maps. Has to be the same length as hdf5names. If None no gaussian filter is applied.

thresholds(list of float or np.ndarray):

Threshold for cutting the probability map. Has to be the same length as hdf5names. If None zeros are used instead (not recommended!)

chunk_list(list):

Selective list of chunks for which this function should work on. If None all chunks are used.

debug(bool):

If true multiprocessed steps only operate on one core using ‘map’ which allows for better error messages.

swapdata(bool):

If true an x-z swap is applied to the data prior to processing.

prob_kd_path_dict: membrane_filename(str):

One way to allow access to a membrane segmentation when processing vesicle clouds. Filename of the prediction in the chunkdataset. The threshold is currently set at 0.4.

membrane_kd_path(str):

One way to allow access to a membrane segmentation when processing vesicle clouds. Path to the knossosdataset containing a membrane segmentation. The threshold is currently set at 0.4.

hdf5_name_membrane(str):

When using the membrane_filename this key has to be given to access the data in the saved chunk.

fast_load(bool):

If true the data of chunk is blindly loaded without checking for enough offset to compute the overlap area. Faster, because no neighbouring chunk has to be accessed since the default case loads th overlap area from them.

suffix(str):

Suffix for the intermediate results.

nb_cpus: transform_func(callable):

Segmentation method which is applied.

transform_func_kwargs(dict) :

key word arguments for transform_func

load_from_kd_overlaycubes(bool) :

Load prob/seg data from overlaycubes instead of raw cubes.

transf_func_kd_overlay :

Method which is to applied to cube data if load_from_kd_overlaycubes is True.

n_chunk_jobs:

Returns: results_as_list(list):

list containing information about the number of connected components in each chunk

overlap(np.array): stitch overlap(np.array):

syconn.extraction.object_extraction_wrapper module

syconn.extraction.object_extraction_wrapper.calculate_chunk_numbers_for_box(cset, offset, size)[source]

Calculates the chunk ids that are (partly) contained it the defined volume

Parameters
  • cset – ChunkDataset

  • offset (np.array) – offset of the volume to the origin

  • size (np.array) – size of the volume

Returns

chunk ids dictionary(dict):

with reverse mapping

Return type

chunk_list(list)

syconn.extraction.object_extraction_wrapper.from_probabilities_to_kd(target_kd_paths, cset, filename, hdf5names, prob_kd_path_dict=None, load_from_kd_overlaycubes=False, transf_func_kd_overlay=None, log=None, overlap='auto', sigmas=None, thresholds=None, debug=False, swapdata=False, offset=None, size=None, suffix='', transform_func=None, func_kwargs=None, n_cores=None, overlap_thresh=0, stitch_overlap=None, membrane_filename=None, membrane_kd_path=None, hdf5_name_membrane=None, n_chunk_jobs=None)[source]

Method for the conversion of classified (hard labels, e.g. 0, 1, 2; see load_from_kd_overlaycubes and transf_func_kd_overlay parameters) or predicted (probability maps, e.g. 0 .. 1 or 0 .. 255, see thresholds parameter). Original data can be provided as ChunkDataset cset or via KnossosDataset(s) prob_kd_path_dict. The ChunkDataset will be used in any case for storing the intermediate extraction results (per-cube segmentation, stitched results, globally unique segmentation).

Notes

  • KnossosDatasets given by target_kd_paths need to be initialized prior to this function call.

Parameters
  • target_kd_paths (Optional[Dict[str, str]]) – Paths to (already initialized) output KnossosDatasets. See KnossosDataset.initialize_without_conf.

  • cset (ChunkDataset) – ChunkDataset which is used for the object extraction process and which may additionally contain the source data. The latter can be provided as KnossosDataset(s) (see prob_kd_path_dict).

  • filename (str) – The base name used to store the extracted in cset.

  • hdf5names (List[str]) – Keys used to store the intermediate extraction results.

  • prob_kd_path_dict (Optional[Dict[str, str]]) – Paths to source KnossosDatasets

  • load_from_kd_overlaycubes (bool) – Load prob/seg data from overlaycubes instead of raw cubes.

  • transf_func_kd_overlay (Optional[Dict[str, Callable]]) – Method which is to applied to cube data if load_from_kd_overlaycubes is True.

  • log (Optional[Logger]) – TODO: pass log to all methods called

  • overlap (str) – Defines the overlap with neighbouring chunks that is left for later processing steps; if ‘auto’ the overlap is calculated from the sigma and the stitch_overlap (here: [1., 1., 1.]).

  • sigmas (Optional[list]) – Defines the sigmas of the Gaussian filters applied to the probability maps. Has to be the same length as hdf5names. If None, no Gaussian filter is applied.

  • thresholds (Optional[list]) – Threshold for cutting the probability map. Has to be the same length as hdf5names. If None, zeros are used instead (not recommended!)

  • debug (bool) – If True, multiprocessing steps only operate on one core using ‘map’ which allows for better error messages.

  • swapdata (bool) – If true an x-z swap is applied to the data prior to processing.

  • offset (Optional[ndarray]) – Offset of the processed volume.

  • size (Optional[ndarray]) – Size of the processed volume of the dataset starting at offset.

  • suffix (str) – Suffix used for the intermediate processing steps.

  • transform_func (Optional[Callable]) – [WIP] Segmentation method which is applied, currently only func:~syconn.extraction.object_extraction_steps. _object_segmentation_thread is supported for batch jobs.

  • func_kwargs (Optional[dict]) – keyword arguments for transform_func.

  • n_chunk_jobs (Optional[int]) – Number of jobs.

  • n_cores (Optional[int]) – Number of cores used for each job in syconn.extraction.object_extraction_steps.object_segmentation() if batch jobs is enabled.

  • overlap_thresh (Optional[int]) – Overlap fraction of object in different chunks to be considered stitched. If zero this behavior is disabled.

  • stitch_overlap (Optional[int]) – Volume evaluated during stitching procedure.

  • membrane_filename (Optional[str]) – Experimental. One way to allow access to a membrane segmentation when processing vesicle clouds. Filename of the prediction in the chunkdataset. The threshold is currently set at 0.4.

  • membrane_kd_path (Optional[str]) – Experimental. One way to allow access to a membrane segmentation when processing vesicle clouds. Path to the knossosdataset containing a membrane segmentation. The threshold is currently set at 0.4.

  • hdf5_name_membrane (Optional[str]) – Experimental. When membrane_filename is set this key has to be given to access the data in the saved chunk.

Returns:

syconn.extraction.object_extraction_wrapper.generate_subcell_kd_from_proba(subcell_names, chunk_size=None, transf_func_kd_overlay=None, load_cellorganelles_from_kd_overlaycubes=False, cube_of_interest_bb=None, cube_shape=None, log=None, overwrite=False, **kwargs)[source]

Generates a connected components segmentation for the given the sub-cellular structures (e.g. [‘mi’, ‘sj’, ‘vc]) as KnossosDatasets. The data format of the source data is KnossosDataset which path(s) is defined in global_params.config['paths'] (e.g. key kd_mi_path for mitochondria). The resulting KDs will be stored at (for each co in subcell_names) "{}/knossosdatasets/{}_seg/".format(global_params.config.working_dir, co). See from_probabilities_to_kd() for details of the conversion process from the initial probability map to the SV segmentation. Default: thresholding and connected components, thresholds are set via the config.yml file, check syconn.global_params.config['cell_objects']["probathresholds"] of an initialized DynConfig object.

Parameters
  • subcell_names (List[str]) –

  • chunk_size (Union[list, tuple, None]) –

  • transf_func_kd_overlay (Optional[Dict[str, Callable]]) –

  • load_cellorganelles_from_kd_overlaycubes (bool) –

  • cube_of_interest_bb (Optional[Tuple[ndarray]]) –

  • cube_shape (Optional[Tuple[int]]) –

  • log (Optional[Logger]) –

  • overwrite

  • **kwargs

Returns: