WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
IWPOCTConverter Class Referenceabstract

Class to convert data obtained from a line scan camera into meaningful 2D OCT image data. More...

#include <IWPOCTConverter.h>

Inheritance diagram for IWPOCTConverter:
Inheritance graph
[legend]
Collaboration diagram for IWPOCTConverter:
Collaboration graph
[legend]

Public Types

enum  ErrorCode {
  NoError = 0 , NullPointer = 1 , FileReadError = 2 , FileWriteError = 3 ,
  FileOrDirNotFound = 4 , InvalidFileOrDirName = 5 , InvalidArgumentValue = 6 , MemoryAllocationError = 7 ,
  BackgroundUpdateError = 8 , ConversionError = 9 , CompatibleGraphicsCardNotFound = 10 , StartOpenCLError = 11 ,
  ScanProcessorInitError = 12 , DongleNotFound = 13 , NumErrors = 14 , NoError = 0 ,
  NullPointer = 1 , FileReadError = 2 , FileWriteError = 3 , FileOrDirNotFound = 4 ,
  InvalidFileOrDirName = 5 , InvalidArgumentValue = 6 , MemoryAllocationError = 7 , BackgroundUpdateError = 8 ,
  ConversionError = 9 , CompatibleGraphicsCardNotFound = 10 , StartOpenCLError = 11 , ScanProcessorInitError = 12 ,
  DongleNotFound = 13 , NumErrors = 14
}
 The following are error codes that are used within the converter object. More...
 
enum class  ErrorCode {
  NoError = 0 , NullPointer = 1 , FileReadError = 2 , FileWriteError = 3 ,
  FileOrDirNotFound = 4 , InvalidFileOrDirName = 5 , InvalidArgumentValue = 6 , MemoryAllocationError = 7 ,
  BackgroundUpdateError = 8 , ConversionError = 9 , CompatibleGraphicsCardNotFound = 10 , StartOpenCLError = 11 ,
  ScanProcessorInitError = 12 , DongleNotFound = 13 , NumErrors = 14 , NoError = 0 ,
  NullPointer = 1 , FileReadError = 2 , FileWriteError = 3 , FileOrDirNotFound = 4 ,
  InvalidFileOrDirName = 5 , InvalidArgumentValue = 6 , MemoryAllocationError = 7 , BackgroundUpdateError = 8 ,
  ConversionError = 9 , CompatibleGraphicsCardNotFound = 10 , StartOpenCLError = 11 , ScanProcessorInitError = 12 ,
  DongleNotFound = 13 , NumErrors = 14
}
 

Public Member Functions

virtual const char * GetQualifiedInputFileName () const =0
 Get the fully qualified input file name (includes path and file name). More...
 
virtual const char * GetOutputIntensityName () const =0
 Get the output intensity file name (no path). More...
 
virtual const char * GetOutputPhaseName () const =0
 Get the output phase file name (no path). More...
 
virtual const char * GetOutputDirectory () const =0
 Get the output directory. More...
 
virtual const char * GetCalibrationFringeFile () const =0
 Get the calibration fringe file name. More...
 
virtual bool GetOutputIntensity () const =0
 Get the flag that determines if intensity is output. More...
 
virtual bool GetOutputPhase () const =0
 Get the flag that determines if phase is output. More...
 
virtual bool GetDeleteInputFileAfterConversion () const =0
 Get the flag that determines if the RAW spectral input file is deleted after data is converted. More...
 
virtual bool GetOutputTiffFormat () const =0
 Get the flag that determines if the output files will be in Tiff format. More...
 
virtual bool GetOutputLogOfData () const =0
 Get the flag that determines if the log of the output data is taken/used. More...
 
virtual bool GetUseScaling () const =0
 Get the flag that determines if scaling is used on the output. More...
 
virtual bool GetUseContrast () const =0
 Get the flag that determines if contrast is used on the output. More...
 
virtual int GetAScansPerBScan () const =0
 Get the number of A-scans per B-scan. More...
 
virtual int GetAScanSize () const =0
 Get the size of an A-scan. More...
 
virtual int GetAScanAverage () const =0
 Gets the number of averages in an A-scan. More...
 
virtual bool GetScanDimensions (int *width, int *height) const =0
 Gets the width and height of the input data to be converted. More...
 
virtual bool GetDispersionCoefficients (float *coefficients, int length) const =0
 Get the dispersion coefficients. More...
 
virtual bool GetNumberOfLinesToIgnore (int *top, int *bottom) const =0
 Get the top and bottom number of lines to ignore. More...
 
virtual bool GetMinMaxScaling (float *min, float *max) const =0
 Gets the min and max scaling values. More...
 
virtual int GetNumScanProcessors () const =0
 Get the number of scan processors currently in use. More...
 
virtual bool GetUseMovingAverage () const =0
 Gets the flag that indicates if a moving average is being output by conversions. More...
 
virtual int GetMovingAverageWindowSize () const =0
 Gets the window size of the moving average. More...
 
virtual bool SetQualifiedInputFileName (const char *name)=0
 Sets the fully qualified file name (includes path) of the raw spectral data to be converted. More...
 
virtual bool SetOutputIntensityName (const char *name)=0
 Set the intensity file name (no path). More...
 
virtual bool SetOutputPhaseName (const char *name)=0
 Set the phase file name (no path). More...
 
virtual bool SetOutputDirectory (const char *name)=0
 Sets the output directory (including the drive letter) where processed data is written. More...
 
virtual bool SetCalibrationFringeFile (const char *name)=0
 Set the calibration fringe file name. More...
 
virtual bool UpdateBackgroundImage ()=0
 Updates a flag so that the background image used for background subtraction is updated with the average of the image the next time a conversion is run. More...
 
virtual bool GetBackgroundImage (float *buffer, int size)=0
 
virtual bool SetBackgroundImage (float *buffer, int size)=0
 Updates the background image to the buffer passed in. More...
 
virtual bool SetOutputIntensity (bool value)=0
 Set the flag that determines if intensity is output. More...
 
virtual bool SetOutputPhase (bool value)=0
 Set the flag that determines if phase is output. More...
 
virtual bool SetDeleteInputFileAfterConversion (bool value)=0
 Set the flag that determines if the RAW input file is deleted after data is converted. More...
 
virtual bool SetOutputTiffFormat (bool value)=0
 Set the flag that determines if the output files will be in Tiff format. More...
 
virtual bool SetOutputLogOfData (bool value)=0
 Set the flag that determines if the log of the output data is computed. More...
 
virtual bool SetUseScaling (bool value)=0
 Sets the flag that determines if scaling is used to adjust the output. More...
 
virtual bool SetUseContrast (bool value)=0
 Sets the flag that determines if the contrast is adjusted on the output. More...
 
virtual bool SetAScansPerBScan (int value)=0
 Sets the number of A-scans per B-scan. More...
 
virtual bool SetAScanSize (int value)=0
 Sets the size of an A-scan. More...
 
virtual bool SetAScanAverage (int value)=0
 Sets the number of A-scans that are averaged together in the output. More...
 
virtual bool SetScanDimensions (int aScansPerBScan, int aScanSize)=0
 Sets the width and height of a scan. More...
 
virtual bool SetDispersionCoefficients (const float *coefficients, int length)=0
 Set the dispersion coefficients. More...
 
virtual bool SetDispersionOptimizationParameters (int numCoefficients, int maxIterations, float *initialGuesses, int startLine, int stopLine, int offset)=0
 Set the values that are used to calculate the optimal dispersion coefficients. More...
 
virtual bool SetNumberOfLinesToIgnore (int top, int bottom)=0
 Sets the top and bottom number of lines to ignore in the processed image. More...
 
virtual bool SetMinMaxScaling (float min, float max)=0
 Sets the min and max scaling values. More...
 
virtual bool SetNumScanProcessors (int value)=0
 Set the number of scan processors currently in use. More...
 
virtual bool SetUseMovingAverage (bool value)=0
 Enables or disables the output moving average. More...
 
virtual bool SetMovingAverageWindowSize (int value)=0
 Sets the window size of the moving average. More...
 
virtual bool ResetMovingAverage ()=0
 Resets the moving average by clearing the buffers. More...
 
virtual bool ConvertSpectralDataToIntensity (IWPOCTInOutData *inOutData)=0
 Convert raw spectral data to intensity array. More...
 
virtual bool ConvertSpectralDataToIntensity (const unsigned short *inData, float *outIntensity)=0
 Convert raw spectral data to intensity array. More...
 
virtual bool ConvertSpectralDataToPhaseIntensity (IWPOCTInOutData *inOutData)=0
 Converts raw spectral data to intensity and phase arrays. More...
 
virtual bool ConvertSpectralDataToPhaseIntensity (const unsigned short *inData, float *outIntensity, float *outPhase)=0
 Converts raw spectral data to intensity and phase arrays. More...
 
virtual bool ConvertSpectralFileToPhaseIntensity ()=0
 Converts raw spectral data contained in a file to intensity and/or phase files. More...
 
virtual bool ConvertSpectralFileToPhaseIntensity (const char *qualifiedFileName)=0
 Converts raw spectral data contained in a file to intensity and/or phase files. More...
 
virtual bool ConvertSpectralDirToPhaseIntensity ()=0
 Converts raw spectral data files contained in a directory to intensity and/or phase files. More...
 
virtual bool ConvertFloatToUnsignedChar (const float *inData, unsigned char *outData, int size) const =0
 Converts an array of float data to unsigned char data. More...
 
virtual bool ConvertFloatToUnsignedShort (const float *inData, unsigned short *outData, int size) const =0
 Converts an array of float data to unsigned short data. More...
 
virtual bool TransposeArray (const float *inData, float *outData, int inWidth, int inHeight) const =0
 Transpose an array of floats. More...
 
