DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / CellLocation Method
The viewer to use for sizing etc.
Example

In This Topic
    CellLocation Method
    In This Topic
    The location of the top-left corner of the cell within which this image would be displayed in a particular viewer
    Syntax
    'Declaration
     
    
    Public Function CellLocation( _
       ByVal Viewer As DicomViewer _
    ) As System.Drawing.Point
    public System.Drawing.Point CellLocation( 
       DicomViewer Viewer
    )

    Parameters

    Viewer
    The viewer to use for sizing etc.

    Return Value

    The location, in pixels, relative to the viewer
    Remarks
    If the Area property of the image is empty, then this will return the values bases on the position of the image within the viewer's Images collection, (using the Viewer's rows and columms), but if an explicit area is specified, then that is used instead.
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    DicomImage image2 = new DicomImage("your_dicom_image.dcm");
                
    Viewer.Images.Add(image);
    Viewer.Images.Add(image2);
    Viewer.AdjustMultiRowsColumns();
                         
    var cellOneLoc = image.CellLocation(Viewer); // example result (x: 0, y: 0)
    var cellTwoLoc = image2.CellLocation(Viewer); // example result (x: 357, y: 0)
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also