magmap.io.naming module¶
- magmap.io.naming.get_roi_path(path, offset, roi_size=None)[source]¶
Get a string describing an ROI for an image at a given path.
- Parameters:
- Returns:
String with
pathwithout extension followed immediately byoffsetandroi_sizeas tuples, with all spaces removed.- Return type:
- magmap.io.naming.make_subimage_name(base, offset=None, shape=None, suffix=None)[source]¶
Make name of subimage for a given offset and shape.
The order of
offsetandshapeare assumed to be inz, y, xbut will be reversed for the output name since the user-oriented ordering isx, y, z.- Parameters:
base (
str) – Start of name, which can include full parent path.offset (
Optional[Tuple[int,int,int]], default:None) – Offset as a tuple; defaults to None to ignore sub-image.shape (
Optional[Tuple[int,int,int]], default:None) – Shape as a tuple; defaults to None to ignore sub-image.suffix (
Optional[str], default:None) – Suffix to append, replacing any existing extension inbase; defaults to None.
- Return type:
- Returns:
Name (or path) to subimage.