storescp

$ python -m pynetdicom storescp [options] port

Description

The storescp application implements a Service Class Provider (SCP) for the Storage service class. It listens for incoming association requests on the specified port, and once an association is established, allows Storage SCUs to transfer SOP Instances.

The source code for the application can be found here

Usage

The following example shows what happens when it is started and receives a C-STORE request from a peer:

$ python -m pynetdicom storescp 11112

More information is available when a connection is received while running with the -v option:

$ python -m pynetdicom storescp 11112 -v
I: Accepting Association
I: Received Store Request
I: Storing DICOM file: CT.1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322
I: Association Released

Much more information is available when a connection is received while running with the -d option:

$ python -m pynetdicom storescp 11112 -d
D: storescp.py v0.6.0
D:
D: Request Parameters:
D: ======================= INCOMING A-ASSOCIATE-RQ PDU ========================
...
D: ========================== END A-ASSOCIATE-AC PDU ==========================
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
I: Received Store Request
D: ========================== INCOMING DIMSE MESSAGE ==========================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 1
D: Affected SOP Class UID        : CT Image Storage
D: Affected SOP Instance UID     : 1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322
D: Data Set                      : Present
D: Priority                      : Low
D: ============================ END DIMSE MESSAGE =============================
D: pydicom.read_dataset() TransferSyntax="Little Endian Explicit"
I: Storing DICOM file: CT.1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322
I: Association Released

Options

General Options

-q    --quiet

quiet mode, prints no warnings or errors

-v    --verbose

verbose mode, prints processing details

-d    --debug

debug mode, prints debugging information

-ll   --log-level [l]evel (str)

One of ['critical', 'error', 'warning', 'info', 'debug'], prints logging messages with corresponding level or lower

Network Options

-aet  --ae-title [a]etitle (str)

set the local AE title (default: STORESCP)

-ta   --acse-timeout [s]econds (float)

timeout for ACSE messages (default: 30)

-td   --dimse-timeout [s]econds (float)

timeout for DIMSE messages (default: 30)

-tn   --network-timeout [s]econds (float)

timeout for the network (default: 30)

-pdu  --max-pdu [n]umber of bytes (int)

set maximum receive PDU bytes to n bytes (default: 16382)

Preferred Transfer Syntaxes

-x=   --prefer-uncompr

prefer explicit VR local byte order

-xe   --prefer-little

prefer explicit VR little endian transfer syntax

-xb   --prefer-big

prefer explicit VR big endian transfer syntax

-xi   --implicit

accept implicit VR little endian transfer syntax only

Output

-od [d]irectory, --output-directory [d]irectory (str)

write received objects to directory d

--ignore

receive data but don’t store it

Miscellaneous

--no-echo

don’t act as a verification SCP

DICOM Conformance

The storescp application supports the Verification (unless --no-echo is used) and Storage service classes as an SCP. The following SOP classes are supported:

Verification Service

SOP Classes

UID

SOP Class

1.2.840.10008.1.1

Verification SOP Class

Transfer Syntaxes

UID

Transfer Syntax

1.2.840.10008.1.2

Implicit VR Little Endian

1.2.840.10008.1.2.1

Explicit VR Little Endian

1.2.840.10008.1.2.1.99

Deflated Explicit VR Little Endian

1.2.840.10008.1.2.2

Explicit VR Big Endian

Storage Service

SOP Classes

UID

SOP Class

1.2.840.10008.5.1.4.1.1.1

Computed Radiography Image Storage

1.2.840.10008.5.1.4.1.1.1.1

Digital X-Ray Image Storage - For Presentation

1.2.840.10008.5.1.4.1.1.1.1.1.1

Digital X-Ray Image Storage - For Processing

1.2.840.10008.5.1.4.1.1.1.2

Digital Mammography X-Ray Image Storage - For Presentation

1.2.840.10008.5.1.4.1.1.1.2.1

Digital Mammography X-Ray Image Storage - For Processing

1.2.840.10008.5.1.4.1.1.1.3

Digital Intra-Oral X-Ray Image Storage - For Presentation

1.2.840.10008.5.1.1.4.1.1.3.1

Digital Intra-Oral X-Ray Image Storage - For Processing

1.2.840.10008.5.1.4.1.1.2

CT Image Storage

1.2.840.10008.5.1.4.1.1.2.1

Enhanced CT Image Storage

1.2.840.10008.5.1.4.1.1.2.2

Legacy Converted Enhanced CT Image Storage

1.2.840.10008.5.1.4.1.1.3.1

Ultrasound Multi-frame Image Storage

1.2.840.10008.5.1.4.1.1.4

MR Image Storage

1.2.840.10008.5.1.4.1.1.4.1

Enhanced MR Image Storage

1.2.840.10008.5.1.4.1.1.4.2

