Skip to content

Commit

Permalink
Merge pull request #88 from dwikler/refact-storescp
Browse files Browse the repository at this point in the history
Refact storescp
  • Loading branch information
sjswerdloff authored Jan 1, 2025
2 parents d46e645 + 6d179bd commit 7bfc10c
Show file tree
Hide file tree
Showing 24 changed files with 1,590 additions and 241 deletions.
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ all = [
]


[tool.poetry.group.dev.dependencies]
parameterized = "^0.9.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
142 changes: 0 additions & 142 deletions tdwii_plus_examples/TDWII_PPVS_subscriber/cstore_handler.py

This file was deleted.

14 changes: 7 additions & 7 deletions tdwii_plus_examples/TDWII_PPVS_subscriber/ppvsscp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from tdwii_plus_examples import tdwii_config
from tdwii_plus_examples.basescp import BaseSCP
from tdwii_plus_examples.TDWII_PPVS_subscriber.nevent_receiver import NEventReceiver
from tdwii_plus_examples.TDWII_PPVS_subscriber.storescp import StoreSCP
from tdwii_plus_examples.cstorescp import CStoreSCP


class PPVS_SCP(NEventReceiver, StoreSCP):
class PPVS_SCP(NEventReceiver, CStoreSCP):
def __init__(
self,
ae_title: str = "PPVS_SCP",
Expand All @@ -27,15 +27,15 @@ def __init__(
if port < 1:
port = tdwii_config.known_ae_port[ae_title]
self.nevent_callback = nevent_callback
StoreSCP.__init__(
CStoreSCP.__init__(
self,
ae_title=ae_title,
port=port,
logger=logger,
bind_address=bind_address,
sop_classes=None, # use first 128 SOP Classes
transfer_syntaxes=None, # use pynetdicom defaults xfer syntaxes
custom_handler=custom_cstore_handler,
storage_presentation_contexts=storage_presentation_contexts,
transfer_syntaxes=transfer_syntaxes,
store_directory=store_directory,
)
NEventReceiver.__init__(
Expand All @@ -48,11 +48,11 @@ def __init__(
)

def _add_contexts(self):
StoreSCP._add_contexts(self)
CStoreSCP._add_contexts(self)
NEventReceiver._add_contexts(self)

def _add_handlers(self):
StoreSCP._add_handlers(self)
CStoreSCP._add_handlers(self)
NEventReceiver._add_handlers(self)

def run(self):
Expand Down
53 changes: 0 additions & 53 deletions tdwii_plus_examples/TDWII_PPVS_subscriber/storescp.py

This file was deleted.

12 changes: 6 additions & 6 deletions tdwii_plus_examples/basehandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ def handle_open(event, logger):
Parameters
----------
event : events.Event
The corresponding event.
logger : logging.Logger
event : pynetdicom.event.event
The event corresponding to the opening of a TCP connection.
app_logger : logging.Logger
The application's logger.
Returns
Expand All @@ -26,9 +26,9 @@ def handle_close(event, logger):
Parameters
----------
event : events.Event
The corresponding event.
logger : logging.Logger
event : pynetdicom.event.event
The event corresponding to the closing of a TCP connection.
app_logger : logging.Logger
The application's logger.
Returns
Expand Down
Loading

0 comments on commit 7bfc10c

Please sign in to comment.