Loader

PhysiCell output loading is provided by the standalone PhysiCellOutput.jl package, which PhysiCellModelManager.jl re-exports. PhysiCellOutput is path-based and stateless: its types (PhysiCellSnapshot, PhysiCellSequence, AbstractPhysiCellSequence) are keyed on an output-folder path, and its loaders (loadCells!, loadSubstrates!, loadMesh!, loadGraph!), metadata readers (cellLabels, cellTypeToNameDict, substrateNames), and helpers (AgentID, AgentDict, cellDataSequence, pathToOutputFileBase, pathToOutputXML) operate directly on those objects. See the PhysiCellOutput.jl documentation for the full folder-based API.

PhysiCellModelManager.jl re-adds its database identity on top: the methods documented below accept a simulation ID (<:Integer) or a Simulation, convert it to an output folder via pathToOutputFolder (a ModelManager function), and delegate to PhysiCellOutput. Object-based methods (e.g. loadCells!(snapshot), cellDataSequence(sequence, …)) are used directly from PhysiCellOutput and need no PhysiCellModelManager-specific method.

PhysiCellOutput.PhysiCellSequenceMethod
PhysiCellSequence(simulation_id::Integer; kwargs...)
PhysiCellSequence(simulation::Simulation; kwargs...)

Load the full sequence of snapshots for a PhysiCell simulation identified by its database id (or a Simulation).

Asserts that a project is initialized, converts simulation_id to its output folder via pathToOutputFolder, and delegates to the folder-based PhysiCellOutput.PhysiCellSequence. See that method for the full list of include_* keyword arguments and the returned fields.

Returns missing (with a printed message) if the simulation has no readable initial output, e.g. for a pruned simulation.

Examples

sequence = PhysiCellSequence(1; include_cells=true, include_substrates=true)
sequence = PhysiCellSequence(Simulation(1); include_mesh=true)
source
PhysiCellOutput.PhysiCellSnapshotType
PhysiCellSnapshot(simulation_id::Integer, index::Union{Integer,Symbol}, labels=String[], substrate_names=String[]; kwargs...)
PhysiCellSnapshot(simulation::Simulation, index::Union{Integer,Symbol}, args...; kwargs...)

Load a single snapshot of a PhysiCell simulation identified by its database id (or a Simulation).

This is PhysiCellModelManager's database-identity entry point: it asserts that a project is initialized, converts simulation_id to its output folder via pathToOutputFolder, and delegates to the folder-based PhysiCellOutput.PhysiCellSnapshot. See that method for the full list of include_* keyword arguments and the returned fields.

Returns missing (with a printed message) if the snapshot's files are not present, e.g. for a pruned simulation.

Examples

snapshot = PhysiCellSnapshot(1, 3; include_cells=true, include_substrates=true)
snapshot = PhysiCellSnapshot(Simulation(1), :final; include_cells=true)
source
PhysiCellOutput.cellDataSequenceMethod
cellDataSequence(simulation_id::Integer, labels; kwargs...)
cellDataSequence(simulation::Simulation, labels; kwargs...)

Return an AgentDict of per-cell time series for a simulation identified by its database id (or a Simulation). labels may be a single String or a Vector{String}.

Asserts that a project is initialized, converts simulation_id to its output folder via pathToOutputFolder, and delegates to the folder-based PhysiCellOutput.cellDataSequence. See that method for the meaning of the returned data and the include_dead / include_cell_type_name keyword arguments.

Examples

data = cellDataSequence(1, ["position", "elapsed_time_in_phase"]; include_dead=true)
data = cellDataSequence(Simulation(1), "position")
source