Structured Report Received but Images Not Transferred from Philips Affiniti 50G #1007
Replies: 6 comments 1 reply
-
I have used following code but still not saved """ from pynetdicom import AE, debug_logger
from pynetdicom.sop_class import (
CTImageStorage,
MRImageStorage,
EnhancedMRImageStorage,
EnhancedCTImageStorage,
PositronEmissionTomographyImageStorage,
SecondaryCaptureImageStorage,
DigitalMammographyXRayImageStorageForPresentation,
XRayAngiographicImageStorage,
Verification
)
from pynetdicom._globals import ALL_TRANSFER_SYNTAXES
from pydicom.uid import UID
import os
# Enable debug logging
debug_logger()
# Set the output folder for received DICOM files
output_dir = r"D:\Sujyot Technologies\DIAGNOFLAME 24.0\DICOM FILES"
os.makedirs(output_dir, exist_ok=True)
# Initialize the Application Entity
ae = AE(ae_title="vivek")
# Standard SOP Classes supported
standard_sops = [
CTImageStorage,
MRImageStorage,
EnhancedMRImageStorage,
EnhancedCTImageStorage,
PositronEmissionTomographyImageStorage,
SecondaryCaptureImageStorage,
DigitalMammographyXRayImageStorageForPresentation,
XRayAngiographicImageStorage,
Verification
]
# Add standard SOP Class contexts
for sop in standard_sops:
ae.add_supported_context(sop, ALL_TRANSFER_SYNTAXES)
# Additional SOP Classes including retired, custom, and private UIDs
custom_sop_uids = {
"Ultrasound Image Storage (Retired)": "1.2.840.10008.5.1.4.1.1.6.1",
"Ultrasound Image Storage (Original Retired)": "1.2.840.10008.5.1.4.1.1.6",
"Ultrasound Multi-frame Image Storage (Retired)": "1.2.840.10008.5.1.4.1.1.3.1",
"Digital Mammography X-Ray Image Storage - For Processing": "1.2.840.10008.5.1.4.1.1.1.2",
"Comprehensive SR Storage": "1.2.840.10008.5.1.4.1.1.88.33",
"Storage Commitment Push Model": "1.2.840.10008.1.20.1",
"Multi-frame True Color Secondary Capture": "1.2.840.10008.5.1.4.1.1.7.4",
"Study Root Query/Retrieve - FIND": "1.2.840.10008.5.1.4.1.2.2.1",
"Study Root Query/Retrieve - MOVE": "1.2.840.10008.5.1.4.1.2.2.2",
"MR Spectroscopy Storage": "1.2.840.10008.5.1.4.1.1.4.2",
"Private SOP Class": "1.3.46.670589.2.5.1.1"
}
# Add support for additional SOP UIDs
for name, sop_uid in custom_sop_uids.items():
ae.add_supported_context(UID(sop_uid), ALL_TRANSFER_SYNTAXES)
# Event handlers (currently none, so files won't be saved yet)
handlers = []
# Start the DICOM SCP (Storage Server)
print("📡 DICOM SCP is running | Port: 11115 | AE Title: 'vivek'")
ae.start_server(
("0.0.0.0", 11115),
block=True,
evt_handlers=handlers,
ae_title="vivek"
) here are the logs
|
Beta Was this translation helpful? Give feedback.
-
D: Accepted SCP/SCU Role: Default |
Beta Was this translation helpful? Give feedback.
-
D: ========================== INCOMING DIMSE MESSAGE ========================== |
Beta Was this translation helpful? Give feedback.
-
Please don't post images with patient information in them |
Beta Was this translation helpful? Give feedback.
-
You can't just add random SOP class UIDs and expect things to work, please see this section in the user guide on registering unknown or private SOP classes (such as Also you don't have an event handler for |
Beta Was this translation helpful? Give feedback.
-
Is this right ?? from pynetdicom import AE, evt, debug_logger, register_uid
from pynetdicom.sop_class import Verification
from pynetdicom._globals import ALL_TRANSFER_SYNTAXES
from pynetdicom.service_class import StorageServiceClass
from pydicom.uid import UID
import os
# Enable debug logging for troubleshooting
debug_logger()
# Custom registration for retired SOP Class UID: Ultrasound Image Storage (Retired)
register_uid(
"1.2.840.10008.5.1.4.1.1.6", # Retired Ultrasound Image Storage UID
"RetiredUltrasoundImageStorage",
StorageServiceClass,
)
# Import the registered UID
from pynetdicom.sop_class import RetiredUltrasoundImageStorage
# Create output directory if it doesn't exist
output_dir = r"D:\Sujyot Technologies\DIAGNOFLAME 24.0\DICOM FILES"
os.makedirs(output_dir, exist_ok=True)
# Define handler to store received datasets
def handle_store(event):
try:
ds = event.dataset
ds.file_meta = event.file_meta
# Compose filename using SOPInstanceUID
sop_uid = ds.SOPInstanceUID
modality = getattr(ds, "Modality", "UNKNOWN")
filename = f"{modality}_{sop_uid}.dcm"
filepath = os.path.join(output_dir, filename)
ds.save_as(filepath, write_like_original=False)
print(f"✅ Stored DICOM file: {filepath}")
return 0x0000 # Success
except Exception as e:
print(f"❌ Error storing DICOM file: {e}")
return 0xC210 # Processing failure
# Initialize AE
ae = AE(ae_title="vivek")
# Add supported SOP Classes
ae.add_supported_context(Verification)
ae.add_supported_context(RetiredUltrasoundImageStorage, ALL_TRANSFER_SYNTAXES)
# Define handlers
handlers = [(evt.EVT_C_STORE, handle_store)]
# Start the DICOM server
print("📡 DICOM SCP started | Port: 11115 | AE Title: 'vivek'")
ae.start_server(("0.0.0.0", 11115), block=True, evt_handlers=handlers) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Summary:
We are using a sonography machine: Philips Medical Systems (Affiniti 50G, #498035070). Initially, we were successfully receiving images from the machine. However, recently, image transmission has suddenly stopped. Now, only structured reports (SRs) are being received, but no images are coming through.
We tried sending the images to another software system as well, but the same issue persists — the structured report is received, but the images are not.
We have tried several troubleshooting steps:
Verified and updated all DICOM settings
Re-added destination AE Titles
Installed and reinstalled Python 2 and Python 3 multiple times
Double-checked snvin configurations
Earlier, the images were received correctly. Now, the only structured reports are received and images are not.
I am attaching the structured report file but file type is not allowed here
Please check if there's anything wrong at the pynetdicom level or if you can help guide us toward a solution.
Logs are as follows
Beta Was this translation helpful? Give feedback.
All reactions