DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / CanConvertTo Method
The transfer syntax to test
Example

In This Topic
    CanConvertTo Method
    In This Topic
    Useful method to check if the image can be converted using a different compression specified by the TransferSyntax
    Syntax
    'Declaration
     
    
    Public Function CanConvertTo( _
       ByVal TransferSyntax As System.String _
    ) As System.Boolean
    public System.bool CanConvertTo( 
       System.string TransferSyntax
    )

    Parameters

    TransferSyntax
    The transfer syntax to test

    Return Value

    True is the conversion is possible
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    var checkExplicitConv = image.CanConvertTo(TransferSyntaxes.ExplicitVRLittleEndian); 
    var checkMPEG2Conv = image.CanConvertTo(TransferSyntaxes.MPEG2); 
    var checkXMLEncodingConv = image.CanConvertTo(TransferSyntaxes.XMLEncoding);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also