GithubHelp home page GithubHelp logo

nifti-snapshot's Introduction

icon

nifti-snapshot

nifti-snapshot is a tool to quickly capture nifti image as a png or jpeg figures.

$ pip install nifti_snapshot

For full documentation: Here

TBSS figures

From commandline

Snapshot of an tbss_fill image

fw=tbss_FW_tfce_corrp_tstat2_filled.nii.gz

./nifti_snapshot \
    --input ${fw} \
    --tbss \
    --output_file cli_test_fw.png \
    --cmap "Blues_r" \
    --title "Significant changes in FW in group A" \
    --cbar_title 'Increased FW' 

output


Snapshot of two tbss_fill images with overlap highlight

fa=tbss_FA_tfce_corrp_tstat1_filled.nii.gz
fat=tbss_FAt_tfce_corrp_tstat1_filled.nii.gz

./nifti_snapshot \
    --input ${fa} ${fat} \
    --tbss \
    --output_file cli_test.png \
    --cmap "Blues_r" "autumn" \
    --title "Significant changes in FA and FAt in group A" \
    --cbar_title 'Reduced' 'Reduced FAt' 'Overlap' \
    --overlap \
    --overlap_cmap "summer" \
    --overlap_alpha 0.8

output


From python

Snapshot of an tbss_fill image

from nifti_snapshot import nifti_snapshot
fw = 'tbss_FA_tfce_corrp_tstat1_filled.nii.gz'
fw_color = 'Blues_r'

tbssFigure = nifti_snapshot.TbssFigure(
        image_files=[fw],
        output_file='docs/fw_example.png',
        cmap_list=[fw_color],
        cbar_titles=['Increased FW'],
        alpha_list=[0.8],
        title='Increased Freewater in group A',
        cbar_x=0.35, cbar_width=0.3)
tbssFigure.create_figure_one_map()

Snapshot of two tbss_fill images with overlap highlight

from nifti_snapshot import nifti_snapshot
fa = 'tbss_FA_tfce_corrp_tstat1_filled.nii.gz'
fat = 'tbss_FAt_tfce_corrp_tstat1_filled.nii.gz'

fa_color_1 = 'Blues_r'
fa_color_2 = 'autumn'
fa_color_overlap = 'summer'

tbssFigure = nifti_snapshot.TbssFigure(
    image_files=[fa, fat],
    output_file='docs/fa_fat_example.png',
    cmap_list=[fa_color_1, fa_color_2],
    overlap_cmap=fa_color_overlap,
    cbar_titles=[
        'Reduced FA',
        'Reduced FAt',
        'Overlap'],
    alpha_list=[1, 1, 0.8],
    title='Significant changes in FA and FAt in group A')
tbssFigure.create_figure_two_maps_and_overlap()

nifti-snapshot's People

Contributors

kcho avatar neuroimage avatar

Stargazers

 avatar  avatar ZoeLi avatar Amr Eed avatar  avatar

Watchers

James Cloos avatar  avatar Ryan Zurrin avatar

Forkers

ryanzurrin

nifti-snapshot's Issues

Script issues after Installation

Hi Kevin, after installation following the README.md file, nothing happens when I run randomise_summary.py. I have just tried to follow the lines above to export to PATH but it doesn't seem to be working either. When I do nifti_snapshot -h, it says command not found. Do you have any suggestions what I can do?

Thank you for your help in advance!
Hamzah

ERROR downloading module

I am trying to run randomise_summary.py but I need this nifti-snapshot module. On my university's server I download:

bash-4.1$ python3 -m pip install nifti_snapshot

but get error:

Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement nifti_snapshot (from versions: none)
ERROR: No matching distribution found for nifti_snapshot

Module Installing Error

Hi,

I am unable to install this module.

I tried 'pip install git+https://github.com/pnlbwh/nifti-snapshot.git', but that won't work due to the absence of a setup.py file.

I tried the other solution as given in a different issue to 'echo "export PYTHONPATH=${PYTHONPATH}:/Users//pnl_randomise/nifti-snapshot/nifti_snapshot" >> ~/.bashrc' but I still get the module not found error.

How can I fix this?

Thanks!

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.