This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

dicomCollection

Gather details about related series of DICOM files

Syntax

collection = dicomCollection(directory)
collection = dicomCollection(directory,'IncludeSubfolders',TF)
collection = dicomCollection(DICOMDIR)

Description

example

collection = dicomCollection(directory) gathers details about the DICOM files contained in directory and returns them in the table collection. The dicomCollection function aggregates details by DICOM series, using the value of the SeriesInstanceUID metadata field in each file to determine series membership. A DICOM series is a logically related set of images from an imaging operation.

collection = dicomCollection(directory,'IncludeSubfolders',TF) recursively searches for DICOM files below directory when TF is true (the default). When TF is false, dicomCollection only within directory.

example

collection = dicomCollection(DICOMDIR) gathers details about the DICOM files referenced in the DICOM directory file DICOMDIR.

Examples

collapse all

Gather information about the DICOM files in the Image Processing Toolbox sample image folder.

details = dicomCollection(fullfile(matlabroot,'toolbox/images/imdata'))
details=5×14 table
             StudyDateTime            SeriesDateTime          PatientName      PatientSex    Modality    Rows    Columns    Channels    Frames    StudyDescription    SeriesDescription                             StudyInstanceUID                                                     SeriesInstanceUID                                                                     Filenames                                        
          ____________________    ______________________    _______________    __________    ________    ____    _______    ________    ______    ________________    _________________    __________________________________________________________________    __________________________________________________________________    _________________________________________________________________________________________

    s1    30-Apr-1993 11:27:24    [30-Apr-1993 11:27:24]    "Anonymized"          ""           "CT"      512       512         1           1      "RT ANKLE"          ""                   "1.2.840.113619.2.1.1.322987881.621.736170080.681"                    "1.2.840.113619.2.1.2411.1031152382.365.736169244"                    ["/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/CT-MONO2-16-ankle.dcm"]
    s2    14-Dec-2013 15:47:31    [14-Dec-2013 15:54:33]    "GORBERG MITZI"       "F"          "MR"      512       512         1          22      "CSP"               "AX T2"              "1.2.840.113619.2.244.3596.11880862.13689.1386517653.214"             "1.2.840.113619.2.244.3596.11880862.13689.1386517653.217"             [22x1 string                                                                            ]
    s3    03-Oct-2011 19:18:11    [03-Oct-2011 18:59:02]    ""                    "M"          "MR"      512       512         1           1      "RIGHT KNEE"        ""                   "1.3.6.1.4.1.9590.100.1.2.320418845013189618318250681693358291211"    "1.3.6.1.4.1.9590.100.1.2.287740981712351622214874344032214809569"    ["/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/knee1.dcm"            ]
    s4    03-Oct-2011 19:18:11    [03-Oct-2011 19:05:04]    ""                    "M"          "MR"      512       512         1           1      "RIGHT KNEE"        ""                   "1.3.6.1.4.1.9590.100.1.2.320498134711034521212730362051554545799"    "1.3.6.1.4.1.9590.100.1.2.316302984111738034326701385064023497963"    ["/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/knee2.dcm"            ]
    s5    30-Jan-1994 11:25:01    []                        "Anonymized"          ""           "US"      430       600         1          10      "Echocardiogram"    "PS LAX MR & AI"     "999.999.3859744"                                                     "999.999.94827453"                                                    ["/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/US-PAL-8-10x-echo.dcm"]

Gather information about DICOM files in a folder from a DICOMDIR file.

details = dicomCollection(fullfile(matlabroot,'toolbox/images/imdata/DICOMDIR'))
details=4×14 table
             StudyDateTime        SeriesDateTime    PatientName     PatientSex    Modality    Rows    Columns    Channels    Frames    StudyDescription    SeriesDescription    StudyInstanceUID                            SeriesInstanceUID                                                                    Filenames                                       
          ____________________    ______________    ____________    __________    ________    ____    _______    ________    ______    ________________    _________________    ________________    __________________________________________________________________    _______________________________________________________________________________________

    s1    30-Apr-1993 11:27:24          ''          "Anonymized"        ""          "CT"      512       512         1           1      "RT ANKLE"                 ""                   ""           "1.2.840.113619.2.1.2411.1031152382.365.736169244"                    "/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/CT-MONO2-16-ankle.dcm"
    s2    30-Jan-1994 11:25:01          ''          "Anonymized"        ""          "US"      430       600         1          10      "Echocardiogram"           ""                   ""           "999.999.94827453"                                                    "/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/US-PAL-8-10x-echo.dcm"
    s3    03-Oct-2011 19:18:11          ''          ""                  ""          "MR"      512       512         1           1      "RIGHT KNEE"               ""                   ""           "1.3.6.1.4.1.9590.100.1.2.287740981712351622214874344032214809569"    "/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/knee1.dcm"            
    s4    03-Oct-2011 19:18:11          ''          ""                  ""          "MR"      512       512         1           1      "RIGHT KNEE"               ""                   ""           "1.3.6.1.4.1.9590.100.1.2.316302984111738034326701385064023497963"    "/mathworks/devel/bat/Bdoc18b/build/matlab/toolbox/images/imdata/knee2.dcm"            

Input Arguments

collapse all

Name of a folder containing DICOM files, specified as a string scalar or character vector.

Example: details = dicomCollection(fullfile(matlabroot,'toolbox/images/imdata'))

Data Types: char | string

DICOM directory file, specified as a string scalar or character vector.

A DICOM directory file (DICOMDIR) is a special DICOM file that serves as a directory to a collection of DICOM files stored on removable media, such as CD/DVD ROMs. When devices write DICOM files to removable media, they typically write a DICOMDIR file on the disk to serve as a list of the disk contents.

Example: details = dicomCollection(fullfile(matlabroot,'toolbox/images/imdata/DICOMDIR'))

Data Types: char | string

Output Arguments

collapse all

Metadata from DICOM files, returned as a table. The dicomCollection function aggregates the information by DICOM series.

Introduced in R2017b