public class CoordinateRadius extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Coordinates |
centerPosition
Center position in a supported coordinate system
|
protected double |
height
Height about the center (optional)
|
protected double |
maxRadius
Max radius from center
|
protected double |
minRadius
Min radius from center
|
protected double |
width
Width about the center (optional)
|
Constructor and Description |
---|
CoordinateRadius(Coordinates pos,
double maxRadius)
Initialize from the given center position and radius.
|
CoordinateRadius(Coordinates pos,
double minRadius,
double maxRadius)
Initialize from the given center position and radius range.
|
CoordinateRadius(Coordinates pos,
double maxRadius,
double width,
double height)
Initialize from the given center position, width and height.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Coordinates pos)
Return true if the given coordinate position lies within the
region defined by this object.
|
Coordinates |
getCenterPosition()
Return the center position.
|
double |
getHeight()
Return the height, if set, otherwise 0.
|
double |
getMaxRadius()
Return the max radius value.
|
double |
getMinRadius()
Return the min radius value.
|
double |
getWidth()
Return the width, if set, otherwise 0.
|
String |
toString()
Return coordinates and radius as a string.
|
protected Coordinates centerPosition
protected double minRadius
protected double maxRadius
protected double width
protected double height
public CoordinateRadius(Coordinates pos, double minRadius, double maxRadius)
pos
- the center position.minRadius
- the minimum radius from the center positionmaxRadius
- the maximum radius from the center positionpublic CoordinateRadius(Coordinates pos, double maxRadius)
pos
- the center position.maxRadius
- the maximum radius from the center positionpublic CoordinateRadius(Coordinates pos, double maxRadius, double width, double height)
pos
- the center position.width
- the width of the image area, about the centerheight
- the height of the image area, about the centermaxRadius
- the maximum radius from the center positionpublic Coordinates getCenterPosition()
public double getMinRadius()
public double getMaxRadius()
public double getWidth()
public double getHeight()
public boolean contains(Coordinates pos)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.