DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImageCollection Class / Read Method / Read(IEnumerable<String>,ReadBehaviours) Method
A set of filenames as strings

The behaviours to be used when reading this stream

Example

In This Topic
    Read(IEnumerable<String>,ReadBehaviours) Method
    In This Topic
    Creates and adds DicomImage objects from a collection of external DICOM files
    Syntax
    'Declaration
     
    
    Public Overloads Sub Read( _
       ByVal FileNames As System.Collections.Generic.IEnumerable(Of String), _
       Optional ByVal ReadBehaviour As ReadBehaviours _
    ) 
    public void Read( 
       System.Collections.Generic.IEnumerable<string> FileNames,
       ReadBehaviours ReadBehaviour
    )

    Parameters

    FileNames
    A set of filenames as strings
    ReadBehaviour

    The behaviours to be used when reading this stream

    Example
    DicomImageCollection imageCollection = new DicomImageCollection();
     
    List<string> dicomFiles = new List<string>
    {
       "your_dicom_image1.dcm",
       "your_dicom_image2.dcm",
       "your_dicom_image3.dcm"
    };
                        
    // imageCollection: [image1, image2, image3] 
    imageCollection.Read(dicomFiles);  
                        
    // Or with read behaviours 
    imageCollection.Read(dicomFiles, new ReadBehaviours() { CloseFilesAfterReading = true });
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also