whippersnappy


Namewhippersnappy JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummaryA package to plot and capture FastSurfer and FreeSurfer-style surface overlays.
upload_time2023-06-14 12:11:29
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Martin Reuter, DeepMI Lab, DZNE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords python freesurfer brain mri cortical surface
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WhipperSnapPy

WhipperSnapPY is a small Python OpenGL program to render FreeSurfer and 
FastSurfer surface models and color overlays and generate screen shots.

## Contents:

- Capture 4x4 surface plots (front & back, left and right)
- OpenGL window for interactive visualization

Note, that currently no off-screen rendering is supported. Even in snap 
mode an invisible window will be created to render the openGL output
and capture the contents to an image. In order to run this on a headless
server, inside Docker, or via ssh we recommend to install xvfb and run

```
apt update && apt install -y python3 python3-pip xvfb
pip3 install pyopengl glfw pillow numpy pyrr PyQt5==5.15.6
pip3 install .
xvfb-run whippersnap ...
```

## Installation:

The `WhipperSnapPy` package can be installed from this repository using:
```
python3 -m pip install .
```

## Usage:

### Local:

After installing the Python package, the whippersnap program can be run using
the installed command line tool such as in the following example:
```
whippersnap -lh $OVERLAY_DIR/$LH_OVERLAY_FILE \
            -rh $OVERLAY_DIR/$RH_OVERLAY_FILE \
            -sd $SURF_SUBJECT_DIR \
            -o $OUTPUT_DIR/whippersnappy_image.png \
```

Note that adding the `--interactive` flag will start an interactive GUI that
includes a visualization of one hemisphere side and a simple application through
which color threshold values can be configured.

### Docker:

the whippersnap program can be run within a docker container to capture
a snapshot by building the provided Docker image and running a container as
follows:
```
docker build --rm=true -t whippersnappy -f ./Dockerfile .
```
```
docker run --rm --init --name my_whippersnappy -v $SURF_SUBJECT_DIR:/surf_subject_dir \
                                               -v $OVERLAY_DIR:/overlay_dir \
                                               -v $OUTPUT_DIR:/output_dir \
                                               --user $(id -u):$(id -g) whippersnappy:latest \
                                               --lh_overlay /overlay_dir/$LH_OVERLAY_FILE \
                                               --rh_overlay /overlay_dir/$RH_OVERLAY_FILE \
                                               --sdir /surf_subject_dir \
                                               --output_path /output_dir/whippersnappy_image.png
```

In this example: `$SURF_SUBJECT_DIR` contains the surface files, `$OVERLAY_DIR` contains the overlays to be loaded on to the surfaces, `$OUTPUT_DIR` is the local output directory in which the snapshot will be saved, and `${LH/RH}_OVERLAY_FILE` point to the specific overlay files to load.

**Note:** The `--init` flag is needed for the `xvfb-run` tool to be used correctly.

## Links:

