#include <src/TileAlignmentThread.h>
Inherits R3DAbstractThread.
Inheritance diagram for TileAlignmentThread:
The basic algorithm is to compute the overlap of the 2 iamges and then align just the overlapping areas which allows the computation to proceed much quicker.
Public Member Functions | |
TileAlignmentThread (R3DThreadGroup::Pointer threadGroup, int threadSlot, const std::string &threadName, TileAlignment *master, TileAlignmentData::Pointer stitcherData, bool debug=false) | |
Constructor for this object. | |
void | run () |
main entry point to register the 2 images | |
Protected Member Functions | |
void | initializeImportFilter (ImportFilterType::Pointer importFilter, PixelType *imageData, double xOrigin, double yOrigin, double scaling) |
Creates an ITK object that holds the image data. | |
int | registerImages (ImportFilterType::Pointer fixedImageImportFilter, ImportFilterType::Pointer movingImageImportFilter) |
This will actually register 2 images. | |
std::string | makeAnalysisImage (const std::string &path, const std::string &slice, const std::string &num, const std::string &label) |
Creates an image that is written out to disk. | |
bool | _frameIntersection (const Tile &r1, const Tile &r2, Tile &intersection) |
Test if 2 frame objects intersect. |
TileAlignmentThread::TileAlignmentThread | ( | R3DThreadGroup::Pointer | threadGroup, | |
int | threadSlot, | |||
const std::string & | threadName, | |||
TileAlignment * | master, | |||
TileAlignmentData::Pointer | stitcherData, | |||
bool | debug = false | |||
) |
Constructor for this object.
threadGroup | The R3DThreadGroup object that is controlling this thread | |
threadSlot | The slot number where this thread is stored in the lookup table. | |
master | The 'master' class that is invoking this object | |
stitcherData | Object to hold data related to the registration process and outcome | |
threadName | The std::string name for this thread which should be unique among all threads generated | |
debug | Should debug statements be generated. |
void TileAlignmentThread::run | ( | ) | [virtual] |
main entry point to register the 2 images
Implements R3DAbstractThread.
void TileAlignmentThread::initializeImportFilter | ( | ImportFilterType::Pointer | importFilter, | |
PixelType * | imageData, | |||
double | xOrigin, | |||
double | yOrigin, | |||
double | scaling | |||
) | [protected] |
Creates an ITK object that holds the image data.
importFilter | The ImportFilterType object | |
imageData | Raw Pointer to the actual image data | |
xOrigin | The x origin of the image | |
yOrigin | The y origin of the image | |
scaling | The scaling factor for the image |
int TileAlignmentThread::registerImages | ( | ImportFilterType::Pointer | fixedImageImportFilter, | |
ImportFilterType::Pointer | movingImageImportFilter | |||
) | [protected] |
This will actually register 2 images.
fixedImageImportFilter | Fixed Image | |
movingImageImportFilter | Moving Image |
std::string TileAlignmentThread::makeAnalysisImage | ( | const std::string & | path, | |
const std::string & | slice, | |||
const std::string & | num, | |||
const std::string & | label | |||
) | [protected] |
Creates an image that is written out to disk.
path | The path to the output image | |
slice | The slice number | |
num | The frame number | |
label | Extra label for the filename |
bool TileAlignmentThread::_frameIntersection | ( | const Tile & | r1, | |
const Tile & | r2, | |||
Tile & | intersection | |||
) | [protected] |
Test if 2 frame objects intersect.
r1 | Input frame 1 | |
r2 | Input frame 2 | |
intersection | Output intersected frame data |