DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / SpacingInViewer Method
The Area for which the spacing should be calculated
The viewer for which the spacing applies






In This Topic
    SpacingInViewer Method
    In This Topic
    This method returns the Pixel Spacing within the region specified by Area, in a particular viewer
    Syntax
    'Declaration
     
    
    Public Overridable Function SpacingInViewer( _
       ByVal Area As System.Drawing.Rectangle, _
       ByVal Viewer As DicomViewer _
    ) As System.Drawing.SizeF
    'Usage
     
    
    Dim instance As DicomImage
    Dim Area As System.Drawing.Rectangle
    Dim Viewer As DicomViewer
    Dim value As System.Drawing.SizeF
     
    value = instance.SpacingInViewer(Area, Viewer)
    public virtual System.Drawing.SizeF SpacingInViewer( 
       System.Drawing.Rectangle Area,
       DicomViewer Viewer
    )
    public function SpacingInViewer( 
        Area: System.Drawing.Rectangle;
        Viewer: DicomViewer
    ): System.Drawing.SizeF; virtual; 
    public function SpacingInViewer( 
       Area : System.Drawing.Rectangle,
       Viewer : DicomViewer
    ) : System.Drawing.SizeF;
    public: virtual System.Drawing.SizeF SpacingInViewer( 
       System.Drawing.Rectangle Area,
       DicomViewer* Viewer
    ) 
    public:
    virtual System.Drawing.SizeF SpacingInViewer( 
       System.Drawing.Rectangle Area,
       DicomViewer^ Viewer
    ) 

    Parameters

    Area
    The Area for which the spacing should be calculated
    Viewer
    The viewer for which the spacing applies

    Return Value

    The pixel spacing of the requested area
    Remarks

    This method returns the Pixel Spacing within a Region of the DicomImage. Note, one Image may have multiple regions with different pixel spacing values, so this method may return different values for different inputs.

    Note that for non-3D images, this returns exactly the same value as Spacing(Rectangle), but that 3D images have scaling dependent on the viewer size, as autoscaling is used for such images.

    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also