Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoSeg

AutoSeg runs TotalSegmentator on every .nii or .nii.gz file inside a folder tree.

Given a root folder, it searches that folder and all subfolders for NIfTI files, runs:

TotalSegmentator -i <input_file> -o <output_folder> -ta <task>

and saves each segmentation output beside the source scan.

Requirements

  • Python 3.9 or newer
  • TotalSegmentator installed and available on your command line

Install TotalSegmentator separately before using this package. You should be able to run:

TotalSegmentator --help

Install

After this package is published to PyPI, users will be able to install it with:

pip install autoseg

Task Argument

AutoSeg adds the -ta flag to the TotalSegmentator command for you. You only need to provide the task name:

autoseg "C:\path\to\scans" total

Usage

Run AutoSeg on a folder:

autoseg "C:\path\to\scans" total

Use another TotalSegmentator task by passing the task name after the folder:

autoseg "C:\path\to\scans" <task name>

If you leave the task name off, AutoSeg prompts for it during runtime:

autoseg "C:\path\to\scans"

Use TotalSegmentator's --statistics option for volume and intensity calculations

autoseg "C:\path\to\scans" <task name> statistics

Preview what would run without starting TotalSegmentator (Reduced wait time for testing/troubleshooting):

autoseg "C:\path\to\scans" total --dry-run

Output Folders

For each input file, AutoSeg creates a segmentation folder in the same directory as the scan.

Example:

C:\data\patient01\scan.nii.gz
C:\data\patient01\scan_segmentations\

If the expected output folder already exists and contains files, AutoSeg skips that scan so it does not run segmentation again.

About

Run TotalSegmentator on many NIFTI files.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages