#include <R3D/TileAlignment/TileAlignment.h>
It is threaded and the user can dictate how many threads to use for the process.
Public Member Functions | |
void | run () |
Starts the actual registration process. | |
void | setDebug (bool dbg) |
Sets a flag so that more detailed process information is output. | |
virtual void | setSliceBoundaries (int sliceStart, int sliceEnd) |
Sets the starting and ending (inclusive) indices of the slices to aligned. | |
virtual TileAlignmentTable::Pointer | createNewMosaicStitcherTable (IDataFile::Pointer dataFile) |
Method will initialize a new Hint Table object. | |
virtual void | updateMosaicStitcherTable (IDataFile::Pointer dataFile, TileAlignmentTable::Pointer table) |
Updates a StitchDataTable with newly initialized StitchData pointers for slices that were not found in an existing file. | |
virtual void | threadIsComplete (RegistrationThread *thread, TileAlignmentData::Pointer stitcherData) |
Called when a thread has completed its operations. | |
virtual int | readImageData (int sliceNumber, int frameNumber, TileAlignmentData::Pointer stitcherData, unsigned char *&localBuffer) |
Reads the image data from an HDF5/MXA file. | |
virtual void | debugOutput (const std::string &threadName, const std::string &str) |
Delivers a message to the selected output device. | |
int | getImageInfo (hid_t fileId, const std::string &datasetName, hsize_t *cols, hsize_t *rows, hsize_t *planes, std::string &interlace, hssize_t *npals, std::string &attrValSubclass) |
Gets information about an image stored in an HDF5/MXA file. | |
std::string | getMXAFileName () |
Returns the name of the mxa file that is being used. | |
std::string | getDataRecordName () |
returns the name of the DataRecord being used | |
void | setHintTableFileName (const std::string &fn) |
Sets the filename to use for the hint table. | |
std::string | getHintTableFileName () |
Returns the name of the hint file being used. | |
TileAlignmentTable::Pointer | getHintTablePtr () |
Returns the R3DRegistrationStats table that is being used. | |
Protected Member Functions | |
void | _updateAsAlignedValues (int slice, SliceStitcherDataPtr sliceStitcherData) |
This method will take all the values stored in the hint table and update the 'AsAligned' values of each Data Records in the MXA file so that stitching operations will correctly produce a mosaic image. |
void TileAlignment::setDebug | ( | bool | dbg | ) |
Sets a flag so that more detailed process information is output.
dbg | True to have more detailed process output delivered to the selected output device. |
void TileAlignment::setSliceBoundaries | ( | int | sliceStart, | |
int | sliceEnd | |||
) | [virtual] |
Sets the starting and ending (inclusive) indices of the slices to aligned.
sliceStart | The starting slice | |
sliceEnd | The ending slice |
TileAlignmentTable::Pointer TileAlignment::createNewMosaicStitcherTable | ( | IDataFile::Pointer | dataFile | ) | [virtual] |
Method will initialize a new Hint Table object.
dataFile | The MXA Datafile |
void TileAlignment::updateMosaicStitcherTable | ( | IDataFile::Pointer | dataFile, | |
TileAlignmentTable::Pointer | table | |||
) | [virtual] |
Updates a StitchDataTable with newly initialized StitchData pointers for slices that were not found in an existing file.
This can happen if the user asks for a wider slice range than what is stored in the hint file.
dataFile | The MXA Data File | |
table | The TileAlignmentTable object |
void TileAlignment::threadIsComplete | ( | RegistrationThread * | thread, | |
TileAlignmentData::Pointer | stitcherData | |||
) | [virtual] |
Called when a thread has completed its operations.
thread | The completed Thread | |
stitcherData | The TileAlignmentData pointer |
int TileAlignment::readImageData | ( | int | sliceNumber, | |
int | frameNumber, | |||
TileAlignmentData::Pointer | stitcherData, | |||
unsigned char *& | localBuffer | |||
) | [virtual] |
Reads the image data from an HDF5/MXA file.
sliceNumber | The slice number | |
frameNumber | The frame number | |
stitcherData | The TileAlignmentData pointer | |
localBuffer | Preallocated uchar buffer |
void TileAlignment::debugOutput | ( | const std::string & | threadName, | |
const std::string & | str | |||
) | [virtual] |
Delivers a message to the selected output device.
threadName | The name of the thread delivering the message | |
str | The message to deliver |
int TileAlignment::getImageInfo | ( | hid_t | fileId, | |
const std::string & | datasetName, | |||
hsize_t * | cols, | |||
hsize_t * | rows, | |||
hsize_t * | planes, | |||
std::string & | interlace, | |||
hssize_t * | npals, | |||
std::string & | attrValSubclass | |||
) |
Gets information about an image stored in an HDF5/MXA file.
fileId | The HDF5 fileid value | |
datasetName | The path to the data set | |
cols | The number of columns (width) of the image (Output variable) | |
rows | The number of rows (height) of the image (Output variable) | |
planes | The number of color channels in the image (Output variable) | |
interlace | Are the color channels interlaced? (Output variable) | |
npals | The color palette (Output variable) | |
attrValSubclass | The Attribute value subclass to be filled in. (Output variable) |
std::string TileAlignment::getMXAFileName | ( | ) | [inline] |
Returns the name of the mxa file that is being used.
std::string TileAlignment::getDataRecordName | ( | ) | [inline] |
returns the name of the DataRecord being used
void TileAlignment::setHintTableFileName | ( | const std::string & | fn | ) | [inline] |
Sets the filename to use for the hint table.
fn | The filename for the hint table |
std::string TileAlignment::getHintTableFileName | ( | ) | [inline] |
Returns the name of the hint file being used.
TileAlignmentTable::Pointer TileAlignment::getHintTablePtr | ( | ) | [inline] |
Returns the R3DRegistrationStats table that is being used.
void TileAlignment::_updateAsAlignedValues | ( | int | slice, | |
SliceStitcherDataPtr | sliceStitcherData | |||
) | [protected] |
This method will take all the values stored in the hint table and update the 'AsAligned' values of each Data Records in the MXA file so that stitching operations will correctly produce a mosaic image.
WARNING: This method should ONLY be called from another method where the mutex has been locked otherwise havoc will probably ensue in your HDF5 file. This method is exclusively called from the 'threadFinished' method and nowhere else.