MR Spectroscopy Storage

1.2.840.10008.5.1.4.1.1.4.3

Enhanced MR Color Image Storage

1.2.840.10008.5.1.4.1.1.4.4

Legacy Converted Enhanced MR Image Storage

1.2.840.10008.5.1.4.1.1.6.1

Ultrasound Image Storage

1.2.840.10008.5.1.4.1.1.6.2

Enhanced US Volume Storage

1.2.840.10008.5.1.4.1.1.7

Secondary Capture Image Storage

1.2.840.10008.5.1.4.1.1.7.1

Multi-frame Single Bit Secondary Capture Image Storage

1.2.840.10008.5.1.4.1.1.7.2

Multi-frame Grayscale Byte Secondary Capture Image Storage

1.2.840.10008.5.1.4.1.1.7.3

Multi-frame Grayscale Word Secondary Capture Image Storage

1.2.840.10008.5.1.4.1.1.7.4

Multi-frame True Color Secondary Capture Image Storage

1.2.840.10008.5.1.4.1.1.9.1.1

12-lead ECG Waveform Storage

1.2.840.10008.5.1.4.1.1.9.1.2

General ECG Waveform Storage

1.2.840.10008.5.1.4.1.1.9.1.3

Ambulatory ECG Waveform Storage

1.2.840.10008.5.1.4.1.1.9.2.1

Hemodynamic Waveform Storage

1.2.840.10008.5.1.4.1.1.9.3.1

Cardiac Electrophysiology Waveform Storage

1.2.840.10008.5.1.4.1.1.9.4.1

Basic Voice Audio Waveform Storage

1.2.840.10008.5.1.4.1.1.9.4.2

General Audio Waveform Storage

1.2.840.10008.5.1.4.1.1.9.5.1

Arterial Pulse Waveform Storage

1.2.840.10008.5.1.4.1.1.9.6.1

Respiratory Waveform Storage

1.2.840.10008.5.1.4.1.1.9.6.2

Multichannel Respiratory Waveform Storage

1.2.840.10008.5.1.4.1.1.9.7.1

Routine Scalp SleepElectroencephalogram Waveform Storage

1.2.840.10008.5.1.4.1.1.9.7.2

Electromyogram Waveform Storage

1.2.840.10008.5.1.4.1.1.9.7.3

Electrooculogram Waveform Storage

1.2.840.10008.5.1.4.1.1.9.7.4

Sleep Electroencephalogram Waveform Storage

1.2.840.10008.5.1.4.1.1.9.8.1

Body Position Waveform Storage

1.2.840.10008.5.1.4.1.1.11.1

Grayscale Softcopy Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.2

Color Softcopy Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.3

Pseudo-Color Softcopy Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.4

Blending Softcopy Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.5

XA/XRF Grayscale Softcopy Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.6

Grayscale Planar MPR Volumetric Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.7

Compositing Planar MPR Volumetric Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.8

Advanced Blending Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.9

Volume Rendering Volumetric Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.10

Segmented Volume Rendering Volumetric Presentation State Storage

1.2.840.10008.5.1.4.1.1.11.11

Multiple Volume Rendering Volumetric Presentation State Storage

1.2.840.10008.5.1.4.1.1.12.1

X-Ray Angiographic Image Storage

1.2.840.10008.5.1.4.1.1.12.1.1

Enhanced XA Image Storage

1.2.840.10008.5.1.4.1.1.12.2

X-Ray Radiofluoroscopic Image Storage

1.2.840.10008.5.1.4.1.1.12.2.1

Enhanced XRF Image Storage

1.2.840.10008.5.1.4.1.1.13.1.1

X-Ray 3D Angiographic Image Storage

1.2.840.10008.5.1.4.1.1.13.1.2

X-Ray 3D Craniofacial Image Storage

1.2.840.10008.5.1.4.1.1.13.1.3

Breast Tomosynthesis Image Storage

1.2.840.10008.5.1.4.1.1.13.1.4

Breast Projection X-Ray Image Storage - For Presentation

1.2.840.10008.5.1.4.1.1.13.1.5

Breast Projection X-Ray Image Storage - For Processing

1.2.840.10008.5.1.4.1.1.14.1

Intravascular Optical Coherence Tomography Image Storage - For Presentation

1.2.840.10008.5.1.4.1.1.14.2

Intravascular Optical Coherence Tomography Image Storage - For Processing

1.2.840.10008.5.1.4.1.1.20

Nuclear Medicine Image Storage

1.2.840.10008.5.1.4.1.1.30

Parametric Map Storage

1.2.840.10008.5.1.4.1.1.66

Raw Data Storage

1.2.840.10008.5.1.4.1.1.66.1

Spatial Registration Storage

1.2.840.10008.5.1.4.1.1.66.2

