DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSet Class / FindAttribute Method
The sequence in a functional group that this attribute is part of
The item to be found
The frame number. This is only relevant if the item is found within the PerFrame functional groups sequence
Example

In This Topic
    FindAttribute Method
    In This Topic
    Locate an attribute within either a top level dataset, or within one of the functional group macros
    Syntax
    'Declaration
     
    
    Public Function FindAttribute( _
       ByVal Macro As Keyword, _
       ByVal Item As Keyword, _
       ByVal Frame As System.Integer _
    ) As DicomAttribute
    public DicomAttribute FindAttribute( 
       Keyword Macro,
       Keyword Item,
       System.int Frame
    )

    Parameters

    Macro
    The sequence in a functional group that this attribute is part of
    Item
    The item to be found
    Frame
    The frame number. This is only relevant if the item is found within the PerFrame functional groups sequence

    Return Value

    The requested DicomAttribute
    Example
    DicomDataSet enhancedDs = new DicomDataSet("Enhanced_Dataset.dcm");
    Keyword macro = Keyword.PlanePositionSequence;
    Keyword item = Keyword.ImagePositionPatient;
    int frame = 10;
                    
    // Retrieve ImagePositionPatient from Frame 10 (Per-frame macro)
    var attribute = ds.FindAttribute(macro, item, frame); // {(-175.1000, -175.1000, -110.0000)}
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also