Giter Site home page Giter Site logo

napari-animation's Introduction

napari-animation

License PyPI Python Version tests codecov

napari-animation is a plugin for making animations in napari.


This plugin is built on naparimovie from @guiwitz. naparimovie was submitted to napari in PR#851 before napari plugin infrastructure existed.


Overview

napari-animation provides a framework for the creation of animations in napari, the plugin contains:

  • an easy to use GUI for creating animations interactively
  • a Python package for the programmatic creation of animations

This plugin remains under development and contributions are very welcome, please open an issue to discuss potential improvements.

Installation

PyPI

napari-animation is available through the Python package index and can be installed using pip.

pip install napari-animation

Local

You can clone this repository and install locally with

pip install -e .

Interactive use

napari-animation can be used interactively.

An animation is created by capturing keyframes containing the current viewer state.

To activate the GUI, select napari-animation: wizard from the plugins menu

Headless

napari-animation can also be run headless, allowing for reproducible, scripted creation of animations.

from napari_animation import Animation

animation = Animation(viewer)

viewer.dims.ndisplay = 3
viewer.camera.angles = (0.0, 0.0, 90.0)
animation.capture_keyframe()
viewer.camera.zoom = 2.4
animation.capture_keyframe()
viewer.camera.angles = (-7.0, 15.7, 62.4)
animation.capture_keyframe(steps=60)
viewer.camera.angles = (2.0, -24.4, -36.7)
animation.capture_keyframe(steps=60)
viewer.reset_view()
viewer.camera.angles = (0.0, 0.0, 90.0)
animation.capture_keyframe()
animation.animate('demo.mov', canvas_only=False)

Examples

Examples can be found in our examples folder. Simple examples for both interactive and headless use of the plugin follow.

Contributing

Contributions are very welcome and a detailed contributing guide is coming soon.

Tests are run with pytest.

We use pre-commit to sort imports with isort, format code with black, and lint with flake8 automatically prior to each commit. To minmize test errors when submitting pull requests, please install pre-commit in your environment as follows:

pre-commit install

License

Distributed under the terms of the BSD-3 license, "napari-animation" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

napari-animation's People

Contributors

alisterburt avatar sofroniewn avatar fifourche avatar tlambert03 avatar guiwitz avatar katherine-hutchings avatar jookuma avatar brisvag avatar sassanostvar avatar cormsby626 avatar ptbrown1729 avatar

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.