DicomObjects.NET.8.48 Documentation
DicomObjects.Video Namespace / VideoCompressionOptions Class / VideoCompressionOptions Constructor
The Image to be compressed to video
The output format - see remarks
If specified (may be null), then the specific codec is used - otherwise this can be selected internally based on the container
If set to a value convertable to an integer, then this is used to initialise the BitsPerSecond property
Example

In This Topic
    VideoCompressionOptions Constructor
    In This Topic
    Construct a default set of compression options for a given image and output format
    Syntax
    'Declaration
     
    
    Public Function New( _
       ByVal Image As DicomDataSet, _
       ByVal Format As System.String, _
       ByVal Codec As System.String, _
       ByVal Quality As System.Object _
    )
    public VideoCompressionOptions( 
       DicomDataSet Image,
       System.string Format,
       System.string Codec,
       System.object Quality
    )

    Parameters

    Image
    The Image to be compressed to video
    Format
    The output format - see remarks
    Codec
    If specified (may be null), then the specific codec is used - otherwise this can be selected internally based on the container
    Quality
    If set to a value convertable to an integer, then this is used to initialise the BitsPerSecond property
    Remarks

    This constructor sets very many default options, depending on the characteristics of the image and the output format. Only change them if you know what you are doing!

    The format parameter has 2 quite different forms:

    • If it is a UID, then it is interpretted as a DICOM Transfer Syntax, and options are set according to the DICOM rules for that transfer syntax
    • Otherwise, it is treated as an container format (such as "avi" or "mp4")

    Example
    DicomImage img = new DicomImage();
    img.CacheMode = CacheTypes.None;
    img.Import("1920x1080.mp4");
                        
    UID tranferSyntax = TransferSyntaxes.MPEG4;
    string format = "mp4";
                        
    img.Write("1928x1080.dcm", tranferSyntax, new VideoCompressionOptions(img, format, null, null));
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also