simulariumio/physicell/physicell_converter.py
def _read(input_data: PhysicellData) -> TrajectoryData:
        """
        Return a TrajectoryData object containing the PhysiCell data
        """
        print("Reading PhysiCell Data -------------")
        agent_data, spatial_units, id_mapping = PhysicellConverter._get_trajectory_data(
            input_data
        )
        # get display data (geometry and color)
        for cell_id in input_data.display_data:
            display_data = input_data.display_data[cell_id]
            if cell_id not in id_mapping:
                print(
                    f"cell type ID {cell_id} provided in display_data does not exist "
                    "in PhysiCell data, skipping its rendering info"
                )
                continue
            type_name = display_data.name
            for phase_id in id_mapping[cell_id]:
                if (
                    cell_id in input_data.phase_names
                    and phase_id in input_data.phase_names[cell_id]
                ):
                    type_name += "#" + input_data.phase_names[cell_id][phase_id]
                else:
                    type_name += PhysicellConverter._get_default_phase_name(phase_id)
                agent_data.display_data[type_name] = display_data
        input_data.meta_data._set_box_size()
        return TrajectoryData(
            meta_data=input_data.meta_data,
            agent_data=agent_data,
            time_units=input_data.time_units,
            spatial_units=spatial_units,
            plots=input_data.plots,
        )

        Return a TrajectoryData object containing the PhysiCell data
        
Return a TrajectoryData object containing the PhysiCell data
Return a TrajectoryData object containing the PhysiCell data
def _read(input_data: PhysicellData) -> TrajectoryData:
        print("Reading PhysiCell Data -------------")
        agent_data, spatial_units, id_mapping = PhysicellConverter._get_trajectory_data(
            input_data
        )
        for cell_id in input_data.display_data:
            display_data = input_data.display_data[cell_id]
            if cell_id not in id_mapping:
                print(
                    f"cell type ID {cell_id} provided in display_data does not exist "
                    "in PhysiCell data, skipping its rendering info"
                )
                continue
            type_name = display_data.name
            for phase_id in id_mapping[cell_id]:
                if (
                    cell_id in input_data.phase_names
                    and phase_id in input_data.phase_names[cell_id]
                ):
                    type_name += "#" + input_data.phase_names[cell_id][phase_id]
                else:
                    type_name += PhysicellConverter._get_default_phase_name(phase_id)
                agent_data.display_data[type_name] = display_data
        input_data.meta_data._set_box_size()
        return TrajectoryData(
            meta_data=input_data.meta_data,
            agent_data=agent_data,
            time_units=input_data.time_units,
            spatial_units=spatial_units,
            plots=input_data.plots,
        )
def _read ( input_data : PhysicellData ) -> TrajectoryData : print ( "Reading PhysiCell Data -------------" ) agent_data , spatial_units , id_mapping = PhysicellConverter . _get_trajectory_data ( input_data ) for cell_id in input_data . display_data : display_data = input_data . display_data [ cell_id ] if cell_id not in id_mapping : print ( f"cell type ID {cell_id} provided in display_data does not exist " "in PhysiCell data, skipping its rendering info" ) continue type_name = display_data . name for phase_id in id_mapping [ cell_id ] : if ( cell_id in input_data . phase_names and phase_id in input_data . phase_names [ cell_id ] ) : type_name += "#" + input_data . phase_names [ cell_id ] [ phase_id ] else : type_name += PhysicellConverter . _get_default_phase_name ( phase_id ) agent_data . display_data [ type_name ] = display_data input_data . meta_data . _set_box_size ( ) return TrajectoryData ( meta_data = input_data . meta_data , agent_data = agent_data , time_units = input_data . time_units , spatial_units = spatial_units , plots = input_data . plots , )
Return a TrajectoryData object containing the PhysiCell data
Return a TrajectoryData object containing the PhysiCell data
"""
        Return a TrajectoryData object containing the PhysiCell data
        """ # get display data (geometry and color)
input_data
PhysicellData