DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSet Class / IsPresentationStateFor Method / IsPresentationStateFor(DicomImage,Int32) Method

The DicomImage to check for its InstanceUID

Specify which frame to check

Example

In This Topic
    IsPresentationStateFor(DicomImage,Int32) Method
    In This Topic
    Indicates if the PresentationState is for the specified DicomImage
    Syntax
    'Declaration
     
    
    Public Overloads Function IsPresentationStateFor( _
       ByVal Image As DicomImage, _
       ByVal Frame As System.Integer _
    ) As System.Boolean
    public System.bool IsPresentationStateFor( 
       DicomImage Image,
       System.int Frame
    )

    Parameters

    Image

    The DicomImage to check for its InstanceUID

    Frame

    Specify which frame to check

    Return Value

    true if the presentationstate matches the image
    Remarks
    The Image's InstanceUID is checked against the value specified in the PresentationState's referenced Image SOP Instance UID field. The frame number is also checked against the values specified in the PresentationState. This method returns true if the the values match, otherwise it returns false.
    Example
    DicomDataSet ds = new DicomDataSet("Presentation_Dataset.dcm");
    DicomImage img = new DicomImage("Image.dcm");
    int frame = 5;
                        
    var matching = ds.IsPresentationStateFor(img, frame);   
    if (matching)
        img.PresentationState = ds;
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also