1+ #!/usr/bin/env python3
2+ # -*- coding: utf-8 -*-
3+ """
4+ Created on Mon Aug 12 18:20:06 2024
5+
6+ @author: jbeckwith
7+ """
8+
9+ from src import DAB_Analysis_Functions
10+
11+ DAB_A = DAB_Analysis_Functions .DAB ()
12+
13+ overall_directory = "example_directory"
14+ imtype = ".svs"
15+ multi_tiff_pixel_size = 4000
16+ pixel_size = 0.2528e-6
17+ NA = 0.75
18+ n_samples_forthresh = 50
19+ percentile = 90
20+ giveNN = False
21+ save_figs = False
22+
23+ """chop_and_analyse_svs function finds svs files,
24+ chops them up, analyses them, and then deletes the chopped files
25+
26+ Args:
27+ overall_directory (string): directory to search for svs files in sub-directories
28+ multi_tiff_pixel_size (int): size of images to chop to
29+ pixel_size (float): pixel size in m
30+ NA (float): NA of objective used to generate data
31+ n_samples_forthresh (int): number of randomly chosen tiffs to use
32+ to determine thresholds for overall sample set
33+ percentile (float): percentile of thresholds to use for overall data
34+ giveNN (boolean): If true, also calculates Nearest Neighbors.
35+ Default False, as this is quite slow.
36+ save_figs (boolean): If True, saves figures showing the segmentation
37+ for each image. Useful as a "sanity check"
38+ """
39+
40+ DAB_A .chop_and_analyse_svs (
41+ overall_directory ,
42+ imtype = imtype ,
43+ multi_tiff_pixel_size = multi_tiff_pixel_size ,
44+ pixel_size = pixel_size ,
45+ NA = NA ,
46+ n_samples_forthresh = n_samples_forthresh ,
47+ percentile = percentile ,
48+ giveNN = giveNN ,
49+ save_figs = save_figs ,
50+ )
0 commit comments