Skip to main content

No project description provided

Project description

GlioMODA

Python Versions Stable Version Documentation Status tests codecov License

Features

Installation

With a Python 3.10+ environment, you can install gliomoda directly from PyPI:

pip install gliomoda

Data Requirements

GlioMODA is trained on BraTS (Brain Tumor Segmentation) preprocessed images. This preprocessing typically includes co-registration to the T1c, skull stripping (brain extraction), and registration to the SRI-24 brain atlas (template).

We recommend using the preprocessing package, part of the BrainLesion Suite, to design custom preprocessing pipelines tailored to your specific needs.

Alternatively, if you have the full set of MRI modalities (T1, T1c, T2, FLAIR), you can use glioma-specific preprocessing functions from the BraTS Orchestrator.

Use Cases and Tutorials

A minimal example to create a segmentation could look like this:

from gliomoda import Inferer

inferer = Inferer()

# Save NIfTI files
inferer.infer(
    t1c="path/to/t1c.nii.gz",
    t2f="path/to/t2f.nii.gz",
    t1n="path/to/t1n.nii.gz",
    t2w="path/to/t2w.nii.gz",
    segmentation_file="path/to/segmentation.nii.gz",
)

# Or directly use pre-loaded NumPy data. (Both works as well)
segmentation_np = inferer.infer(
    t1c=t1c_np,
    t2f=t2f_np,
    t1n=t1n_np,
    t2w=t2w_np,
)

[!NOTE] If you're interested in the GlioMODA package, the BraTS Adult Glioma Segmentation may also be of interest.

Citation

If you use GlioMODA in your research, please cite it to support the development!

TODO: citation will be added asap

Trouble shoot

Multiprocessing error

If you get an error related to something like this:

RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

        To fix this issue, refer to the "Safe importing of main module"
        section in https://docs.python.org/3/library/multiprocessing.html

Please ensure you properly wrap your script:

if __name__ == "__main__":
    inferer = Inferer()
    ...

Contributing

We welcome all kinds of contributions from the community!

Reporting Bugs, Feature Requests and Questions

Please open a new issue here.

Code contributions

Nice to have you on board! Please have a look at our CONTRIBUTING.md file.

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

gliomoda-0.0.4.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gliomoda-0.0.4-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file gliomoda-0.0.4.tar.gz.

File metadata

  • Download URL: gliomoda-0.0.4.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for gliomoda-0.0.4.tar.gz
Algorithm Hash digest
SHA256 359984e363d5c050e40bcf3fce486c2c3a465b2e4026779a793f00ac3d8285b0
MD5 1307681c4d943092d63141cf852e8648
BLAKE2b-256 6f1e4c60e43741faa975798707e8eb08191ffc70f89e4b77fe6c24fdb3473aef

See more details on using hashes here.

File details

Details for the file gliomoda-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: gliomoda-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for gliomoda-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 15e2e76d825cf7292dee0f1765bbd9a9c2dae9b6b491b7d51d9a48f2d0250a80
MD5 be18a8f25673a3fc1ba86615927d6291
BLAKE2b-256 d687e1fe602f0d0a46389729ecf805f02af254ccf768cbdb0916cc5809e5af4a

See more details on using hashes here.

Supported by

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