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

In This Topic
    CellSize Method
    In This Topic
    The size of the cell within which this image would be displayed in a particular viewer
    Syntax
    'Declaration
     
    
    Public Function CellSize( _
       ByVal Viewer As DicomViewer _
    ) As System.Drawing.Size
    public System.Drawing.Size CellSize( 
       DicomViewer Viewer
    )

    Parameters

    Viewer
    The viewer to use for sizing etc.

    Return Value

    The size, in pixels
    Remarks
    If the Area property of the image is empty, then this will always return the same size (area of the viewer divided by rows and columms), but if an explicit area is specified, then that is used instead.
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");   
    Viewer.Images.Add(image); // Assumes an existing DicomViewer Object
    var cellSize = image.CellSize(Viewer); // Example Result: {Width = 715 Height = 555}
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also