def revert_annotations_in_slide( gc, slide_id, verbose=0, monitorPrefix='', **kwargs): """Revert all annotations in a slide to a previous version. Parameters ---------- gc : girder_client.GirderClient authenticated girder client slide_id : str girder id of slide verbose : int level of verbosity monitorPrefix : str prefix to prepend to printed statements kwargs passed as-is to the revert_annotation Returns ------- list each entry is a dict of the server response. """ anniter = Annotation_iterator( gc=gc, slide_id=slide_id, callback=revert_annotation, callback_kwargs=kwargs, verbose=verbose, monitorPrefix=monitorPrefix) return anniter.apply_callback_to_all_annotations()
def update_styles_for_annotations_in_slide( gc, slide_id, verbose=0, monitorPrefix='', callback=None, **kwargs): """Update styles for all annotations in a slide. Parameters ---------- gc : girder_client.GirderClient authenticated girder client slide_id : str girder id of slide verbose : int level of verbosity monitorPrefix : str prefix to prepend to printed statements callback : function if None, defaults to update_styles_for_annotation. Passed as-is to histomicstk.workflows.workflow_runner.Annotation_iterator kwargs passed as-is to the update_styles_for_annotation Returns ------- list each entry is a dict of the server response. """ if callback is None: callback = update_styles_for_annotation anniter = Annotation_iterator( gc=gc, slide_id=slide_id, callback=callback, callback_kwargs=kwargs, verbose=verbose, monitorPrefix=monitorPrefix) return anniter.apply_callback_to_all_annotations()