Skip to main content

Wrap SimpleITK functions as command lines

Project description

Wrap SimpleITK functions as command lines

Build Actions Status License

Create simple command line interface from functions that use SimpleITK images as arguments or return type.

Example:

import SimpleITK as sitk
import typer

def fill_holes_slice_by_slice(mask: sitk.Image) -> sitk.Image:
    mask = mask != 0
    output = sitk.Image(mask.GetSize(), mask.GetPixelID())
    output.CopyInformation(mask)
    for k in range(mask.GetSize()[2]):
        output[:, :, k] = sitk.BinaryFillhole(mask[:, :, k], fullyConnected=False)
    return output


if __name__ == "__main__":
    app = typer.Typer()

    register_command(fill_holes_slice_by_slice, app)

    app()

Install from PyPI:

pip install sitk-cli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sitk-cli-0.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

sitk_cli-0.2.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file sitk-cli-0.2.0.tar.gz.

File metadata

  • Download URL: sitk-cli-0.2.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for sitk-cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ff7c814274e47161c88bb4bcb56705a241155fe9981a16b80f45ec72b11e998d
MD5 98842dcf06481645a9aa41ad3d25b090
BLAKE2b-256 18ff67663cd5dc967f00b357a7b9550681a1f4dff483df74e745cc516aad1ac8

See more details on using hashes here.

File details

Details for the file sitk_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sitk_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for sitk_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 333749deaba32ebaf6c5dff266d03e7bd9f78f3118c08daccdb84574d4606db1
MD5 80b7308120e0a3174500d51317bddac8
BLAKE2b-256 64b554e8b76de805ad136fc0b0444d79347a2773d949c69070eae4845490dcca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page