virtual bool TransposeArray (const unsigned short *inData, unsigned short *outData, int inWidth, int inHeight) const =0
 Transpose an array of shorts. More...
 
virtual bool TransposeArray (const unsigned char *src, unsigned char *dst, int inWidth, int inHeight) const =0
 Transpose an array of bytes. More...
 
virtual bool FlipVertical (unsigned short *data, int width, int height) const =0
 Flips an array (image) around its horizontal axis. More...
 
virtual bool FlipHorizontal (unsigned short *data, int width, int height) const =0
 Flips an array (image) around its vertical axis. More...
 
virtual bool RotateImage (const unsigned short *inData, unsigned short *outData, int width, int height, unsigned int cw90Multiplier) const =0
 Rotates an image by 0, 90, 180, or 270 degrees. More...
 
virtual bool CalcDispersionCoefficients (const unsigned short *inData, int width, int height, float *coefficients)=0
 Calculates the optimal dispersion coefficients. More...
 
virtual IWPOCTConverter::ErrorCode GetLastError () const =0
 Gets the result of the most current operation. More...
 
virtual void Dispose ()
 
virtual string GetQualifiedInputFileName ()
 
virtual string GetOutputIntensityName ()
 
virtual string GetOutputPhaseName ()
 
virtual string GetOutputDirectory ()
 
virtual string GetCalibrationFringeFile ()
 
virtual bool GetOutputIntensity ()
 
virtual bool GetOutputPhase ()
 
virtual bool GetDeleteInputFileAfterConversion ()
 
virtual bool GetOutputTiffFormat ()
 
virtual bool GetOutputLogOfData ()
 
virtual bool GetUseScaling ()
 
virtual bool GetUseContrast ()
 
virtual int GetAScansPerBScan ()
 
virtual int GetAScanSize ()
 
virtual int GetAScanAverage ()
 
virtual bool GetScanDimensions (ref int aScansPerBScan, ref int aScanSize)
 
unsafe bool GetDispersionCoefficients (float[] coefficients, int length)
 
virtual bool GetNumberOfLinesToIgnore (ref int top, ref int bottom)
 
virtual bool GetMinMaxScaling (ref float min, ref float max)
 
virtual int GetNumScanProcessors ()
 
virtual bool GetUseMovingAverage ()
 
virtual int GetMovingAverageWindowSize ()
 
virtual bool SetQualifiedInputFileName (string name)
 
virtual bool SetOutputIntensityName (string name)
 
virtual bool SetOutputPhaseName (string name)
 
virtual bool SetOutputDirectory (string name)
 
virtual bool SetCalibrationFringeFile (string name)
 
virtual bool UpdateBackgroundImage ()
 
unsafe bool GetBackgroundImage (float[] buffer, int size)
 
unsafe bool SetBackgroundImage (float[] buffer, int size)
 
virtual bool SetOutputIntensity (bool value)
 
virtual bool SetOutputPhase (bool value)
 
virtual bool SetDeleteInputFileAfterConversion (bool value)
 
virtual bool SetOutputTiffFormat (bool value)
 
virtual bool SetOutputLogOfData (bool value)
 
virtual bool SetUseScaling (bool value)
 
virtual bool SetUseContrast (bool value)
 
virtual bool SetAScansPerBScan (int value)
 
virtual bool SetAScanSize (int value)
 
virtual bool SetAScanAverage (int value)
 
virtual bool SetScanDimensions (int aScansPerBScan, int aScanSize)
 
unsafe bool SetDispersionCoefficients (float[] coefficients, int length)
 
unsafe bool CalcDispersionCoefficients (ushort[] inData, int width, int height, float[] coefficients)
 
unsafe bool SetDispersionOptimizationParameters (int numCoefficients, int maxIterations, float[] initialGuesses, int startLine, int stopLine, int offset)
 
virtual bool SetNumberOfLinesToIgnore (int top, int bottom)
 
virtual bool SetMinMaxScaling (float min, float max)
 
virtual bool SetNumScanProcessors (int value)
 
virtual bool SetUseMovingAverage (bool value)
 
virtual bool SetMovingAverageWindowSize (int value)
 
virtual bool ResetMovingAverage ()
 
unsafe bool ConvertSpectralDataToIntensity (IWPOCTInOutData inOutData)
 
unsafe bool ConvertSpectralDataToIntensity (ushort[] inData, float[] outIntensity)
 
unsafe bool ConvertSpectralDataToPhaseIntensity (IWPOCTInOutData inOutData)
 
unsafe bool ConvertSpectralDataToPhaseIntensity (ushort[] inData, float[] outIntensity, float[] outPhase)
 
virtual bool ConvertSpectralFileToPhaseIntensity ()
 
virtual bool ConvertSpectralFileToPhaseIntensity (string qualifiedFileName)
 
virtual bool ConvertSpectralDirToPhaseIntensity ()
 
unsafe bool ConvertFloatToUnsignedChar (float[] inData, byte[] outData, int size)
 
unsafe bool ConvertFloatToUnsignedShort (float[] inData, ushort[] outData, int size)
 
