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. More...
|
|
| ImageBox (const ImageBox &box) |
| ImageBox - constructor. More...
|
|
| ImageBox (size_t width, size_t height, size_t depth=1) |
| ImageBox - constructor. More...
|
|
void | setReference (off_t x, off_t y, off_t z=0) |
| setReference() - set reference point More...
|
|
void | setReference (IntPoint pt) |
| setReference() - set reference point More...
|
|
void | setReference (off_t offset) |
| setReference() - set reference point More...
|
|
IntPoint | getPoint () |
| getPoint() - get coordinates as a point More...
|
|
off_t | getOffset () |
| getOffset() - get coordinates as an reference More...
|
|
void | shift (off_t dx, off_t dy, off_t dz=0) |
| shift() - move the point by some displacements More...
|
|
void | shift (IntPoint dp) |
| shift() - move the point by some displacements given by a point More...
|
|
bool | inImage () |
| inImage() - check if the reference point is inside image bounds More...
|
|
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 More...
|
|
bool | inImage (IntPoint p) |
| inImage() - given the coordinates of a pixel, as a point, check if its coordinates are inside the image box More...
|
|
off_t | getOffset (IntPoint p) |
| getOffset() - given the coordinates of a pixel in a image box, get its offset. More...
|
|
IntPoint | getCoords (off_t off) |
| getCoords() - given the offset of a pixel inside an image, returns its coordinates as a point More...
|
|
double | getDistance (off_t pa, off_t pb) |
| getDistance() - given the offset of two points inside the image box returns the Euclidean between them. More...
|
|
double | getDistance (off_t p) |
| getDistance() - given a point inside an image box returns the Euclidean between this point and the reference point. More...
|
|
double | getDistance (IntPoint p) |
| getDistance() - given a point inside an image box returns the Euclidean between this point and the reference point. More...
|
|
double | getDistance (IntPoint a, IntPoint b) |
| getDistance() - given two points inside the image box returns the Euclidean between them. More...
|
|
void | printSelf () |
|