Giter Site home page Giter Site logo

gif_your_nifti's Introduction

Hi there ๐Ÿ‘‹

I'm Michael, a senior machine learning researcher & neuroscientist fascinated by hidden patterns in the digital world. My curiosity and expertise extend across neuroimaging, computer vision, vital signs, AR/VR, and multi-sensor sensing. With a strong background in signal processing, open source, and Python, I explore these domains with an open and innovative mindset.

Eager to push boundaries and think outside the box, I welcome opportunities to craft unique solutions and collaborate on new projects. Don't hesitate to contact me!

For more about me, check out my personal page under: https://miykael.github.io/

gif_your_nifti's People

Contributors

bariskanber avatar chengranaa avatar ilkayisik avatar jamesbraza avatar miykael avatar octomike avatar ofgulban avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gif_your_nifti's Issues

Add overlay?

Might it be possible to visualize two images, anatomical base with an overlay with a different color scheme?

Error

Hi !
hope you are fine . Can u help me in solving ths problem

gif_your_nifti '/home/abir/Bureau/data/training/patient028/patient028_4d.nii'
Traceback (most recent call last):
  File "/usr/local/bin/gif_your_nifti", line 11, in <module>
    load_entry_point('gif-your-nifti==0.2.0', 'console_scripts', 'gif_your_nifti')()
  File "/home/abir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/abir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/home/abir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/home/abir/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.linux-x86_64/egg/gif_your_nifti/__main__.py", line 5, in <module>
  File "build/bdist.linux-x86_64/egg/gif_your_nifti/core.py", line 4, in <module>
  File "/usr/local/lib/python2.7/dist-packages/nibabel-3.1.0-py2.7.egg/nibabel/__init__.py", line 40, in <module>
    from . import analyze as ana
  File "/usr/local/lib/python2.7/dist-packages/nibabel-3.1.0-py2.7.egg/nibabel/analyze.py", line 935
    def from_file_map(klass, file_map, *, mmap=True, keep_file_open=None):
                                        ^
SyntaxError: invalid syntax

RuntimeError: Python is not installed as a framework

I use MacOS (El Capitan) and Conda
Looks like there is a MacOS related issue in the installation.
After I install the package I got this error:
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

After googling it I found this solution on a Stackoverflow page:[https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python]

I assume you have installed the pip matplotlib, there is a directory in you root called ~/.matplotlib.
Create a file ~/.matplotlib/matplotlibrc there and add the following code: backend: TkAgg

After doing this now it works and I can create gifs of my nifti. Hooray!!!

Allow for recent imageio

was addressed via pinning of imageio in

but that now causes

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
gif-your-nifti 0.2.1 requires imageio<2.28, but you have imageio 2.34.1 which is incompatible.
Successfully installed argparse-1.4.0 bidsonym-0.0.6+17.g8417c18.dirty citeproc-py-0.6.0 duecredit-0.10.2 imageio-2.34.1 nilearn-0.10.4 scikit-learn-1.5.0 threadpoolctl-3.5.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Removing intermediate container 6706dd6d886d

while installing bidsonym

Ideally issue should be properly resolved by adjusting used interface and removing (or at least raising to < 2.35 upper bound on imageio)

Bug: incompatible with `imageio` verison 2.28

imageio version 2.28 comes with imageio/imageio#871 which finally came into effect in imageio/imageio#824 no longer works with git_your_nifti:

> gif_your_nifti data/brats2020-training-validation-data/BraTS2020_TrainingData/MICCAI_BraTS2020_TrainingData/BraTS20_Training_354/BraTS20_Training_354_seg.nii
====================
gif_your_nifti 0.2.0
====================
Selections:
  mode = normal
  size = 1
  fps  = 20
Traceback (most recent call last):
  File "/path/to/venv/bin/gif_your_nifti", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/path/to/venv/lib/python3.11/site-packages/gif_your_nifti/__main__.py", line 60, in main
    core.write_gif_normal(f, cfg.size, cfg.fps)
  File "/path/to/venv/lib/python3.11/site-packages/gif_your_nifti/core.py", line 192, in write_gif_normal
    mimwrite(filename.replace(ext, '.gif'), new_img,
  File "/path/to/venv/lib/python3.11/site-packages/imageio/v2.py", line 484, in mimwrite
    return file.write(ims, is_batch=True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/venv/lib/python3.11/site-packages/imageio/plugins/pillow.py", line 354, in write
    raise TypeError(
TypeError: The keyword `fps` is no longer supported. Use `duration`(in ms) instead, e.g. `fps=50` == `duration=20` (1000 * 1/50).

Here is the dataset being used.

The version should be pinned in setup.py for those installing like so:

pip install git+https://github.com/miykael/gif_your_nifti.git

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.