OPAL
|
Class responsible for SSD calculation between patches of images. More...
#include <SSD.h>
Public Types | |
using | ValueType = typename TDb::ImgPixelType |
using | ImgType = typename TDb::ImgType |
Public Member Functions | |
SSD (const TDb &db, size_t idx, size_t ctrFixedX, size_t ctrFixedY, size_t ctrMovingX, size_t ctrMovingY, size_t radius) | |
Constructor from coordinates of centers of patches. More... | |
ValueType | GetValue () const |
operator ValueType () const | |
bool | operator< (const SSD &other) const |
ValueType | ShiftRight () |
Same moving image, (x+1,y) on both fixed and moving images. More... | |
ValueType | ShiftLeft () |
Same moving image, (x-1,y) on both fixed and moving images. More... | |
ValueType | ShiftUp () |
Same moving image, (x,y-1) on both fixed and moving images. More... | |
ValueType | ShiftDown () |
Same moving image, (x,y+1) on both fixed and moving images. More... | |
ValueType | ShiftImage (const ImgType *img) |
Same (x,y) coordinates on image img. More... | |
Class responsible for SSD calculation between patches of images.
Needs a reference to ImageDatabase to construct, as it must support calculating SSD between adjacent pathces in both X and Y dimensions, as well as between patches of adjacent images in database.
SSD is constructed from coordinates of centers of patches, but uses coordinates of top-left corner of patches for calculation.
Needs only index of a single image in database (>= 1) because the other image is always Database[0] (image to be segmented).
TDb | Type of image database. Must be ImageDatabase. |
SSD< TDb >::SSD | ( | const TDb & | db, |
size_t | idx, | ||
size_t | ctrFixedX, | ||
size_t | ctrFixedY, | ||
size_t | ctrMovingX, | ||
size_t | ctrMovingY, | ||
size_t | radius | ||
) |
Constructor from coordinates of centers of patches.
Calculates coordinates of top-left corners of patches on images. Patches must lay inside the images, i. e. ctrFixedX
>= radius
, ctrFixedX < imageWidth - radius
, similarly for Y coordinates.
[in] | db | Database of images |
[in] | idx | Index of moving image in database, must be >= 1 |
[in] | ctrFixedX | X-coordinate of center of patch on fixed image |
[in] | ctrFixedY | Y-coordinate of center of patch on fixed image |
[in] | ctrMovingX | X-coordinate of center of patch on moving image |
[in] | ctrMovingY | Y-coordinate of center of patch on moving image |
[in] | radius | Radius of patches |
|
inline |
Same moving image, (x,y+1) on both fixed and moving images.
Same (x,y) coordinates on image img.
Same moving image, (x-1,y) on both fixed and moving images.
Same moving image, (x+1,y) on both fixed and moving images.
Same moving image, (x,y-1) on both fixed and moving images.