DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomGlobal Class / IsDICOM Method / IsDICOM(String) Method
The full file path
Example

In This Topic
    IsDICOM(String) Method
    In This Topic
    A very simple method to decide if a File is DICOM
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function IsDICOM( _
       ByVal Filename As System.String _
    ) As System.Boolean
    public static System.bool IsDICOM( 
       System.string Filename
    )

    Parameters

    Filename
    The full file path

    Return Value

    True if bytes 129 - 132 are "DICM" and the next 8 bytes contains the group 0 header data 02 00 00 00 55 4C 04 00
    Example
    string filename = "your_file"; // replace with the actual file path
    var isDicom = DicomGlobal.IsDICOM(filename);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also