ImageBox.
This class handles the bounding box of an image. It allows to store a reference point inside it and allows to handle some operations and conversion on pixels coordinates.
Shall be initialized with the dimensions of the image, in order to be able to convert back and forth from Points to Offsets.
|
| ImageBox (size_t Size[3]) |
| ImageBox - constructor.
|
|
| ImageBox (const ImageBox &box) |
| ImageBox - constructor.
|
|
| ImageBox (size_t width, size_t height, size_t depth=1) |
| ImageBox - constructor.
|
|
void | setReference (off_t x, off_t y, off_t z=0) |
| setReference() - set reference point
|
|
void | setReference (IntPoint pt) |
| setReference() - set reference point
|
|
void | setReference (off_t offset) |
| setReference() - set reference point
|
|
IntPoint | getPoint () |
| getPoint() - get coordinates as a point
|
|
off_t | getOffset () |
| getOffset() - get coordinates as an reference
|
|
void | shift (off_t dx, off_t dy, off_t dz=0) |
| shift() - move the point by some displacements
|
|
void | shift (IntPoint dp) |
| shift() - move the point by some displacements given by a point
|
|
bool | inImage () |
| inImage() - check if the reference point is inside image bounds
|
|
bool | inImage (size_t x, size_t y, size_t z=0) |
| inImage() - given the coordinates of a pixel, check if it's inside image box
|
|
bool | inImage (IntPoint p) |
| inImage() - given the coordinates of a pixel, as a point, check if its coordinates are inside the image box
|
|
off_t | getOffset (IntPoint p) |
| getOffset() - given the coordinates of a pixel in a image box, get its offset.
|
|
IntPoint | getCoords (off_t off) |
| getCoords() - given the offset of a pixel inside an image, returns its coordinates as a point
|
|
double | getDistance (off_t pa, off_t pb) |
| getDistance() - given the offset of two points inside the image box returns the Euclidean between them.
|
|
double | getDistance (off_t p) |
| getDistance() - given a point inside an image box returns the Euclidean between this point and the reference point.
|
|
double | getDistance (IntPoint p) |
| getDistance() - given a point inside an image box returns the Euclidean between this point and the reference point.
|
|
double | getDistance (IntPoint a, IntPoint b) |
| getDistance() - given two points inside the image box returns the Euclidean between them.
|
|