unsafe bool TransposeArray (float[] src, float[] dst, int inWidth, int inHeight)
 
unsafe bool TransposeArray (ushort[] src, ushort[] dst, int inWidth, int inHeight)
 
unsafe bool TransposeArray (byte[] src, byte[] dst, int inWidth, int inHeight)
 
unsafe bool FlipVertical (ushort[] data, int width, int height)
 
unsafe bool FlipHorizontal (ushort[] data, int width, int height)
 
unsafe bool RotateImage (ushort[] inData, ushort[] outData, int width, int height, uint cw90Multiplier)
 
virtual IWPOCTConverter.ErrorCode GetLastError ()
 

Static Public Member Functions

static IWPOCTConverter GetOCTConverter ()
 
static bool DestroyOCTConverter ()
 

Protected Attributes

bool swigCMemOwn
 

Detailed Description

Class to convert data obtained from a line scan camera into meaningful 2D OCT image data.

Creation Commands

These commands create one of two object types and pass back a pointer to the object, which can then be used to call the worker APIs.

The two object types are:

Get Commands

The Get commands return some piece of information about the object that called it. The object’s state does not change when calling one of these commands.

Conversion Commands

Conversion routines perform the bulk of the work by converting raw spectral data to intensity data and possibly phase data. The data can be in memory or in a file. These routines can also convert an entire directory of files.

Transformation Commands

These commands transform an array of data that is an image by transposing the contents, or rotating or flipping the image.

Calculation Commands

Calculation routines provide the user with parameter values relevant to processing OCT data. Currently the only command available determines the optimal dispersion values for an input image and supplied dispersion calculation parameters.

Status Commands

The status API returns the current status of the converter. It can be used to ensure the converter is working properly.

Member Enumeration Documentation

◆ ErrorCode

The following are error codes that are used within the converter object.

They are part of the ErrorCode enum, which can be employed by the user. One code will be returned when calling GetLastError().

Member Function Documentation

◆ CalcDispersionCoefficients()

virtual bool IWPOCTConverter::CalcDispersionCoefficients ( const unsigned short *  inData,
int  width,
int  height,
float *  coefficients 
)
pure virtual

Calculates the optimal dispersion coefficients.

The dispersion optimization parameters should be set before calling this API.

Parameters
dataIn[in]pointer to the const input data array.
width[in]the input data width
height[in]the input data height
coefficients[out]The array in which the calculated dispersion coefficients are placed. @Returns true if successful

Implemented in WPScanConverter.

◆ ConvertFloatToUnsignedChar()

virtual bool IWPOCTConverter::ConvertFloatToUnsignedChar ( const float *  inData,
unsigned char *  outData,
int  size 
) const
pure virtual

Converts an array of float data to unsigned char data.

Data is scaled based on the min and max values in the input array. The user must allocate both arrays.

Parameters
inData[in]pointer to the input data array.
outData[out]pointer to the output data array.
size[in]the number of entries in each array @Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertFloatToUnsignedShort()

virtual bool IWPOCTConverter::ConvertFloatToUnsignedShort ( const float *  inData,
unsigned short *  outData,
int  size 
) const
pure virtual

Converts an array of float data to unsigned short data.

Data is scaled based on the min and max values in the input array. The user must allocate both arrays.

Parameters
inData[in]pointer to the input data array.
outData[out]pointer to the output data array.
size[in]the number of entries in each array @Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertSpectralDataToIntensity() [1/2]

virtual bool IWPOCTConverter::ConvertSpectralDataToIntensity ( const unsigned short *  inData,
float *  outIntensity 
)
pure virtual

Convert raw spectral data to intensity array.


Parameters
inData[in]A pointer to a const unsigned short int array that contains the camera data.
outIntensity[out]A pointer to a float array. The intensity output of the conversion will be placed in this array. @Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertSpectralDataToIntensity() [2/2]

virtual bool IWPOCTConverter::ConvertSpectralDataToIntensity ( IWPOCTInOutData inOutData)
pure virtual

Convert raw spectral data to intensity array.


Parameters
inOutData[inOut]A pointer to an inOutData object. This object should have the raw data set as well as the intensity data. The intensity data should be allocated by the user. @Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertSpectralDataToPhaseIntensity() [1/2]

virtual bool IWPOCTConverter::ConvertSpectralDataToPhaseIntensity ( const unsigned short *  inData,
float *  outIntensity,
float *  outPhase 
)
pure virtual

Converts raw spectral data to intensity and phase arrays.


Parameters
inData[in]A pointer to a const unsigned short int array that contains the camera data.
outIntensity[out]A pointer to a float array. The intensity output of the conversion will be placed in this array.
outPhase[out]A pointer to a float array. The phase output of the conversion will be placed in this array. @Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertSpectralDataToPhaseIntensity() [2/2]

virtual bool IWPOCTConverter::ConvertSpectralDataToPhaseIntensity ( IWPOCTInOutData inOutData)
pure virtual

