Dicom Toolkit - dicomCollection


: collection = dicomCollection(directory)
: collection = dicomCOLLECTION(DICOMDIR, attribute)
: collection = dicomCOLLECTION(_, propertyname, propertyvalue …)

Read a directory or DICOMDIR file and return a table or struct of the referenced files.

Inputs

directory - directory to read.

DICOMDIR - dicom DICOMDIR file to read.

propertyname, propertyvalue - Optional property name/value pairs.

Known properties:

IncludeSubFolders

Boolean if set to true will also look in sub-folders when looking for dicom files

DisplayWaitbar

Boolean currently ignored in Octave

Outputs

collection - a table with fields Location and Value for each matched attribute.

collection will be a struct array or a table if a struct2table function exists, with fields of:

Filenames
StudyDateTime
SeriesDateTime
PatientName
PatientSex
Modality
Rows
Columns
Channels
Frames
StudyDescription
SeriesDescription
StudyInstanceUID
SeriesInstanceUID

Examples

 [dirname, ~] = fileparts(file_in_loadpath("imdata/rtstruct.dcm"));

 collection = dicomCollection(dirname);