-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored (base) classes from init.py into separate files
- Loading branch information
1 parent
5a6aa6b
commit 812b462
Showing
24 changed files
with
1,087 additions
and
1,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2021 Division of Intelligent Medical Systems, DKFZ | ||
# SPDX-FileCopyrightText: 2021 Janek Groehl | ||
# SPDX-License-Identifier: MIT | ||
from abc import abstractmethod | ||
|
||
from simpa.core.device_digital_twins import DigitalDeviceTwinBase | ||
from simpa.log import Logger | ||
from simpa.utils import Settings | ||
from simpa.utils.processing_device import get_processing_device | ||
|
||
class PipelineModule: | ||
""" | ||
Defines a pipeline module (either simulation or processing module) that implements a run method and can be called by running the pipeline's simulate method. | ||
""" | ||
def __init__(self, global_settings: Settings): | ||
""" | ||
:param global_settings: The SIMPA settings dictionary | ||
:type global_settings: Settings | ||
""" | ||
self.logger = Logger() | ||
self.global_settings = global_settings | ||
self.torch_device = get_processing_device(self.global_settings) | ||
|
||
@abstractmethod | ||
def run(self, digital_device_twin: DigitalDeviceTwinBase): | ||
""" | ||
Executes the respective simulation module | ||
:param digital_device_twin: The digital twin that can be used by the digital device_twin. | ||
""" | ||
pass | ||
|
||
from .pipeline_module import PipelineModule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.