public class IntBounds2D extends Object
IntBounds3D| Constructor and Description |
|---|
IntBounds2D(int xmin,
int xmax,
int ymin,
int ymax)
Default constructor of the bounding box, that specifies the bounds along
each dimension.
|
| Modifier and Type | Method and Description |
|---|---|
IntBounds2D |
addBorder(int border)
Adds the given amount of voxels along each direction.
|
int |
getHeight()
Computes the height of the bounding box, corresponding to the extent
along the Y dimension.
|
int |
getWidth()
Computes the width of the bounding box, corresponding to the extent along
the X dimension.
|
int |
getXMax() |
int |
getXMin() |
int |
getYMax() |
int |
getYMin() |
IntBounds2D |
intersection(IntBounds2D bounds)
Computes the intersection between the two bounds, such that the result is
totally contained within this bounds and the other bounds.
|
boolean |
isValid()
Checks if this Bounds is valid, by checking that for each dimension, the
minimum coordinate is lower than (or equal to) the maximum coordinate.
|
IntBounds2D |
union(IntBounds2D bounds)
Computes the union of the two bounds, by retaining the max extent along
each dimension.
|
public IntBounds2D(int xmin,
int xmax,
int ymin,
int ymax)
xmin - the minimum x coordinatexmax - the maximum x coordinateymin - the minimum y coordinateymax - the maximum y coordinatepublic IntBounds2D addBorder(int border)
border - the number of voxels to add in each directionpublic IntBounds2D intersection(IntBounds2D bounds)
bounds - the Bounds object used for cropping.public IntBounds2D union(IntBounds2D bounds)
bounds - the Bounds object used for computing union.public int getWidth()
public int getHeight()
public boolean isValid()
public int getXMin()
public int getXMax()
public int getYMin()
public int getYMax()
Copyright © 2014–2024 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.