Converts raw spectral data to intensity and phase arrays.


Parameters
inOutData[inOut]A pointer to an inOutData object. This object should have the raw data set as well as the intensity and phase data. The intensity and phase data should be allocated by the user. @Returns true if successful

Implemented in WPScanConverter.

◆ ConvertSpectralDirToPhaseIntensity()

virtual bool IWPOCTConverter::ConvertSpectralDirToPhaseIntensity ( )
pure virtual

Converts raw spectral data files contained in a directory to intensity and/or phase files.

The file name is set using the SetQualifiedInputFileName API. Files should have an ascending number associated with them. See the sample data for an example.
@Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertSpectralFileToPhaseIntensity() [1/2]

virtual bool IWPOCTConverter::ConvertSpectralFileToPhaseIntensity ( )
pure virtual

Converts raw spectral data contained in a file to intensity and/or phase files.

The file name is set using the SetQualifiedInputFileName API. @Returns true if successful.

Implemented in WPScanConverter.

◆ ConvertSpectralFileToPhaseIntensity() [2/2]

virtual bool IWPOCTConverter::ConvertSpectralFileToPhaseIntensity ( const char *  qualifiedFileName)
pure virtual

Converts raw spectral data contained in a file to intensity and/or phase files.


@Returns true if successful.

Implemented in WPScanConverter.

◆ FlipHorizontal()

virtual bool IWPOCTConverter::FlipHorizontal ( unsigned short *  data,
int  width,
int  height 
) const
pure virtual

Flips an array (image) around its vertical axis.

This is an inplace transformation.

Parameters
data[inOut]pointer to the input data array.
width[in]the input data width
height[in]the input data height @Returns true if successful.

Implemented in WPScanConverter.

◆ FlipVertical()

virtual bool IWPOCTConverter::FlipVertical ( unsigned short *  data,
int  width,
int  height 
) const
pure virtual

Flips an array (image) around its horizontal axis.

This is an inplace transformation.

Parameters
data[inOut]pointer to the input data array.
width[in]the input data width
height[in]the input data height @Returns true if successful.

Implemented in WPScanConverter.

◆ GetAScanAverage()

virtual int IWPOCTConverter::GetAScanAverage ( ) const
pure virtual

Gets the number of averages in an A-scan.

Default is 1. The output width is decreased as this number increases. For example, when the value is 2, every 2 A-scans in the output are averaged into 1 A-scan.

Returns
the number of A-scan averages

Implemented in WPScanConverter.

◆ GetAScanSize()

virtual int IWPOCTConverter::GetAScanSize ( ) const
pure virtual

Get the size of an A-scan.

This often relates to the resolution of the line scan camera.

Returns
the size of the A-scan

Implemented in WPScanConverter.

◆ GetAScansPerBScan()

virtual int IWPOCTConverter::GetAScansPerBScan ( ) const
pure virtual

Get the number of A-scans per B-scan.

Returns
number of A-scans per B-scan

Implemented in WPScanConverter.

◆ GetBackgroundImage()

virtual bool IWPOCTConverter::GetBackgroundImage ( float *  buffer,
int  size 
)
pure virtual
Returns
true on success

Implemented in WPScanConverter.

◆ GetCalibrationFringeFile()

virtual const char* IWPOCTConverter::GetCalibrationFringeFile ( ) const
pure virtual

Get the calibration fringe file name.

Returns
Array of characters that contain the name

Implemented in WPScanConverter.

◆ GetDeleteInputFileAfterConversion()

virtual bool IWPOCTConverter::GetDeleteInputFileAfterConversion ( ) const
pure virtual

Get the flag that determines if the RAW spectral input file is deleted after data is converted.

Default is false.

Returns
true if raw file is deleted after conversion is completed

Implemented in WPScanConverter.

◆ GetDispersionCoefficients()

virtual bool IWPOCTConverter::GetDispersionCoefficients ( float *  coefficients,
int  length 
) const
pure virtual

Get the dispersion coefficients.

Parameters
coefficients[out]pointer to a float array that will receive the dispersion coefficients.
length[in]the number of coefficients to retrieve
Returns
true on success

Implemented in WPScanConverter.

◆ GetLastError()

virtual IWPOCTConverter::ErrorCode IWPOCTConverter::GetLastError ( ) const
pure virtual

Gets the result of the most current operation.

Returns
error code

Implemented in WPScanConverter.

◆ GetMinMaxScaling()

virtual bool IWPOCTConverter::GetMinMaxScaling ( float *  min,
float *  max 
) const
pure virtual

Gets the min and max scaling values.

These values affect the windowing of the output image intensity values.

Parameters
min[out]pointer to a float that will receive the minimum scaling value
max[out]pointer to a float that will receive the maximum scaling value
Returns
true on success

Implemented in WPScanConverter.

◆ GetMovingAverageWindowSize()

virtual int IWPOCTConverter::GetMovingAverageWindowSize ( ) const
pure virtual

Gets the window size of the moving average.

Returns
the moving average window size

