Skip to main content

Media Maker Python SDK for Blue Brain BioExplorer

Project description

Media Maker plugin

Description

The Media Maker plugin provides media generation API for Blue Brain BioExplorer.

API

Snapshot

The following example illustrates how to connect to the Blue Brain BioExplorer and export a snapshot of the current view to disk. The snapshot is exported to the /tmp folder, with a resolution of 512x512, and with 16 samples per pixel.

from bioexplorer import BioExplorer
from mediamaker import MovieMaker

bio_explorer = BioExplorer('localhost:5000')
movie_maker = MovieMaker(bio_explorer)

movie_maker.create_snapshot(
    path='/tmp/test.png',size=[512, 512], samples_per_pixel=16)

Movie

The following example illustrates how to connect to the Blue Brain BioExplorer and generate a set of frames according to some given camera control points. Frames are exported to the /tmp folder.

from bioexplorer import BioExplorer
from mediamaker import MovieMaker

bio_explorer = BioExplorer('localhost:5000')
movie_maker = MovieMaker(bio_explorer)

control_points = [
    {
        'apertureRadius': 0.0,
        'direction': [0.0, 0.0, -1.0],
        'focusDistance': 0.0,
        'origin': [0.5, 0.5, 1.5],
        'up': [0.0, 1.0, 0.0]
    },
    {
        'apertureRadius': 0.0,
        'direction': [-0.482, -0.351, -0.802],
        'focusDistance': 0.0,
        'origin': [2.020, 1.606, 3.030],
        'up': [-0.199, 0.936, -0.289]
    }
]

movie_maker.build_camera_path(
    control_points=control_points, nb_steps_between_control_points=50,
    smoothing_size=50)

movie_maker.set_current_frame(10)
movie_maker.create_movie(
    path='/tmp', size=[512, 512], samples_per_pixel=16, start_frame=10, end_frame=20)

License

This software is available to download and use under the GNU General Public License (GPL, or “free software”). The code is open sourced with approval from the open sourcing committee and principal coordinators of the Blue Brain Project in February 2021.

Contact

For more information on the Media Maker plugin, please contact:

Cyrille Favreau
cyrille.favreau@epfl.ch

Funding & Acknowledgment

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

COPYRIGHT 2020–2021, Blue Brain Project/EPFL

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

mediamaker-0.3.0.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file mediamaker-0.3.0.tar.gz.

File metadata

  • Download URL: mediamaker-0.3.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for mediamaker-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c5d71f46034a9e1d8e95bc2a994d53da1fc9c6f073739eefaaa6c0fea146c0b5
MD5 ed6be6b2460ce9b3f76ad120b1ad0076
BLAKE2b-256 141ae58c92c8c8e7480ccd024e925bd019d1e26c0884acb950b347773827ebc6

See more details on using hashes here.

Supported by

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