Filter Library | Camera | Interface Physics |
#include <CalculatorImageShift.h>
Inheritance diagram for CCalculatorImageShift:
The template image can be set once with SetTemplateBuffer() and it can be reused multiple times. SetTemplateBuffer() makes a copy of the scan buffer given to it.
Note that SetSubjectBuffer() does not make a copy of the buffer given to it.
Example usage.
// the image buffers to give to the tracking calculator: CScanBaseBuffer* tplBuffer; CScanBaseBuffer* sbjBuffer; // the tracking calculator: CCalculatorImageShift trackingCalculator; // set the image buffers: trackingCalculator.SetTemplateBuffer( tplBuffer ); // this buffer is copied trackingCalculator.SetSubjectBuffer ( sbjBuffer ); // this buffer is NOT copied // declare the shift types: typedef CCalculatorImageShift::PixelShiftType PixelShiftType; typedef CCalculatorImageShift::SpacingShiftType SpacingShiftType; // calculate the image shift: trackingCalculator.Apply(); // get the result in pixels and in [m]: PixelShiftType pixelShift = trackingCalculator.GetPixelShift(); SpacingShiftType spacingShift = trackingCalculator.GetSpacingShift(); // convert the shift to [nm]: double xshift_nm = spacingShift.x * 1e12; double yshift_nm = spacingShift.y * 1e12;
Definition at line 106 of file CalculatorImageShift.h.
Public Types | |
typedef ShiftType< int > | PixelShiftType |
the pixel shift type. | |
typedef ShiftType< double > | SpacingShiftType |
the spacing shift type. | |
typedef CScanBaseBuffer::SpacingType | SpacingValueType |
the spacing value type. | |
Public Member Functions | |
Camera--Filter Interface | |
virtual BOOL | CanDoDialogEntry () const |
no dialog. | |
virtual BOOL | Apply () |
check parameters, take care of a properly sized output buffer, set its name and copy filter parameters and process; see also CScanFilterNull::Apply(). | |
Accessors | |
PixelShiftType | GetPixelShift () const |
the pixel shift. | |
SpacingShiftType | GetSpacingShift () const |
the spacing shift in [m]. | |
SpacingValueType | GetSpacingX () const |
the image x-spacing in [m]. | |
SpacingValueType | GetSpacingY () const |
the image y-spacing in [m]. | |
Modifiers | |
virtual void | SetInputBuffer (UINT n, CScanBaseBuffer *buffer) |
set the given image buffer. | |
void | SetTemplateBuffer (CScanBaseBuffer *buffer) |
set the template image. | |
void | SetSubjectBuffer (CScanBaseBuffer *buffer) |
set the subject image. | |
void | SetPixelShift (const PixelShiftType &shift) |
set the pixel shift. | |
Static Public Attributes | |
static LPCTSTR | m_lpcsFilterName |
the filter name. | |
static LPCTSTR | m_lpcsShortFilterName |
the class short filtername. | |
Protected Member Functions | |
virtual void | Serialize (CArchive &ar) |
store or retrieve the object's settings; see also CScanFilterNull::Serialize(). | |
void | CreateTemplateImage (CScanBaseBuffer *buffer) |
create an image from the given template scan buffer. | |
Protected Attributes | |
Image | m_templateImage |
the template image. | |
CScanBaseBuffer * | m_subjectBuffer |
the subject image input buffer. | |
PixelShiftType | m_pixelShift |
the pixel shift. | |
Classes | |
class | ShiftType |
the shift type. More... |