DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSet Class / ValidateAll Method / ValidateAll() Method
Example

In This Topic
    ValidateAll() Method
    In This Topic
    Validate all DicomAttributes within the DicomDataset
    Syntax
    'Declaration
     
    
    <System.ObsoleteAttribute("Use ValidateAll overload with ValidateOptions parameter for refined results")>
    Public Overloads Function ValidateAll() As System.Collections.Generic.List(Of DicomValidationException)
    [System.Obsolete("Use ValidateAll overload with ValidateOptions parameter for refined results")]
    public System.Collections.Generic.List<DicomValidationException> ValidateAll()

    Return Value

    a list of validation errors as DicomValidationException objects
    Remarks
    If there are no errors, then an empty list (not null) is returned
    Example
    DicomDataSet ds = new DicomDataSet(@"Invalid_DicomDataset.dcm");
    var invalidAttributeList = ds.ValidateAll();
                        
    foreach (var attr in invalidAttributeList)
    {
        Debug.WriteLine($"{attr.Message}");
        // Example Output: String Value Offending Attribute: [0010, 1010]. Value:  Anonymized is not compatible with the rules for VR=AS.  Maximum Length is 4
    }
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also