Main Content

dicomstore

Store DICOM files to PACS server

Since R2024b

Description

dicomstore(dConn,file) stores the DICOM file or files indicated by the path file to the PACS server indicated by the dicomConnection object dConn.

example

dicomstore(dConn,file,Name=Value) specifies additional options for storing the DICOM file or files using one or more name-value arguments.

Examples

collapse all

Before running this example, you must get access from the administrator of the PACS server with which you intend to connect. Alternatively, you may consider setting up a local PACS server on your machine, as demonstrated in Working with PACS Server for DICOM Image Retrieval.

Establish a secure TLS connection with the PACS server using the key and certificate of your client system and the trusted certificate of the server. Display the response message of the DICOM connection.

dConn = dicomConnection("localhost",4242,"key.pem","certificate.pem","trusted-certificate.pem");
disp(dConn.ResponseMessage)
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending Echo Request (MsgID 1)
I: Received Echo Response (Success)
I: Releasing Association

Store an MRI volume to the PACS server.

dicomstore(dConn,"dog")

Input Arguments

collapse all

PACS server connection object, specified as a dicomConnection object.

DICOM file or files to store to the PACS server, specified as a string scalar or character vector. If storing a single DICOM file, you must specify file as the full path of the DICOM file. If storing a collection of multiple DICOM files, specify file as the full path to the folder containing the DICOM files or the full path to the corresponding DICOMDIR file.

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: dicomstore(dConn,file,TransferSyntax="1.2.840.10008.1.2.2") uses the Explicit VR Big Endian transfer syntax when storing the DICOM file.

Transfer syntax in which to transcode the stored DICOM file or files, specified as a character vector or string scalar. You must specify one of the values from this table. If you specify TransferSyntax, you must not specify CompressionMode.

Transfer Syntax CodeTransfer Syntax Name
"1.2.840.10008.1.2.1"Explicit VR Little Endian
"1.2.840.10008.1.2.2"Explicit VR Big Endian
"1.2.840.10008.1.2"Implicit VR Endian
"1.2.840.10008.1.2.1.99"Deflated Explicit VR Little Endian
"1.2.840.10008.1.2.4.70"JPEG Lossless, Non-hierarchical, First- order Prediction
"1.2.840.10008.1.2.4.50"JPEG Baseline, Lossy JPEG 8-bit Image Compression
"1.2.840.10008.1.2.4.51"JPEG Baseline, Lossy JPEG 12-bit Image Compression
"1.2.840.10008.1.2.4.80"JPEG-LS Lossless Image Compression
"1.2.840.10008.1.2.4.81"JPEG-LS Lossy Image Compression
"1.2.840.10008.1.2.4.90"JPEG 2000 Image Lossless
"1.2.840.10008.1.2.4.91"JPEG 2000 Image Lossy
"1.2.840.10008.1.2.5"RLE Lossless

Data Types: char | string

Compression mode for the stored DICOM file or files, specified as one of these values.

  • "JPEG lossless"

  • "JPEG lossy"

  • "JPEG2000 lossless"

  • "JPEG2000 lossy"

  • "JPEG-LS lossless"

  • "JPEG-LS lossy"

  • "RLE"

If you specify CompressionMode, you must not specify TransferSyntax.

Data Types: char | string

Version History

Introduced in R2024b