Implemented in WPScanConverter.

◆ GetNumberOfLinesToIgnore()

virtual bool IWPOCTConverter::GetNumberOfLinesToIgnore ( int *  top,
int *  bottom 
) const
pure virtual

Get the top and bottom number of lines to ignore.

Parameters
top[out]pointer to an int that will receive the number of input lines to ignore on the top of the image
bottom[out]pointer to an int that will receive the number of input lines to ignore on the bottom
Returns
true on success

Implemented in WPScanConverter.

◆ GetNumScanProcessors()

virtual int IWPOCTConverter::GetNumScanProcessors ( ) const
pure virtual

Get the number of scan processors currently in use.

The default is 1.
The value is always 1 or greater.

Returns
number of scan processors

Implemented in WPScanConverter.

◆ GetOutputDirectory()

virtual const char* IWPOCTConverter::GetOutputDirectory ( ) const
pure virtual

Get the output directory.

Returns
Array of characters that contain the drive and directory name (path)

Implemented in WPScanConverter.

◆ GetOutputIntensity()

virtual bool IWPOCTConverter::GetOutputIntensity ( ) const
pure virtual

Get the flag that determines if intensity is output.

Default is true.

Returns
true if intensity is output by the converter

Implemented in WPScanConverter.

◆ GetOutputIntensityName()

virtual const char* IWPOCTConverter::GetOutputIntensityName ( ) const
pure virtual

Get the output intensity file name (no path).

Returns
Array of characters that contain the name

Implemented in WPScanConverter.

◆ GetOutputLogOfData()

virtual bool IWPOCTConverter::GetOutputLogOfData ( ) const
pure virtual

Get the flag that determines if the log of the output data is taken/used.

Default is true.

Returns
true if the log of the data values is computed and output

Implemented in WPScanConverter.

◆ GetOutputPhase()

virtual bool IWPOCTConverter::GetOutputPhase ( ) const
pure virtual

Get the flag that determines if phase is output.

Default is false.

Returns
true if phase is output by the converter

Implemented in WPScanConverter.

◆ GetOutputPhaseName()

virtual const char* IWPOCTConverter::GetOutputPhaseName ( ) const
pure virtual

Get the output phase file name (no path).

Returns
Array of characters that contain the name

Implemented in WPScanConverter.

◆ GetOutputTiffFormat()

virtual bool IWPOCTConverter::GetOutputTiffFormat ( ) const
pure virtual

Get the flag that determines if the output files will be in Tiff format.

Default is false.

Returns
true if files are output in tiff format

Implemented in WPScanConverter.

◆ GetQualifiedInputFileName()

virtual const char* IWPOCTConverter::GetQualifiedInputFileName ( ) const
pure virtual

Get the fully qualified input file name (includes path and file name).

Returns
Array of characters that contain the name

Implemented in WPScanConverter.

◆ GetScanDimensions()

virtual bool IWPOCTConverter::GetScanDimensions ( int *  width,
int *  height 
) const
pure virtual

Gets the width and height of the input data to be converted.

Parameters
width[out]pointer to an int that will receive the input width of data to be converted
height[out]pointer to an int that will receive the input height of data to be converted
Returns
true on success

Implemented in WPScanConverter.

◆ GetUseContrast()

virtual bool IWPOCTConverter::GetUseContrast ( ) const
pure virtual

Get the flag that determines if contrast is used on the output.

Default is false.

Returns
true if auto contrast is computed and output

Implemented in WPScanConverter.

◆ GetUseMovingAverage()

virtual bool IWPOCTConverter::GetUseMovingAverage ( ) const
pure virtual

Gets the flag that indicates if a moving average is being output by conversions.

Returns
true if themoving average is being output

Implemented in WPScanConverter.

◆ GetUseScaling()

virtual bool IWPOCTConverter::GetUseScaling ( ) const
pure virtual

Get the flag that determines if scaling is used on the output.

Default is true.

Returns
true if scaling values are used to compute the output

Implemented in WPScanConverter.

◆ ResetMovingAverage()

virtual bool IWPOCTConverter::ResetMovingAverage ( )
pure virtual

Resets the moving average by clearing the buffers.


Returns
true on success

Implemented in WPScanConverter.

◆ RotateImage()

virtual bool IWPOCTConverter::RotateImage ( const unsigned short *  inData,
unsigned short *  outData,
int  width,
int  height,
unsigned int  cw90Multiplier 
) const
pure virtual

Rotates an image by 0, 90, 180, or 270 degrees.


Parameters
inData[in]pointer to the input data array.
outData[out]pointer to the output data array.
width[in]the input data width
height[in]the input data height
cw90Multiplier[in]determines the amount of rotation. The number supplied is multiplied by 90 degrees. @Returns true if successful.

Implemented in WPScanConverter.

◆ SetAScanAverage()

virtual bool IWPOCTConverter::SetAScanAverage ( int  value)
pure virtual

Sets the number of A-scans that are averaged together in the output.

Default is 1.

