{"id":20361123,"url":"https://github.com/reubendo/tumorsegmentator","last_synced_at":"2026-05-09T13:40:00.541Z","repository":{"id":230091007,"uuid":"778003891","full_name":"ReubenDo/TumorSegmentator","owner":"ReubenDo","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-27T22:15:31.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T07:43:53.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReubenDo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-26T22:40:14.000Z","updated_at":"2025-11-25T16:57:21.000Z","dependencies_parsed_at":"2024-03-27T20:24:13.171Z","dependency_job_id":"b9a781c9-c579-49f6-b1af-2da4b731c077","html_url":"https://github.com/ReubenDo/TumorSegmentator","commit_stats":null,"previous_names":["reubendo/tumorsegmentator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ReubenDo/TumorSegmentator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FTumorSegmentator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FTumorSegmentator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FTumorSegmentator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FTumorSegmentator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReubenDo","download_url":"https://codeload.github.com/ReubenDo/TumorSegmentator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FTumorSegmentator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32821885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T23:46:37.268Z","updated_at":"2026-05-09T13:40:00.518Z","avatar_url":"https://github.com/ReubenDo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TumorSegmentator\n\n\n### Installation\n\nTumorSegmentator works on Ubuntu, Mac, and Windows and on CPU and GPU.\n\nInstall dependencies:\n* Python \u003e= 3.9\n* [Pytorch](http://pytorch.org/) \u003e= 2.0.0\n\nInstall TumorSegmentator\n```\npip install -U git+https://github.com/ReubenDo/TumorSegmentator#egg=TumorSegmentator\n```\n\n\n### Usage\n```\nTumorSegmentator -t1 t1.nii.gz -cet1 cet1.nii.gz -o segmentations\nTumorSegmentator -t1 t1.nii.gz -cet1 cet1.nii.gz -t2 t2.nii.gz -flair flair.nii.gz -o segmentations\n```\n\u003e Note: A Nifti file or a folder with all DICOM slices of one patient is allowed as input\n\n\u003e Note: This is not a medical device and is not intended for clinical usage.\n\n\n\n### Python API\nYou can run TumorSegmentator via Python:\n```python\nimport nibabel as nib\nfrom tumorsegmentator.python_api import tumorsegmentator\n\nif __name__ == \"__main__\":\n    # option 1: provide input and output as file paths\n    tumorsegmentator(input_path_t1, input_path_cet1, input_path_t2, input_path_flair, output_path)\n\n    # option 2: provide input and output as nifti image objects\n    input_img = nib.load(input_path)\n    output_img = tumorsegmentator(input_img)\n    nib.save(output_img, output_path)\n```\nYou can see all available arguments [here](https://github.com/reubendo/TumorSegmentator/blob/master/TumorSegmentator/python_api.py). Running from within the main environment should avoid some multiprocessing issues.\n\nThe segmentation image contains the names of the classes in the extended header. If you want to load this additional header information you can use the following code:\n```python\nfrom tumorsegmentator.nifti_ext_header import load_multilabel_nifti\n\nsegmentation_nifti_img, label_map_dict = load_multilabel_nifti(image_path)\n```\nThe above code requires `pip install xmltodict`.\n\n\n### Install latest master branch (contains latest bug fixes)\n```\npip install git+https://github.com/reubendo/TumorSegmentator.git\n```\n\n\n### Typical problems\n\n**ITK loading Error**\nWhen you get the following error message\n```\nITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition was found!\n```\nyou should do\n```\npip install SimpleITK==2.0.2\n```\n\nAlternatively you can try\n```\nfslorient -copysform2qform input_file\nfslreorient2std input_file output_file\n```\n\n\n### Reference\nTODO\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubendo%2Ftumorsegmentator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubendo%2Ftumorsegmentator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubendo%2Ftumorsegmentator/lists"}