A very simple method to test whether a stream contains valid DICOM
public static System.bool IsDICOM(
System.IO.Stream
)
public function IsDICOM(
: System.IO.Stream
): System.Boolean; static;
public static function IsDICOM(
: System.IO.Stream
) : System.boolean;
public: static System.bool IsDICOM(
System.IO.Stream*
)
public:
static System.bool IsDICOM(
System.IO.Stream^
)
'Declaration
Public Overloads Shared Function IsDICOM( _
ByVal As System.IO.Stream _
) As System.Boolean
'Usage
Dim stream As System.IO.Stream
Dim value As System.Boolean
value = DicomGlobal.IsDICOM(stream)
Parameters
- stream
-
The Stream which carries the data
Return Value
True if the byte 129 - 132 is DICM and the next 8 bytes contains the group 0 header data 02 00 00 00 55 4C 04
00
Target Platforms: .NET CLR 4.8 or higher