DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSet Class / WriteJson Method
The Stream to write to
Option to control how DICOM data is converted and whether conversion error is thrown or ignored
Example

In This Topic
    WriteJson Method (DicomDataSet)
    In This Topic
    Write the DICOM data into an Json Stream
    Syntax
    'Declaration
     
    
    Public Sub WriteJson( _
       ByVal Stream As System.IO.Stream, _
       Optional ByVal Options As ParseOptions _
    ) 
    public void WriteJson( 
       System.IO.Stream Stream,
       ParseOptions Options
    )

    Parameters

    Stream
    The Stream to write to
    Options
    Option to control how DICOM data is converted and whether conversion error is thrown or ignored
    Remarks
    The result Json data is compliant with the Native DICOM Model outlined in the DICOM Part 19 (Application Hosting), with modifications as defined in supplement 163 to allow bulk data, which is used for attributes of appropriate types with more than 16 values
    Example
    DicomDataSet ds = new DicomDataSet("Dataset.dcm");
    using (FileStream fs = new FileStream("Dataset.json", FileMode.Create, FileAccess.Write))
    {
        ds.WriteJson(fs);
    }
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also