cellsium.output package
The output package contains the various output modules.
- class cellsium.output.Output(*args, **kwargs)
Bases:
Selectable
,Multiple
Base class of the Output classes.
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- class cellsium.output.OutputIndividualFiles(*args, **kwargs)
Bases:
Tunable
Output individual files
- default: bool = True
- value = True
- class cellsium.output.OutputIndividualFilesWildcard(*args, **kwargs)
Bases:
Tunable
Pattern for individual file names
- default: str = '{}'
- value = '{}'
- class cellsium.output.OutputIndividualFilesZeros(*args, **kwargs)
Bases:
Tunable
Amount of digits used for outputting the frame number of individual file names
- default: int = 3
- value = 3
- class cellsium.output.OutputReproducibleFiles(*args, **kwargs)
Bases:
Tunable
Output files in a reproducible manner
- default: bool = True
- value = True
- cellsium.output.check_overwrite(path: str, overwrite: bool = False) str
Check if a path exists, if so raising a RuntimeError if overwriting is disabled.
- Parameters:
path – Path
overwrite – Whether to overwrite
- Returns:
Path
- cellsium.output.ensure_extension(path: str, extension: str) str
Ensures that the path ends with extension, possibly adding it.
- Parameters:
path – Path
extension – Extension
- Returns:
Final path
- cellsium.output.ensure_number(path: str, number: int, disable_individual: bool = False) str
Depending on configuration, add a number to the path for consecutive output files.
- Parameters:
path – Path
number – Number
disable_individual – Possibility to disable adding of a number
- Returns:
Path with number
- cellsium.output.ensure_path(path: str) str
Ensures that the parent directory to the to path exists.
- Parameters:
path – Path
- Returns:
the path
- cellsium.output.ensure_path_and_extension(path: str, extension: str) str
Ensures that the parent directory to path exists, and it has extension, possibly by adding it.
- Parameters:
path – Path
extension – Extension
- Returns:
Final path
- cellsium.output.ensure_path_and_extension_and_number(path: str, extension: str, number: int, disable_individual: bool = False) str
Ensures that a path exists, has an extension and a number.
- Parameters:
path – Path
extension – Extension
number – Number
disable_individual – Whether to disable adding of number
- Returns:
Final path
cellsium.output.xml module
Output as Trackmate XML lineage files, compatible with the JuNGLE extensions.
- class cellsium.output.xml.TrackMateXML(*args, **kwargs)
Bases:
Output
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
cellsium.output.plot module
Output using matplotlib.
- class cellsium.output.plot.MicrometerPerCm(*args, **kwargs)
Bases:
Tunable
- default: float = 2.5
- value = 2.5
- class cellsium.output.plot.PlotRenderer(*args, **kwargs)
Bases:
Output
,Default
Output using matplotlib.
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
cellsium.output.mesh module
Mesh output in the STL format.
- class cellsium.output.mesh.MeshOutput(*args, **kwargs)
Bases:
Output
Mesh output in the STL format.
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
cellsium.output.svg module
Output as SVG vector images.
- class cellsium.output.svg.SvgRenderer(*args, **kwargs)
Bases:
Output
- static create_xml()
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- output(world: World, **kwargs) None
Outputs the World, this function is usually called by either write or display.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- static points_to_path(points: ndarray) str
cellsium.output.render module
Photorealistic rendered output.
- class cellsium.output.render.FluorescenceRenderer(*args, **kwargs)
Bases:
PlainRenderer
- channel: int = 0
- class cellsium.output.render.NoisyUnevenIlluminationPhaseContrast(*args, **kwargs)
- class cellsium.output.render.PhaseContrastRenderer(*args, **kwargs)
Bases:
PlainRenderer
- class cellsium.output.render.PlainRenderer(*args, **kwargs)
Bases:
Output
- static convert(image: ndarray, max_value: int = 255) ndarray
- debug_output(name: str, array: ndarray) None
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- static imwrite(name: str, img: ndarray, overwrite: bool = False, output_count: Optional[int] = None) bool
- static new_canvas()
- output(world: World, **kwargs) ndarray
Outputs the World, this function is usually called by either write or display.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- static render_cells(canvas: ndarray, array_of_points: ndarray, fast: bool = False) ndarray
- write(world: World, file_name: str, overwrite: bool = False, output_count: int = 0, **kwargs) None
Output and write the World to file_name.
- Parameters:
world – World
file_name – Filename to write output to
kwargs – Additional arguments
- Returns:
- write_debug_output = False
- class cellsium.output.render.RenderChannels(*args, **kwargs)
Bases:
Tunable
Channels to render (i.e. output classes which produce rendered images)
- default = 'NoisyUnevenIlluminationPhaseContrast'
- static get_mapping() Dict[str, type]
- classmethod instantiate() PlainRenderer
- classmethod test(value: str) bool
- value = 'NoisyUnevenIlluminationPhaseContrast'
- class cellsium.output.render.TiffOutput(*args, **kwargs)
Bases:
Output
- output(world: World, **kwargs) List[ndarray]
Outputs the World, this function is usually called by either write or display.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- output_type
alias of
uint8
- class cellsium.output.render.UnevenIlluminationPhaseContrast(*args, **kwargs)
Bases:
PhaseContrastRenderer
- create_uneven_illumination() ndarray
- new_uneven_illumination() ndarray
- cellsium.output.render.get_canvas_points_for_cell(cell: CellGeometry, image_height: Optional[Tuple[int, int]] = None) ndarray
- cellsium.output.render.new_canvas(dtype=<class 'numpy.float32'>) ndarray
cellsium.output.serialization module
Serialization outputs.
- class cellsium.output.serialization.CsvOutput(*args, **kwargs)
Bases:
Output
CSV Tabular Output.
- class cellsium.output.serialization.JsonPickleSerializer(*args, **kwargs)
Bases:
Output
Output as jsonpickle serialized files.
- display(world: World, **kwargs) None
Output and display the World, e.g. via a GUI window.
- Parameters:
world – World
kwargs – Additional arguments
- Returns:
- class cellsium.output.serialization.QuickAndDirtyTableDumper(*args, **kwargs)
Bases:
Output
Simple tabular output.
cellsium.output.gt module
Ground truth outputs in COCO, YOLO and a generic mask format.
- class cellsium.output.gt.COCOOutput(*args, **kwargs)
Bases:
GroundTruthOutput
Output in the COCO format.
- static now() str
- class cellsium.output.gt.GenericMaskOutput(*args, **kwargs)
Bases:
GroundTruthOutput
Generic mask output (i.e. directories of files).
- static generate_cells_mask(cells: Iterable[CellGeometry], cell_value: int = 1, binary: bool = True) ndarray
- static imwrite(*args, **kwargs) None
- class cellsium.output.gt.YOLOOutput(*args, **kwargs)
Bases:
GroundTruthOutput
Output in the YOLO format.