-
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.
Merge pull request #360 from IMSY-DKFZ/T359_BaseClasses
Refactored (base) classes from init.py into separate files
- Loading branch information
Showing
78 changed files
with
1,014 additions
and
965 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
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,33 +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_element_base import PipelineElementBase |
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.