unravel.segment.copy_tifs module#
Use seg_copy_tifs
(sct
) from UNRAVEL to copy or save specified slices from each sample?? dir to a target dir for training ilastik with TIFFs.
Note
reg_inputs/autofl_50um_tifs is from
reg_prep
and is used to make a brain mask usingseg_brain_mask
.
- Next command:
seg_brain_mask
forreg
orseg_ilastik
for pixel classification.
Usage to prep for seg_brain_mask:#
seg_copy_tifs -i reg_inputs/autofl_50um_tifs -s 0000 0005 0050 [-td brain_mask] [-d list of paths] [-p sample??] [-v]
Usage to copy tifs for ilastik:#
seg_copy_tifs -i <path to dir with tifs or to a 3D image> -s 0100 0500 1000 [-td ilastik_segmentation] [-d list of paths] [-p sample??] [-v]
- unravel.segment.copy_tifs.copy_specific_tifs(sample_path, source_dir, target_dir, slice_numbers, verbose=False)[source]#
Copy the specified tif slices from the source directory to the target directory.
Parameters:#
- sample_pathPath or str
Path to the sample directory (appended to the destination file name).
- source_dirPath or str
Path to the source directory containing the .tif files.
- target_dirPath or str
Path to the target directory where the selected slices will be copied.
- slice_numberslist
List of slice numbers to copy (4 digits each).
- verbosebool
Print verbose output.