#include <R3D/ImageProcessing/Registration/RotationRegistration.h>
This will find the best fit of the fixed and moving images by considering only a rotation around a fixed point which is calculated as then center of the intersected areas of the fixed and moving images.
Public Member Functions | |
| RotationRegistration (const std::string &mxaFileName, const std::string &dataRecordName, const std::string &logFilename, int maxThreads, int sliceStart, int sliceEnd) | |
| Constructor. | |
| virtual void | run () |
| Main entry point for the Rotation Registration. | |
| 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 RotationRegistrationTable::Pointer | createNewRegistrationTable (IDataFile::Pointer dataFile) |
| Method will initialize a new Hint Table object. | |
| virtual void | updateRegistrationTable (IDataFile::Pointer dataFile, RotationRegistrationTable::Pointer table) |
| Updates a StitchDataTable with newly initialized StitchData pointers for slices that were not found in an existing file. | |
| virtual void | threadIsComplete (RotationRegistrationThread *thread, RotationRegistrationData::Pointer stitcherData) |
| Called when a thread has completed its operations. | |
| virtual int | readImageData (RotationRegistrationData::Pointer regData, unsigned char *&fxImageData, unsigned char *&mvImageData) |
| 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. | |
| RotationRegistrationTable::Pointer | getHintTablePtr () |
| Returns the R3DRegistrationStats table that is being used. | |
| RotationRegistrationTable::Pointer | initRotationRegistrationTable () |
| Initializes the RotationRegistrationTable Object either from a file or creates a new table from scratch. | |
Protected Member Functions | |
| int | readSliceInfo (R3DSliceInfo::Pointer sliceInfo) |
| Reads the slice information from the MXA/HDF5 file. | |
| int | writeRotationData (RotationRegistrationData::Pointer regData) |
| Writes the newly calculated Rotation Data to the HDF5 file. | |
| RotationRegistration::RotationRegistration | ( | const std::string & | mxaFileName, | |
| const std::string & | dataRecordName, | |||
| const std::string & | logFilename, | |||
| int | maxThreads, | |||
| int | sliceStart, | |||
| int | sliceEnd | |||
| ) |
Constructor.
| mxaFileName | The path to the MXA Data file holding the data to be registered | |
| dataRecordName | The name of the data record to perform the registration on | |
| logFilename | The path/name of a file to log debug information into | |
| maxThreads | The maximum number of threads to use for the registration | |
| sliceStart | The starting slice | |
| sliceEnd | The ending slice |
| void RotationRegistration::run | ( | ) | [virtual] |
Main entry point for the Rotation Registration.
After all the inputs have been poperly setup then call this method to start the process.
| void RotationRegistration::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 RotationRegistration::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 |
| RotationRegistrationTable::Pointer RotationRegistration::createNewRegistrationTable | ( | IDataFile::Pointer | dataFile | ) | [virtual] |
Method will initialize a new Hint Table object.
| dataFile | The MXA Datafile |
| void RotationRegistration::updateRegistrationTable | ( | IDataFile::Pointer | dataFile, | |
| RotationRegistrationTable::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 RotationRegistration::threadIsComplete | ( | RotationRegistrationThread * | thread, | |
| RotationRegistrationData::Pointer | stitcherData | |||
| ) | [virtual] |
Called when a thread has completed its operations.
| thread | The completed Thread | |
| stitcherData | The TileAlignmentData pointer |
| int RotationRegistration::readImageData | ( | RotationRegistrationData::Pointer | regData, | |
| unsigned char *& | fxImageData, | |||
| unsigned char *& | mvImageData | |||
| ) | [virtual] |
Reads the image data from an HDF5/MXA file.
| regData | The RegistrationData object specific for this class | |
| fxImageData | The fixed image data pointer | |
| mvImageData | The moving image data pointer |
| void RotationRegistration::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 RotationRegistration::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 RotationRegistration::getMXAFileName | ( | ) | [inline] |
Returns the name of the mxa file that is being used.
| std::string RotationRegistration::getDataRecordName | ( | ) | [inline] |
returns the name of the DataRecord being used
| void RotationRegistration::setHintTableFileName | ( | const std::string & | fn | ) | [inline] |
Sets the filename to use for the hint table.
| fn | The filename for the hint table |
| std::string RotationRegistration::getHintTableFileName | ( | ) | [inline] |
Returns the name of the hint file being used.
| RotationRegistrationTable::Pointer RotationRegistration::getHintTablePtr | ( | ) | [inline] |
Returns the R3DRegistrationStats table that is being used.
| int RotationRegistration::readSliceInfo | ( | R3DSliceInfo::Pointer | sliceInfo | ) | [protected] |
Reads the slice information from the MXA/HDF5 file.
| sliceInfo | Reads the R3DSliceInfo from the file |
| int RotationRegistration::writeRotationData | ( | RotationRegistrationData::Pointer | regData | ) | [protected] |
Writes the newly calculated Rotation Data to the HDF5 file.
| regData | The RotationRegistrationData object |
1.5.2