Spatial Fiducials Storage

1.2.840.10008.5.1.4.1.1.66.3

Deformable Spatial Registration Storage

1.2.840.10008.5.1.4.1.1.66.4

Segmentation Storage

1.2.840.10008.5.1.4.1.1.66.5

Surface Segmentation Storage

1.2.840.10008.5.1.4.1.1.66.6

Tractography Results Storage

1.2.840.10008.5.1.4.1.1.67

Real World Value Mapping Storage

1.2.840.10008.5.1.4.1.1.68.1

Surface Scan Mesh Storage

1.2.840.10008.5.1.4.1.1.68.2

Surface Scan Point Cloud Storage

1.2.840.10008.5.1.4.1.1.77.1.1

VL Endoscopic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.1.1

Video Endoscopic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.2

VL Microscopic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.2.1

Video Microscopic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.3

VL Slide-Coordinates Microscopic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.4

VL Photographic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.4.1

Video Photographic Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.1

Ophthalmic Photography 8 Bit Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.2

Ophthalmic Photography 16 Bit Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.3

Stereometric Relationship Storage

1.2.840.10008.5.1.4.1.1.77.1.5.4

Ophthalmic Tomography Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.5

Wide Field Ophthalmic Photography Stereographic Projection Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.6

Wide Field Ophthalmic Photography 3D Coordinates Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.7

Ophthalmic Optical Coherence Tomography En Face Image Storage

1.2.840.10008.5.1.4.1.1.77.1.5.8

Ophthalmic Optical Coherence Tomography B-scan Volume Analysis Storage

1.2.840.10008.5.1.4.1.1.77.1.6

VL Whole Slide Microscopy Image Storage

1.2.840.10008.5.1.4.1.1.77.1.7

Dermoscopic Photography Image Storage

1.2.840.10008.5.1.4.1.1.78.1

Lensometry Measurements Storage

1.2.840.10008.5.1.4.1.1.78.2

Autorefraction Measurements Storage

1.2.840.10008.5.1.4.1.1.78.3

Keratometry Measurements Storage

1.2.840.10008.5.1.4.1.1.78.4

Subjective Refraction Measurements Storage

1.2.840.10008.5.1.4.1.1.78.5

Visual Acuity Measurements Storage

1.2.840.10008.5.1.4.1.1.78.6

Spectacle Prescription Report Storage

1.2.840.10008.5.1.4.1.1.78.7

Ophthalmic Axial Measurements Storage

1.2.840.10008.5.1.4.1.1.78.8

Intraocular Lens Calculations Storage

1.2.840.10008.5.1.4.1.1.79.1

Macular Grid Thickness and Volume Report Storage

1.2.840.10008.5.1.4.1.1.80.1

Ophthalmic Visual Field Static Perimetry Measurements Storage

1.2.840.10008.5.1.4.1.1.81.1

Ophthalmic Thickness Map Storage

1.2.840.10008.5.1.4.1.1.82.1

Corneal Topography Map Storage

1.2.840.10008.5.1.4.1.1.88.11

Basic Text SR Storage

1.2.840.10008.5.1.4.1.1.88.22

Enhanced SR Storage

1.2.840.10008.5.1.4.1.1.88.33

Comprehensive SR Storage

1.2.840.10008.5.1.4.1.1.88.34

Comprehensive 3D SR Storage

1.2.840.10008.5.1.4.1.1.88.35

Extensible SR Storage

1.2.840.10008.5.1.4.1.1.88.40

Procedure Log Storage

1.2.840.10008.5.1.4.1.1.88.50

Mammography CAD SR Storage

1.2.840.10008.5.1.4.1.1.88.59

Key Object Selection Document Storage

1.2.840.10008.5.1.4.1.1.88.65

Chest CAD SR Storage

1.2.840.10008.5.1.4.1.1.88.67

X-Ray Radiation Dose SR Storage

1.2.840.10008.5.1.4.1.1.88.68

Radiopharmaceutical Radiation Dose SR Storage

1.2.840.10008.5.1.4.1.1.88.69

Colon CAD SR Storage

1.2.840.10008.5.1.4.1.1.88.70

Implantation Plan SR Storage

1.2.840.10008.5.1.4.1.1.88.71

Acquisition Context SR Storage

1.2.840.10008.5.1.4.1.1.88.72

Simplified Adult Echo SR Storage

1.2.840.10008.5.1.4.1.1.88.73

Patient Radiation Dose SR Storage

1.2.840.10008.5.1.4.1.1.88.74

Planned Imaging Agent Administration SR Storage

1.2.840.10008.5.1.4.1.1.88.75

Performed Imaging Agent Administration SR Storage

1.2.840.10008.5.1.4.1.1.88.76

Enhanced X-Ray Radiation Dose SR Storage

