DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSet Class / FunctionalGroupOrRootLevelAttribute Method / FunctionalGroupOrRootLevelAttribute(Keyword,Int32,Keyword) Method
The keyword of the requested dataset
The frame number to which the dataset should apply
The keyword of the requested attribute within the dataset
Example

In This Topic
    FunctionalGroupOrRootLevelAttribute(Keyword,Int32,Keyword) Method
    In This Topic
    Return the required DicomAttribute within a specified functional group within a DicomDataSet If DicomAttribute is not present in the specified DicomDataSet, it searches amongst the root level attributes
    Syntax
    'Declaration
     
    
    Public Overloads Function FunctionalGroupOrRootLevelAttribute( _
       ByVal FunctionalAttribute As Keyword, _
       ByVal Frame As System.Integer, _
       ByVal keyword As Keyword _
    ) As DicomAttribute
    public DicomAttribute FunctionalGroupOrRootLevelAttribute( 
       Keyword FunctionalAttribute,
       System.int Frame,
       Keyword keyword
    )

    Parameters

    FunctionalAttribute
    The keyword of the requested dataset
    Frame
    The frame number to which the dataset should apply
    keyword
    The keyword of the requested attribute within the dataset

    Return Value

    The requested DicomAttribute
    Remarks
    The enhanced DICOM multi-frame objects (e.g. enhanced CT and MRI) allow many attributes to be held in functional group macros, which may be either:
    • The same for all frames - in the "Shared Functional Groups Sequence" (5200,9229)
    • Different for different frames - in the "Per-frame Functional Groups Sequence" (5200,9230)
    This method allows an attribute to be retrieved from the chosen dataset, irrespective of which sequence it is in. Note that the DicomObjects.Enums.Keyword used to identify the functional group is independent of the DicomObjects.Enums.Keyword of individual attributes within that DataSet.
    Example
    DicomDataSet enhancedDs = new DicomDataSet("Enhanced_Dataset.dcm");
                        
    Keyword functionalGroupMacro = Keyword.PixelValueTransformationSequence;
    int frameNumber = 10;
    Keyword targetAttribute = Keyword.RescaleIntercept;
                        
    var attr = enhancedDs.FunctionalGroupOrRootLevelAttribute(functionalGroupMacro, frameNumber, targetAttribute);
                        
     if (attr != null)
     {
        Console.WriteLine($"Rescale Intercept for Frame {frameNumber}: {attr.Value}"); 
     }
     else
     {
        Console.WriteLine("Rescale Intercept not found.");     
     }
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also