Returns
true on success

Implemented in WPScanConverter.

◆ SetAScanSize()

virtual bool IWPOCTConverter::SetAScanSize ( int  value)
pure virtual

Sets the size of an A-scan.

This is known as the camera depth (typical value is 2048) and can be viewed as the width of the input data and half the height of the output data.

Returns
true if value is greater than 0 and less than or equal to 8192

Implemented in WPScanConverter.

◆ SetAScansPerBScan()

virtual bool IWPOCTConverter::SetAScansPerBScan ( int  value)
pure virtual

Sets the number of A-scans per B-scan.

This can be viewed as the height of the input data and the width of the output data.

Returns
true if greater than 0 and <= 65000

Implemented in WPScanConverter.

◆ SetBackgroundImage()

virtual bool IWPOCTConverter::SetBackgroundImage ( float *  buffer,
int  size 
)
pure virtual

Updates the background image to the buffer passed in.

The size of this buffer should be AScanSize.

Parameters
buffer[in]a float array that the holds the new background image
size[in]int that specifies the size of the buffer
Returns
true on success

Implemented in WPScanConverter.

◆ SetCalibrationFringeFile()

virtual bool IWPOCTConverter::SetCalibrationFringeFile ( const char *  name)
pure virtual

Set the calibration fringe file name.


Returns
true if file exists

Implemented in WPScanConverter.

◆ SetDeleteInputFileAfterConversion()

virtual bool IWPOCTConverter::SetDeleteInputFileAfterConversion ( bool  value)
pure virtual

Set the flag that determines if the RAW input file is deleted after data is converted.

Default is false.

Returns
true

Implemented in WPScanConverter.

◆ SetDispersionCoefficients()

virtual bool IWPOCTConverter::SetDispersionCoefficients ( const float *  coefficients,
int  length 
)
pure virtual

Set the dispersion coefficients.


Parameters
dispersionCoeffients[in]pointer to float array that contains the dispersion coefficients.
length[in]the number of coefficients in the array
Returns
true on success

Implemented in WPScanConverter.

◆ SetDispersionOptimizationParameters()

virtual bool IWPOCTConverter::SetDispersionOptimizationParameters ( int  numCoefficients,
int  maxIterations,
float *  initialGuesses,
int  startLine,
int  stopLine,
int  offset 
)
pure virtual

Set the values that are used to calculate the optimal dispersion coefficients.

Parameters
numCoefficients[in]the number of coefficients to calculate (2 is typical).
maxIterations[in]the number of iterations used to calculate each coefficient.
Accuracy improves and calculation time increases with larger values.
initialGuesses[in]array of starting dispersion guesses. Except for small values, each starting guess must be at least half of the actual value. Usually, two values are supplied here. Setting values after the first one to zero usually works.
startLine[in]the starting row of the area of the output image that is examined.
stopLine[in]the ending row of the area of the output image that is examined.
offset[in]currently unused
Returns
true on success

Implemented in WPScanConverter.

◆ SetMinMaxScaling()

virtual bool IWPOCTConverter::SetMinMaxScaling ( float  min,
float  max 
)
pure virtual

Sets the min and max scaling values.

These values should range from 0 to 1 and define the limits of the values in the output intensity. A smaller min value will show more lower intensity values. A smaller max value will scale the intensity values more. The min value should be less than the max value. @true if valid values were supplied

Implemented in WPScanConverter.

◆ SetMovingAverageWindowSize()

virtual bool IWPOCTConverter::SetMovingAverageWindowSize ( int  value)
pure virtual

Sets the window size of the moving average.

Returns
true on success

Implemented in WPScanConverter.

◆ SetNumberOfLinesToIgnore()

virtual bool IWPOCTConverter::SetNumberOfLinesToIgnore ( int  top,
int  bottom 
)
pure virtual

Sets the top and bottom number of lines to ignore in the processed image.

Returns
true if valid values were supplied

Implemented in WPScanConverter.

◆ SetNumScanProcessors()

virtual bool IWPOCTConverter::SetNumScanProcessors ( int  value)
pure virtual

Set the number of scan processors currently in use.


Parameters
value[in]The number of scan processors to use. The value should be 1 or larger. This value determines how many concurrent conversion operations can occur at once. A good way to use this feature is to make the number of scan processors and the number of threads equal, but the user should experiment with different values. The number of cores the application should use can also factor into the decision. Each call to a conversion routine (which are the most time-consuming) will use the next scan processor in a circular fashion. You want to be sure a scan processor is available before calling a conversion routine.
Returns
true if the value is between 1 and 8.

Implemented in WPScanConverter.

◆ SetOutputDirectory()

virtual bool IWPOCTConverter::SetOutputDirectory ( const char *  name)
pure virtual

Sets the output directory (including the drive letter) where processed data is written.

Returns
true

Implemented in WPScanConverter.

◆ SetOutputIntensity()

virtual bool IWPOCTConverter::SetOutputIntensity ( bool  value)
pure virtual

Set the flag that determines if intensity is output.

