metadata#
- class ChannelPatternSpec(name: str, data_type: str, extension: str, pattern_relpath: str)[source]#
Bases:
object- data_type: str#
- extension: str#
- name: str#
- pattern_relpath: str#
- class Pattern(pattern_str)[source]#
Bases:
ExpressionExtends expression to support unlabeled axes. We start with undefined axes i.e. I,J,K, etc. and then we replace them with the actual axis name when we know it. we can parse the pattern from a string containing the placeholders (by default ‘?’). We can also highlight a given axis specified by index or name.
- assign_axes_from_combo(axis_names: list[str]) None[source]#
axis_names is a list like [‘Z’,’Y’,’X’] mapped to existing tag slots.
- highlight_digits(axis=None, cluster_idx=None)[source]#
Highlight the placeholder digits of the pattern at index cluster_idx
- Parameters:
cluster_idx (int) – The index in the string of the first digit to be highlighted
Returns
- string(values=None)[source]#
Convert a value to a string according to the tag specification.
Examples
>>> exp = Expression('file_<X,2>_<Y,3>.npy') >>> exp.string({'X':1, 'Y':10}) 'file_01_010.npy'
- Parameters:
values (dict) – A dictionary with values for the tags. Each key is the tag name.
Returns
- str
The string representation of the value.
- class PatternFinder(folder, tiff_list=None, df=None, axes_order=None)[source]#
Bases:
object
- get_tiles_list_from_sample_folder(src_dir: Path, min_file_number: int = 10, tile_extensions: List[str] = ['.ome.tif', '.ome.npy']) Dict[Path, List[Path]][source]#
- pattern_finders_from_base_dir(src_dir: str | Path, min_file_number: int = 10, tile_extension: List[str] = ['.ome.tif', '.ome.npy']) List[PatternFinder][source]#