timelapse_tools package¶
Subpackages¶
Submodules¶
timelapse_tools.constants module¶
timelapse_tools.conversion module¶
-
timelapse_tools.conversion.
generate_movies
(img: Union[str, pathlib.Path], distributed_executor_port: Union[str, int, None] = None, save_path: Union[str, pathlib.Path, None] = None, operating_dim: str = 'T', overwrite: bool = False, fps: int = 12, quality: int = 6, save_format: str = 'mp4', save_workflow: bool = False, normalization_func: Callable = <function single_channel_percentile_norm>, normalization_kwargs: Dict[str, Any] = {}, projection_func: Callable = <function single_channel_max_project>, projection_kwargs: Dict[str, Any] = {}, S: Union[int, slice, None] = None, C: Union[int, slice, None] = None, B: Union[int, slice] = 0) → pathlib.Path[source]¶ Generate a movie for every scene and channel pair found in a file through an operating dimension.
- Parameters
img (Union[str, Path]) – Path to a CZI file to read and generate movies for.
distributed_executor_port (Optional[Union[str, int]]) – If provided a port to use for connecting to the distributed scheduler. All image computation and workflow tasks will be distributed using Dask. Default: None
save_path (Optional[Union[str, Path]]) – A specific path to save the generated movies to. Default: The a directory named after the provided file.
operating_dim (str) – Which dimension to operating through for each frame of the movie. Default: Dimensions.Time (“T”)
overwrite (bool) – Should existing files found under the same directory name be overwritten. Default: False
fps (int) – Frames per second of each produces movie. Default: 12
quality (int) – ImageIO’s compression system. 0 is high compression, 10 is no compression. Default: 6
save_format (str) – Which movie format should be used for each produced file. Default: mp4 Available: mov, avi, mpg, mpeg, mp4, mkv, wmv
save_workflow (bool) – Optionally, save a PNG and PDF of the workflow that ran. If this is set to True, be sure you have installed graphviz and added it’s executable to your PATH. Default: False
normalization_func (Callable) – A function to normalize the entire movie data prior to projection. Default: timelapse_tools.normalization.single_channel_percentile_norm
normalization_kwargs (Dict[str, Any]) – Any extra arguments to pass to the normalization function. Default: {}
projection_func (Callable) – A function to project the data for at each frame of the movie. Default: timelapse_tools.projection.single_channel_max_project
projection_kwargs (Dict[str, Any]) – Any extra arguments to pass to the projection function. Default: {}
S (Optional[Union[int, slice]]) – A specific integer or slice to use for selecting down the scenes to process. Default: None (process all scenes)
C (Optional[Union[int, slice]]) – A specific integer or slice to use for selecting down the channels to process. Default: None (process all channels)
B (Union[int, slice]) – A specific integer or slice to use for selecting down the channels to process. Default: 0
- Returns
save_path – The path to the produced scene-channel pairings of movies.
- Return type
Path