1.2.840.10008.5.1.4.1.1.90.1

Content Assessment Results Storage

1.2.840.10008.5.1.4.1.1.91.1

Microscopy Bulk Simple Annotations Storage

1.2.840.10008.5.1.4.1.1.104.1

Encapsulated PDF Storage

1.2.840.10008.5.1.4.1.1.104.2

Encapsulated CDA Storage

1.2.840.10008.5.1.4.1.1.104.3

Encapsulated STL Storage

1.2.840.10008.5.1.4.1.1.104.4

Encapsulated OBJ Storage

1.2.840.10008.5.1.4.1.1.104.5

Encapsulated MTL Storage

1.2.840.10008.5.1.4.1.1.128

Positron Emission Tomography Image Storage

1.2.840.10008.5.1.4.1.1.128.1

Legacy Converted Enhanced PET Image Storage

1.2.840.10008.5.1.4.1.1.130

Enhanced PET Image Storage

1.2.840.10008.5.1.4.1.1.131

Basic Structured Display Storage

1.2.840.10008.5.1.4.1.1.200.2

CT Performed Procedure Protocol Storage

1.2.840.10008.5.1.4.1.1.200.8

XA Performed Procedure Protocol Storage

1.2.840.10008.5.1.4.1.1.481.1

RT Image Storage

1.2.840.10008.5.1.4.1.1.481.2

RT Dose Storage

1.2.840.10008.5.1.4.1.1.481.3

RT Structure Set Storage

1.2.840.10008.5.1.4.1.1.481.4

RT Beams Treatment Record Storage

1.2.840.10008.5.1.4.1.1.481.5

RT Plan Storage

1.2.840.10008.5.1.4.1.1.481.6

RT Brachy Treatment Record Storage

1.2.840.10008.5.1.4.1.1.481.7

RT Treatment Summary Record Storage

1.2.840.10008.5.1.4.1.1.481.8

RT Ion Plan Storage

1.2.840.10008.5.1.4.1.1.481.9

RT Ion Beams Treatment Record Storage

1.2.840.10008.5.1.4.1.1.481.10

RT Physician Intent Storage

1.2.840.10008.5.1.4.1.1.481.11

RT Segmentation Annotation Storage

1.2.840.10008.5.1.4.1.1.481.12

RT Radiation Set Storage

1.2.840.10008.5.1.4.1.1.481.13

C-Arm Photon-Electron Radiation Storage

1.2.840.10008.5.1.4.1.1.481.14

Tomotherapeutic Radiation Storage

1.2.840.10008.5.1.4.1.1.481.15

Robotic Arm Radiation Storage

1.2.840.10008.5.1.4.1.1.481.16

RT Radiation Record Set Storage

1.2.840.10008.5.1.4.1.1.481.17

RT Radiation Salvage Record Storage

1.2.840.10008.5.1.4.1.1.481.18

Tomotherapeutic Radiation Record Storage

1.2.840.10008.5.1.4.1.1.481.19

C-Arm Photon-Electron Radiation Record Storage

1.2.840.10008.5.1.4.1.1.481.20

Robotic Arm Radiation Record Storage

1.2.840.10008.5.1.4.1.1.481.21

RT Radiation Set Delivery Instruction Storage

1.2.840.10008.5.1.4.1.1.481.22

RT Treatment Preparation Storage

1.2.840.10008.5.1.4.34.7

RT Beams Delivery Instruction Storage

1.2.840.10008.5.1.4.34.10

RT Brachy Application Setup Delivery Instructions Storage

Transfer Syntaxes

UID

Transfer Syntax

1.2.840.10008.1.2

Implicit VR Little Endian

1.2.840.10008.1.2.1

Explicit VR Little Endian

1.2.840.10008.1.2.1.99

Deflated Explicit VR Little Endian

1.2.840.10008.1.2.2

Explicit VR Big Endian

1.2.840.10008.1.2.4.50

JPEG Baseline (Process 1)

1.2.840.10008.1.2.4.51

JPEG Extended (Process 2 and 4)

1.2.840.10008.1.2.4.57

JPEG Lossless, Non-Hierarchical (Process 14)

1.2.840.10008.1.2.4.70

JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])

1.2.840.10008.1.2.4.80

JPEG-LS Lossless Image Compression

1.2.840.10008.1.2.4.81

JPEG-LS Lossy (Near-Lossless) Image Compression

1.2.840.10008.1.2.4.90

JPEG 2000 Image Compression (Lossless Only)

1.2.840.10008.1.2.4.91

JPEG 2000 Image Compression

1.2.840.10008.1.2.4.92

JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)

1.2.840.10008.1.2.4.93

JPEG 2000 Part 2 Multi-component Image Compression

1.2.840.10008.1.2.5

RLE Lossless