Giter Club home page Giter Club logo

skinsegmentator's Introduction

SkinSegmentator

This repository is adapted from TotalSegmentator

Installation

SkinSegmentator works on Ubuntu, Mac, and Windows and on CPU and GPU.

Install dependencies:

Install SkinSegmentator

pip install skinsegmentator

Usage

SkinSegmentator -i mr.nii.gz -o segmentations

Note: A Nifti file or a folder with all DICOM slices of one patient is allowed as input

Note: If you run on CPU use the option --fast to greatly improve runtime.

Note: This is not a medical device and is not intended for clinical usage.

Python API

You can run SkinSegmentator via Python:

import nibabel as nib
from skinsegmentator.python_api import skinsegmentator

if __name__ == "__main__":
    input_path = 'test/Validation_T1_001_0000.nii.gz'
    output_path = 'test/skin.nii.gz'
    # option 1: provide input and output as file paths
    skinsegmentator(input_path, output_path) 

    input_path = 'test/Validation_T1_001_0000.nii.gz'
    output_dir = 'test/'
    # option 2: provide input file path and output dir
    skinsegmentator(input_path, output_dir) 

    # option 3: provide input and output nifti image objects
    input_img = nib.load(input_path)
    output_img = skinsegmentator(input_img)
    nib.save(output_img, output_path)

You can see all available arguments here. Running from within the main environment should avoid some multiprocessing issues.

Install latest master branch (contains latest bug fixes)

pip install git+https://github.com/reubendo/SkinSegmentator.git

Typical problems

ITK loading Error When you get the following error message

ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition was found!

you should do

pip install SimpleITK==2.0.2

Alternatively you can try

fslorient -copysform2qform input_file
fslreorient2std input_file output_file

Reference

TODO

skinsegmentator's People

Contributors

reubendo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.