NiLabels is a cacophony of tools to automatise simple manipulations and measurements of medical image segmentations in nifti format. It is heavily based on and influenced by the library NiBabel
- Written in Python 3.6 back compatible with 2.7
- Motivations
- Features
- Design pattern
- Work in progress
Given a segmentation my_segm.nii.gz
imagine you want to change the labels values from [1, 2, 3, 4, 5, 6] to [2, 12, 4, 7, 5, 6]
and save the result in my_new_segm.nii.gz
. Then:
import nilabels as nil
nil_app = nil.App()
nil_app.manipulate_labels.relabel('my_segm.nii.gz', 'my_new_segm.nii.gz', [1, 2, 3, 4, 5, 6], [2, 12, 4, 7, 5, 6])
Copyright (c) 2017, Sebastiano Ferraris. NiLabels (ex. LABelsToolkit) is provided as it is and it is available as free open-source software under MIT License
- This repository had begun within the GIFT-surg research project.
- This work was supported by Wellcome / Engineering and Physical Sciences Research Council (EPSRC) [WT101957; NS/A000027/1; 203145Z/16/Z]. Sebastiano Ferraris is supported by the EPSRC-funded UCL Centre for Doctoral Training in Medical Imaging (EP/L016478/1) and Doctoral Training Grant (EP/M506448/1).