TileAlignment Class Reference

#include <R3D/TileAlignment/TileAlignment.h>

List of all members.


Detailed Description

This class will walk through a RoboMet.3D MXA data file and recalculate new values for the 'AsAligned' attribute for each frame.

It is threaded and the user can dictate how many threads to use for the process.

Author:
Michael A. Jackson for BlueQuartz Software
Date:
Mar 25, 2009
Version:
$Revision$


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.


Member Function Documentation

void TileAlignment::setDebug ( bool  dbg  ) 

Sets a flag so that more detailed process information is output.

Parameters:
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.

Parameters:
sliceStart The starting slice
sliceEnd The ending slice

TileAlignmentTable::Pointer TileAlignment::createNewMosaicStitcherTable ( IDataFile::Pointer  dataFile  )  [virtual]

Method will initialize a new Hint Table object.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
sliceNumber The slice number
frameNumber The frame number
stitcherData The TileAlignmentData pointer
localBuffer Preallocated uchar buffer
Returns:
Negative value on error

void TileAlignment::debugOutput ( const std::string &  threadName,
const std::string &  str 
) [virtual]

Delivers a message to the selected output device.

Parameters:
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.

Parameters:
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)
Returns:

std::string TileAlignment::getMXAFileName (  )  [inline]

Returns the name of the mxa file that is being used.

Returns:

std::string TileAlignment::getDataRecordName (  )  [inline]

returns the name of the DataRecord being used

Returns:

void TileAlignment::setHintTableFileName ( const std::string &  fn  )  [inline]

Sets the filename to use for the hint table.

Parameters:
fn The filename for the hint table

std::string TileAlignment::getHintTableFileName (  )  [inline]

Returns the name of the hint file being used.

Returns:

TileAlignmentTable::Pointer TileAlignment::getHintTablePtr (  )  [inline]

Returns the R3DRegistrationStats table that is being used.

Returns:

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.


The documentation for this class was generated from the following files:
Generated on Fri Aug 28 14:04:33 2009 for R3DImageTools by  doxygen 1.5.2