Default is true.

Returns
true

Implemented in WPScanConverter.

◆ SetOutputIntensityName()

virtual bool IWPOCTConverter::SetOutputIntensityName ( const char *  name)
pure virtual

Set the intensity file name (no path).

Returns
true if name is not empty and a valid filename

Implemented in WPScanConverter.

◆ SetOutputLogOfData()

virtual bool IWPOCTConverter::SetOutputLogOfData ( bool  value)
pure virtual

Set the flag that determines if the log of the output data is computed.

The log of the data is often used to compress the values. Default is true.

Returns
true

Implemented in WPScanConverter.

◆ SetOutputPhase()

virtual bool IWPOCTConverter::SetOutputPhase ( bool  value)
pure virtual

Set the flag that determines if phase is output.

Default is false.

Returns
true

Implemented in WPScanConverter.

◆ SetOutputPhaseName()

virtual bool IWPOCTConverter::SetOutputPhaseName ( const char *  name)
pure virtual

Set the phase file name (no path).

Returns
true if name is not empty and a valid filename

Implemented in WPScanConverter.

◆ SetOutputTiffFormat()

virtual bool IWPOCTConverter::SetOutputTiffFormat ( bool  value)
pure virtual

Set the flag that determines if the output files will be in Tiff format.

Default is false.

Returns
true if set AND Tiff capabilities are available

Implemented in WPScanConverter.

◆ SetQualifiedInputFileName()

virtual bool IWPOCTConverter::SetQualifiedInputFileName ( const char *  name)
pure virtual

Sets the fully qualified file name (includes path) of the raw spectral data to be converted.

If the output directory is empty or has not been set, then the output directory is set to the directory of the input file.

Returns
true if file name exists at specified directory

Implemented in WPScanConverter.

◆ SetScanDimensions()

virtual bool IWPOCTConverter::SetScanDimensions ( int  aScansPerBScan,
int  aScanSize 
)
pure virtual

Sets the width and height of a scan.

This can be used in lieu of the two calls above.

Parameters
width[in]int that specifies the input conversion width
height[in]int that specifies the input conversion height
Returns
true if valid values were supplied

Implemented in WPScanConverter.

◆ SetUseContrast()

virtual bool IWPOCTConverter::SetUseContrast ( bool  value)
pure virtual

Sets the flag that determines if the contrast is adjusted on the output.

Using this feature will spread out the output values to use the full range of values. This feature is disabled if GetUseScaling is false.
Default is false.

Returns
true if turning contrast off or if GetUseScaling is true

Implemented in WPScanConverter.

◆ SetUseMovingAverage()

virtual bool IWPOCTConverter::SetUseMovingAverage ( bool  value)
pure virtual

Enables or disables the output moving average.

Parameters
value[in]the window size, which should be between 1 and 100, inclusive. A larger value will produce smoother output.
Returns
true on success

Implemented in WPScanConverter.

◆ SetUseScaling()

virtual bool IWPOCTConverter::SetUseScaling ( bool  value)
pure virtual

Sets the flag that determines if scaling is used to adjust the output.


Using this feature will spread out or shrink the output values to use the full range of values. Setting this to false will also set the UseContrast flag to false, since the UseContrast cannot work without scaling enabled. Default is true.

Returns
true

Implemented in WPScanConverter.

◆ TransposeArray() [1/3]

virtual bool IWPOCTConverter::TransposeArray ( const float *  inData,
float *  outData,
int  inWidth,
int  inHeight 
) const
pure virtual

Transpose an array of floats.

Parameters
inData[in]pointer to the input data array.
outData[out]pointer to the output data array.
inWidth[in]the input data width
inHeight[in]the input data height @Returns true if successful.

Implemented in WPScanConverter.

◆ TransposeArray() [2/3]

virtual bool IWPOCTConverter::TransposeArray ( const unsigned char *  src,
unsigned char *  dst,
int  inWidth,
int  inHeight 
) const
pure virtual

Transpose an array of bytes.

Parameters
inData[in]pointer to the input data array.
outData[out]pointer to the output data array.
inWidth[in]the input data width
inHeight[in]the input data height @Returns true if successful.

Implemented in WPScanConverter.

◆ TransposeArray() [3/3]

virtual bool IWPOCTConverter::TransposeArray ( const unsigned short *  inData,
unsigned short *  outData,
int  inWidth,
int  inHeight 
) const
pure virtual

Transpose an array of shorts.

Parameters
inData[in]pointer to the input data array.
outData[out]pointer to the output data array.
inWidth[in]the input data width
inHeight[in]the input data height @Returns true if successful.

Implemented in WPScanConverter.

◆ UpdateBackgroundImage()

virtual bool IWPOCTConverter::UpdateBackgroundImage ( )
pure virtual

Updates a flag so that the background image used for background subtraction is updated with the average of the image the next time a conversion is run.

The new background is an average of each column of input.

Returns
true

Implemented in WPScanConverter.


The documentation for this class was generated from the following files: