neuralib.imaging.widefield.align.NapariAlignmentOptions
- class neuralib.imaging.widefield.align.NapariAlignmentOptions[source]
Bases:
AbstractParser- __init__()
Methods
__init__()main([args, exit_on_error])parsing the commandline input args and set the argument attributes, then call
run().new_parser(**kwargs)create an
argparse.ArgumentParser.called when all argument attributes are set but before
run().run()called when all argument attributes are set
Attributes
parser description.
parser epilog.
parser usage.
alignment map with color
dorsal map file, If None then use default
reference image (e.g., bright-field)
file path for the video sequence
- DESCRIPTION: str = 'View the video sequences and top view of dorsal cortex using napari'
parser description.
- sequence_path: str
file path for the video sequence
- reference_path: str | None
reference image (e.g., bright-field)
- dorsal_map_path: str | None
dorsal map file, If None then use default
- color: bool
alignment map with color
- EPILOG: str = None
parser epilog. Could be override as a method if its content is dynamic-generated.
- USAGE: str = None
parser usage.
- static __new__(cls, *args, **kwargs)
- main(args=None, *, exit_on_error=True)
parsing the commandline input args and set the argument attributes, then call
run().Example
if overwrite with the argument default, use args
>>> AbstractParser().main((['--source=allen_mouse_25um', '--region=VISal,VISam,...'], []))
- Parameters:
args (list[str] | tuple[list[str]] | None) – commandline arguments, or a tuple of (prepend, append) arguments
exit_on_error (bool) – exit when commandline parsed fail. Otherwise, raise a
RuntimeError.
- classmethod new_parser(**kwargs)
create an
argparse.ArgumentParser.class variable:
USAGE,DESCRIPTIONandEPILOGare used when creation.>>> class A(AbstractParser): ... @classmethod ... def new_parser(cls, **kwargs) -> argparse.ArgumentParser: ... return super().new_parser(**kwargs)
- Parameters:
kwargs – keyword parameters to ArgumentParser
- Returns:
an ArgumentParser.
- Return type:
ArgumentParser