com.pixelmed.display

## Class DisplayedAreaSelection

- java.lang.Object
- - com.pixelmed.display.DisplayedAreaSelection

All Implemented Interfaces:
  java.lang.Cloneable

    public class DisplayedAreaSelection
    extends java.lang.Object
    implements java.lang.Cloneable

A class to keep track of a selected sub-region of an image for the purposes of display.

See Also:
  `SingleImagePanel`

### Field Summary

Fields
`protected int` `brhcX`
`protected int` `brhcY`
`protected double` `columnSpacing`
`protected boolean` `crop`
`protected boolean` `deducePixelMagnificationRatioFromSpacing`
`protected boolean` `fitToWindow`
`protected int` `horizontalGravity`
`protected int` `imageHeight`
`protected int` `imageWidth`
`protected double` `pixelMagnificationRatio`
`protected double` `requestedDisplaySpacing`
`protected double` `rowSpacing`
`protected int` `selectionHeight`
`protected int` `selectionWidth`
`protected int` `tlhcX`
`protected int` `tlhcY`
`protected boolean` `useExplicitPixelMagnificationRatio`
`protected int` `verticalGravity`

### Method Summary

Methods
`java.lang.Object` `clone()`
`void` `setPixelMagnificationRatio(double pixelMagnificationRatio)` Change the selection to use the specified magnification ratio.
`java.lang.String` `toString()`
`void` `translate(int deltaX, int deltaY)`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### imageWidth

    protected int imageWidth

#### imageHeight

    protected int imageHeight

#### tlhcX

    protected int tlhcX

#### tlhcY

    protected int tlhcY

#### brhcX

    protected int brhcX

#### brhcY

    protected int brhcY

#### selectionWidth

    protected int selectionWidth

#### selectionHeight

    protected int selectionHeight

#### fitToWindow

    protected boolean fitToWindow

#### useExplicitPixelMagnificationRatio

    protected boolean useExplicitPixelMagnificationRatio

#### deducePixelMagnificationRatioFromSpacing

    protected boolean deducePixelMagnificationRatioFromSpacing

#### requestedDisplaySpacing

    protected double requestedDisplaySpacing

#### rowSpacing

    protected double rowSpacing

#### columnSpacing

    protected double columnSpacing

#### pixelMagnificationRatio

    protected double pixelMagnificationRatio

#### horizontalGravity

    protected int horizontalGravity

#### verticalGravity

    protected int verticalGravity

#### crop

    protected boolean crop

### Method Detail

#### translate

    public void translate(int deltaX,
                 int deltaY)

#### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

Overrides:
  `clone` in class `java.lang.Object`
Throws:
  `java.lang.CloneNotSupportedException`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### setPixelMagnificationRatio

    public void setPixelMagnificationRatio(double pixelMagnificationRatio)

Change the selection to use the specified magnification ratio. Turns off fitToWindow if previously selected, since we have requested explicit magnification

Parameters:
  `pixelMagnificationRatio` - the magnification factor of display pixels relative to the image pixels (i.e., 1.0 means 1 display pixel per 1 image pixel)