Filter Library | Camera | Interface Physics |
#include <ScanBaseBuffer.h>
Definition at line 35 of file ScanBaseBuffer.h.
Accessors | |
SizeType | Columns () const |
X-size in pixels. | |
SizeType | Rows () const |
Y-size in pixels. | |
Pointer | Data () |
the buffer data (non-const). | |
ConstPointer | Data () const |
the buffer data (const). | |
FourierElementType ** | FourierDataL2R () |
the fourier left-right data (non-const). | |
FourierElementType const *const * | FourierDataL2R () const |
the fourier left-right data (const). | |
FourierElementType ** | FourierDataR2L () |
the fourier right-left data (non-const). | |
FourierElementType const *const * | FourierDataR2L () const |
the fourier right-left data (const). | |
SizeType | GetFrameSize () const |
Y-size by X-size number of pixels. | |
SizeType | GetPartialFrameOffset () const |
SizeType | GetPartialFrameSize () const |
number of pixels of the partial frame. | |
LengthType | GetFrameWidth () const |
the frame width in [m]. | |
LengthType | GetFrameHeight () const |
the frame height in [m]. | |
SpacingType | GetSpacingX () const |
the pixel spacing in the x-direction in [m]. | |
SpacingType | GetSpacingY () const |
the pixel spacing in the y-direction in [m]. | |
SpacingType | GetSpacingZ () const |
the bit spacing in the z-direction in [m]. | |
LengthType | GetLengthX (SizeType dx) const |
the length for the given number of pixels in the x-direction in [m]. | |
LengthType | GetLengthY (SizeType dy) const |
the length for the given number of pixels in the y-direction in [m]. | |
LengthType | GetAbsoluteHeight (ValueType adcValue) const |
the absolute height in [m] for given ADC value: scale * (adc + offset). | |
SizeType | GetRowsForFFT () const |
the rows required for FFT. | |
SizeType | GetColumnsForFFT () const |
the columns required for FFT. | |
static SizeType | GetSizeForFFT (SizeType size) |
the size required for FFT. | |
Prohibited | |
CScanBaseBuffer (const Self &rhs) | |
shallow copy-assignment constructor; do not copy data and fourier buffers. | |
Self & | operator= (const Self &rhs) |
shallo copy-assignment; do not copy data and fourier buffers. | |
Public Types | |
enum | tStatus { SB_NOTLOADED = 0, SB_LOADED, SB_NEW, SB_TEMP, SB_MODIFIED } |
the current state of this buffer. More... | |
typedef CObject | Super |
the parent class. | |
typedef CScanBaseBuffer | Self |
this type. | |
typedef short | ValueType |
the buffer's value type. | |
typedef ValueType * | Pointer |
the buffer's pointer-to value type. | |
typedef const ValueType * | ConstPointer |
the buffer's const pointer-to value type. | |
typedef double | RealType |
the buffer's real type. | |
typedef RealType | FourierElementType |
the forier buffer's data type. | |
typedef DWORD | SizeType |
the buffer's size type. | |
typedef DWORD | FlagType |
the buffer's flags type. | |
typedef DWORD | MaskType |
the buffer's mask type. | |
typedef RealType | SpacingType |
the x, y and z spacing type. | |
typedef RealType | LengthType |
the x, y and z length type. | |
typedef tStatus | StatusType |
buffer status type. | |
Public Member Functions | |
Predicates | |
bool | HasLeftToRightScan () const |
true if buffer contains a left--right scan. | |
bool | HasRightToLeftScan () const |
true if buffer contains a right--left scan. | |
bool | IsBidirectionalScan () const |
true if buffer contains both a left--right and a right--left scan. | |
bool | IsCompleteFrame () const |
true if all pixels of the frame are present. | |
bool | IsNewBuffer () const |
true if this buffer has not yet been used. | |
bool | IsEmptyBuffer () const |
true if data not yet loaded. | |
bool | IsLoadedBuffer () const |
true if data present in buffer. | |
bool | IsModifiedBuffer () const |
true if data in buffer has been modified. | |
bool | IsInMemoryBuffer () const |
true if buffer is used for in-memory filtering. | |
Mutators | |
BOOL | CheckAndSetBufferSize () |
make sure a buffer of appropriate size is available; | |
void | ClearDataBuffer () |
clear contents of data buffer. | |
void | ClearFourierBuffer () |
clear contents of data buffer. | |
BOOL | CreateInputBuffer (const CSize &size) |
create this buffer for input with the given size. | |
BOOL | CreateOutputBufferFor (const Self &input, SizeType extra=0) |
create this buffer for output based on the given input buffer; if specified, allocate extra elements. | |
BOOL | ResizeDataBuffer (const CSize &size, SizeType extra=0) |
resize this data buffer to the given size, on reallocation add extra size. | |
BOOL | CreateFourierBuffer () |
create the fourier buffer(s) based on the current databuffer size. | |
BOOL | DeleteFourierBuffer () |
delete the fourier buffer(s). | |
BOOL | CopyFourierBufferFrom (const Self &other) |
allocate fourier buffer(s) based on the current databuffer size and copy contents from other buffer. | |
Public Attributes | |
FlagType | m_dwFlags |
data L2R/R2L flags; see InterfaceDll.h, "Scandata Buffer Flags:". | |
SizeType | m_dwSizeX |
X size buffer, see Columns(). | |
SizeType | m_dwSizeY |
Y size buffer, see Rows(). | |
SizeType | m_dwPixels |
number of pixels in buffer, see also IsCompleteFrame(). | |
Pointer | m_pwData |
pointer to the data, see Data(). | |
FourierElementType ** | m_pdFourierL2R |
FFT data for L2R. | |
FourierElementType ** | m_pdFourierR2L |
FFT data for R2L. | |
CString | m_csBufferName |
name of the buffer. | |
CString | m_csDataName |
name of the data set. | |
CString | m_csDataUnit |
name of the data unit. | |
RealType | m_dDataScaleFactor |
scale factor between 1 unit and 1 LSB; see AbsoluteHeight(). | |
int | m_nDataOffset |
offset for ADC=0; see AbsoluteHeight(). | |
MaskType | m_dwParameterMask |
mask register for optional parameters; see InterfaceDll.h, "Scandata Buffer Parameter Mask". | |
RealType | m_dSlopeX |
X slope of backgroundplane. | |
RealType | m_dSlopeY |
Y slope of backgroundplane. | |
RealType | m_dAvg |
average (RealType). | |
int | m_nMinZ |
min Z. | |
int | m_nMaxZ |
max Z. | |
RealType | m_dSecMom |
sum of all data squared; extra, not in cyclic/raw. | |
SizeType | m_dwPixelOffset |
partial data in buffer, valid from Offset for Count pixels. | |
SizeType | m_dwPixelCount |
for dual l2r/r2l scans these values are valid for both areas. | |
RealType | m_dXStepSize |
X Step size of area in picometer. | |
RealType | m_dYStepSize |
Y Step size of area in picometer. | |
SizeType | m_dwOrgScanXSize |
original X Size in pixels. | |
SizeType | m_dwOrgScanYSize |
original Y Size in pixels. | |
RealType | m_dScanAngle |
Rotation of scan around center in rad. | |
Protected Member Functions | |
DECLARE_DYNCREATE (CScanBaseBuffer) | |
Buffer Creation | |
void | Copy (const Self &rhs) |
shallow copy; set data and fourier buffer pointers to 0. | |
void | AllocateDataBuffer (SizeType extra=0) |
allocate data buffer, but not fourier buffers. | |
void | AllocateFourierBuffer () |
allocate fourier buffer. | |
void | ReleaseAllBuffers () |
release all buffers. | |
void | ReleaseDataBuffer () |
release data buffer. | |
void | ReleaseFourierBuffer () |
release fourier buffer. | |
BOOL | IsUsableOutputBufferFor (const Self &input) |
true if buffer has the right size and settings to use as output buffer for the given input buffer. | |
Protected Attributes | |
StatusType | m_eStatus |
status of the buffer contents (loaded, modified etc. | |
SizeType | m_dwMemoryAllocated |
number of data points allocated in buffer | |
LARGE_INTEGER | m_liRAWIndex |
file position in RAW data file | |
LARGE_INTEGER | m_liEditIndex |
file position in edited data file |
The state of the buffer may be obtained via IsNewBuffer(), IsEmptyBuffer(), IsLoadedBuffer(), IsModifiedBuffer() and IsInMemoryBuffer().
See also m_eStatus.
Definition at line 528 of file ScanBaseBuffer.h.
CScanBaseBuffer::CScanBaseBuffer | ( | ) |
Definition at line 155 of file ScanBaseBuffer.cpp.
References m_csBufferName, m_csDataName, m_csDataUnit, m_dAvg, m_dDataScaleFactor, m_dScanAngle, m_dSecMom, m_dSlopeX, m_dSlopeY, m_dwFlags, m_dwMemoryAllocated, m_dwOrgScanXSize, m_dwOrgScanYSize, m_dwParameterMask, m_dwPixelCount, m_dwPixelOffset, m_dwPixels, m_dwSizeX, m_dwSizeY, m_dXStepSize, m_dYStepSize, m_eStatus, m_liEditIndex, m_liRAWIndex, m_nDataOffset, m_nMaxZ, m_nMinZ, m_pdFourierL2R, m_pdFourierR2L, m_pwData, and SB_NOTLOADED.
CScanBaseBuffer::CScanBaseBuffer | ( | ) |
Definition at line 155 of file ScanBaseBuffer.cpp.
References m_csBufferName, m_csDataName, m_csDataUnit, m_dAvg, m_dDataScaleFactor, m_dScanAngle, m_dSecMom, m_dSlopeX, m_dSlopeY, m_dwFlags, m_dwMemoryAllocated, m_dwOrgScanXSize, m_dwOrgScanYSize, m_dwParameterMask, m_dwPixelCount, m_dwPixelOffset, m_dwPixels, m_dwSizeX, m_dwSizeY, m_dXStepSize, m_dYStepSize, m_eStatus, m_liEditIndex, m_liRAWIndex, m_nDataOffset, m_nMaxZ, m_nMinZ, m_pdFourierL2R, m_pdFourierR2L, m_pwData, and SB_NOTLOADED.
BOOL CScanBaseBuffer::CheckAndSetBufferSize | ( | ) |
Definition at line 613 of file ScanBaseBuffer.cpp.
References m_dwMemoryAllocated, m_dwPixels, and m_pwData.
Definition at line 455 of file ScanBaseBuffer.cpp.
References AllocateDataBuffer(), Copy(), IsUsableOutputBufferFor(), m_pwData, and ReleaseAllBuffers().
Referenced by CScanFilterThreshold::Apply(), CScanFilterTest::Apply(), CScanFilterSwapQuadrants::Apply(), CScanFilterShift::Apply(), CScanFilterNCCFFTOld::Apply(), CScanFilterNCCFFT::Apply(), CScanFilterMinimum::Apply(), CScanFilterMedian::Apply(), CScanFilterMean::Apply(), CScanFilterMaximum::Apply(), CScanFilterMath::Apply(), CScanFilterLowPass::Apply(), CScanFilterKuwahara::Apply(), CScanFilterHighPass::Apply(), CScanFilterFFTInverse::Apply(), CScanFilterFFT::Apply(), CScanFilterErosion::Apply(), CScanFilterDZ::Apply(), CScanFilterDilation::Apply(), CScanFilterDifferential_LbL::Apply(), CScanFilterDifferential::Apply(), CScanFilterCustom::Apply(), CScanFilterClip::Apply(), CScanFilterClad::Apply(), CScanFilterBinaryThreshold::Apply(), CScanFilterBgsDiff_LbL::Apply(), CScanFilterBgsDiff::Apply(), CScanFilterBGS_MCN::Apply(), CScanFilterBGS_LbL::Apply(), CScanFilterAutoCorrelate::Apply(), CScanFilterNull::ApplyCore(), CScanFilterBGS_Planar::ApplyCore(), CScanFilterCrossCorrelateF::PreApply(), CScanFilterCrossCorrelate2::PreApply(), CScanFilterCrossCorrelate::PreApply(), and CScanFilterLinearRegression::PreApplyCore().
void CScanBaseBuffer::Copy | ( | const Self & | rhs | ) | [protected] |
Definition at line 229 of file ScanBaseBuffer.cpp.
References m_csBufferName, m_csDataName, m_csDataUnit, m_dAvg, m_dDataScaleFactor, m_dScanAngle, m_dSecMom, m_dSlopeX, m_dSlopeY, m_dwFlags, m_dwMemoryAllocated, m_dwOrgScanXSize, m_dwOrgScanYSize, m_dwParameterMask, m_dwPixelCount, m_dwPixelOffset, m_dwPixels, m_dwSizeX, m_dwSizeY, m_dXStepSize, m_dYStepSize, m_liEditIndex, m_liRAWIndex, m_nDataOffset, m_nMaxZ, m_nMinZ, m_pdFourierL2R, m_pdFourierR2L, and m_pwData.
Referenced by CreateOutputBufferFor(), CScanBaseBuffer(), and operator=().
StatusType CScanBaseBuffer::m_eStatus [protected] |
).
This status is used by the application to handle the data buffers. There are two types of buffer usages
For in-memory filters, the application sets the status for the output buffer to SB_TEMP
. The application deletes this temporary buffer when it moves to another frame.
For normal (interactive) filters, the application sets the status for the output buffer to SB_NEW
. After closing the filter's dialog with OK, the application writes the buffer's contents to disk.
See also tStatus.
Definition at line 567 of file ScanBaseBuffer.h.
Referenced by CScanBaseBuffer(), IsEmptyBuffer(), IsInMemoryBuffer(), IsLoadedBuffer(), IsModifiedBuffer(), and IsNewBuffer().