|
|
| config = Config() |
| |
|
| logger = logging.getLogger() |
| |
|
list | viewers = self.config.get('default', 'viewers').split(',') |
| |
|
str | viewers = "Windows": |
| |
This class handle viewers : updating path, checking availability and running it
◆ __init__()
| None StrokeSegLab.postprocessing.viewer.Viewer.__init__ |
( |
| self | ) |
|
Initialize the viewer class
- Setting up config, logger and viewers (List of viewers supported by the application)
- Check if the default viewer is available; if not, calling for an update.
◆ check_viewer()
| None StrokeSegLab.postprocessing.viewer.Viewer.check_viewer |
( |
| self, |
|
|
str | viewer ) |
Check if a viewer given is supported by the application and available on the path. If not raise an error based on the type of error. Only used in CLI mode, GUI users can simply select from a list of available viewers. If the viewer is available, set it as default one
Args:
viewer (str): name of the viewer
◆ run()
| None StrokeSegLab.postprocessing.viewer.Viewer.run |
( |
| self, |
|
|
str | img_path, |
|
|
str | seg_path ) |
Open the base image and the generated segmentation in the default viewer. If an error occurs, call for an update of the viewers paths
Args:
img_path (str): Base image path (input)
seg_path (str): Binary mask path (output)
◆ update_path()
| None StrokeSegLab.postprocessing.viewer.Viewer.update_path |
( |
| self | ) |
|
Update all the path for the viewers supported by the application. Set a viewer available on the path as the default one
The documentation for this class was generated from the following file:
- /home/ymahe/Desktop/StrokeSeg/StrokeSegLab/postprocessing/viewer.py