Movie
Make movies for simulations in the database.
PhysiCellModelManager.makeMovie — Method
makeMovie(simulation_id::Integer; magick_path::Union{Missing,String}=simulator().path_to_magick, ffmpeg_path::Union{Missing,String}=simulator().path_to_ffmpeg)
makeMovie(T::AbstractTrial; kwargs...)
makeMovie(out::PCMMOutput; kwargs...)
makeMovie(simulation_ids::AbstractVector{<:Integer}; kwargs...)
makeMovie(Ts::AbstractVector{<:AbstractTrial}; kwargs...)Batch make movies for each simulation identified by the input.
Use the PhysiCell Makefile to generate the movie. This process requires first generating JPEG files, which are then used to create the movie. Deletes the JPEG files after the movie is generated.
This relies on ImageMagick and FFmpeg being installed on the system. There are three ways to allow this function to find these dependencies:
- Pass the path to the dependencies using the
magick_pathandffmpeg_pathkeyword arguments. - Set the
PATHenvironment variable to include the directories containing the dependencies. - Set environment variables
PCMM_IMAGEMAGICK_PATHandPCMM_FFMPEG_PATHbeforeusing PhysiCellModelManager.
Arguments
simulation_id::Integer: The ID of the simulation for which to make the movie.T::AbstractTrial: Make movies for all simulations in theAbstractTrial.out::PCMMOutput: Make movies for all simulations in the output, i.e., all simulations in the completed trial.simulation_ids::AbstractVector{<:Integer}: Make movies for each simulation ID in the collection (e.g. a range such as4:7).Ts::AbstractVector{<:AbstractTrial}: Make movies for every simulation across the collection of trials (e.g.Simulation.(4:7)).
Keyword Arguments
magick_path::Union{Missing,String}: The path to the ImageMagick executable. If not provided, usessimulator().path_to_magick.ffmpeg_path::Union{Missing,String}: The path to the FFmpeg executable. If not provided, usessimulator().path_to_ffmpeg.verbose::Bool: Iftrue, prints the output of the commands used to generate the movie. Default isfalse.framerate::Union{Missing,Int}: Frames per second, forwarded to the Makefile'sFRAMERATEvariable. If not provided, uses the Makefile's own default.magick_density::Union{Missing,Int}: JPEG rendering density (dpi), forwarded to the Makefile'sMAGICK_DENSITYvariable. If not provided, uses the Makefile's own default.magick_resize_x::Union{Missing,Int}: JPEG resize width, forwarded to the Makefile'sMAGICK_RESIZE_Xvariable. If not provided, uses the Makefile's own default.magick_resize_y::Union{Missing,Int}: JPEG resize height, forwarded to the Makefile'sMAGICK_RESIZE_Yvariable. If not provided, uses the Makefile's own default.
Example
makeMovie(123) # make a movie for simulation 123makeMovie(sampling) # make movies for all simulations in the samplingout = run(sampling) # run the sampling
makeMovie(out) # make movies for all simulations in the outputmakeMovie(123; framerate=10, magick_density=48, magick_resize_x=512, magick_resize_y=512)makeMovie(4:7) # make movies for simulations 4, 5, 6, and 7
makeMovie(Simulation.(4:7)) # equivalent, passing Simulation objects