We also invite you to check out our lab webpage at https://deep-mi.org

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "whippersnappy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Martin Reuter <martin.reuter@dzne.de>",
    "keywords": "python,FreeSurfer,Brain MRI,Cortical Surface",
    "author": "",
    "author_email": "Martin Reuter <martin.reuter@dzne.de>",
    "download_url": "https://files.pythonhosted.org/packages/3f/e8/4ad2e0aebb518e5c185b74f8857b4dceb1b33c6de5d37e2e9a40875f88ac/whippersnappy-1.1.0.tar.gz",
    "platform": null,
    "description": "# WhipperSnapPy\n\nWhipperSnapPY is a small Python OpenGL program to render FreeSurfer and \nFastSurfer surface models and color overlays and generate screen shots.\n\n## Contents:\n\n- Capture 4x4 surface plots (front & back, left and right)\n- OpenGL window for interactive visualization\n\nNote, that currently no off-screen rendering is supported. Even in snap \nmode an invisible window will be created to render the openGL output\nand capture the contents to an image. In order to run this on a headless\nserver, inside Docker, or via ssh we recommend to install xvfb and run\n\n```\napt update && apt install -y python3 python3-pip xvfb\npip3 install pyopengl glfw pillow numpy pyrr PyQt5==5.15.6\npip3 install .\nxvfb-run whippersnap ...\n```\n\n## Installation:\n\nThe `WhipperSnapPy` package can be installed from this repository using:\n```\npython3 -m pip install .\n```\n\n## Usage:\n\n### Local:\n\nAfter installing the Python package, the whippersnap program can be run using\nthe installed command line tool such as in the following example:\n```\nwhippersnap -lh $OVERLAY_DIR/$LH_OVERLAY_FILE \\\n            -rh $OVERLAY_DIR/$RH_OVERLAY_FILE \\\n            -sd $SURF_SUBJECT_DIR \\\n            -o $OUTPUT_DIR/whippersnappy_image.png \\\n```\n\nNote that adding the `--interactive` flag will start an interactive GUI that\nincludes a visualization of one hemisphere side and a simple application through\nwhich color threshold values can be configured.\n\n### Docker:\n\nthe whippersnap program can be run within a docker container to capture\na snapshot by building the provided Docker image and running a container as\nfollows:\n```\ndocker build --rm=true -t whippersnappy -f ./Dockerfile .\n```\n```\ndocker run --rm --init --name my_whippersnappy -v $SURF_SUBJECT_DIR:/surf_subject_dir \\\n                                               -v $OVERLAY_DIR:/overlay_dir \\\n                                               -v $OUTPUT_DIR:/output_dir \\\n                                               --user $(id -u):$(id -g) whippersnappy:latest \\\n                                               --lh_overlay /overlay_dir/$LH_OVERLAY_FILE \\\n                                               --rh_overlay /overlay_dir/$RH_OVERLAY_FILE \\\n                                               --sdir /surf_subject_dir \\\n                                               --output_path /output_dir/whippersnappy_image.png\n```\n\nIn this example: `$SURF_SUBJECT_DIR` contains the surface files, `$OVERLAY_DIR` contains the overlays to be loaded on to the surfaces, `$OUTPUT_DIR` is the local output directory in which the snapshot will be saved, and `${LH/RH}_OVERLAY_FILE` point to the specific overlay files to load.\n\n**Note:** The `--init` flag is needed for the `xvfb-run` tool to be used correctly.\n\n## Links:\n\nWe also invite you to check out our lab webpage at https://deep-mi.org\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Martin Reuter, DeepMI Lab, DZNE  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A package to plot and capture FastSurfer and FreeSurfer-style surface overlays.",
    "version": "1.1.0",
    "project_urls": {
        "documentation": "https://github.com/Deep-MI/WhipperSnapPy",
        "homepage": "https://github.com/Deep-MI/WhipperSnapPy",
        "source": "https://github.com/Deep-MI/WhipperSnapPy",
        "tracker": "https://github.com/Deep-MI/WhipperSnapPy/issues"
    },
    "split_keywords": [
        "python",
        "freesurfer",
        "brain mri",
        "cortical surface"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7733564bbfbf426f64fcd450b5ee0721631568cb3c8e8484a2a8bdc584fec69d",
                "md5": "3cb6f1e2e4bc0e71089f9304a06f10d4",
                "sha256": "ab2e88be3a11577b7fde687fddafe134c8ab0d6b40617a1a613a2ed0d6edeb93"
            },
            "downloads": -1,
            "filename": "whippersnappy-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3cb6f1e2e4bc0e71089f9304a06f10d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 113333,
            "upload_time": "2023-06-14T12:11:27",
            "upload_time_iso_8601": "2023-06-14T12:11:27.900810Z",
            "url": "https://files.pythonhosted.org/packages/77/33/564bbfbf426f64fcd450b5ee0721631568cb3c8e8484a2a8bdc584fec69d/whippersnappy-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3fe84ad2e0aebb518e5c185b74f8857b4dceb1b33c6de5d37e2e9a40875f88ac",
                "md5": "5ebd442d1e77af309f39b802f8794262",
                "sha256": "7618ef3428484dcb740a6e02f0905cf0c9698c55deae2cb7578983bd944332ef"
            },
            "downloads": -1,
            "filename": "whippersnappy-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5ebd442d1e77af309f39b802f8794262",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 114060,
            "upload_time": "2023-06-14T12:11:29",
            "upload_time_iso_8601": "2023-06-14T12:11:29.562719Z",
            "url": "https://files.pythonhosted.org/packages/3f/e8/4ad2e0aebb518e5c185b74f8857b4dceb1b33c6de5d37e2e9a40875f88ac/whippersnappy-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-14 12:11:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Deep-MI",
    "github_project": "WhipperSnapPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "whippersnappy"
}
        
Elapsed time: 0.10092s