|
WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
|
Class that converts a scanned image from one format to another. More...
#include <WPScanConverter.h>


Public Member Functions | |
| const char * | GetQualifiedInputFileName () const override |
| Get the fully qualified file name (includes path). | |
| const char * | GetOutputIntensityName () const override |
| Get the intensity file name (no path). | |
| const char * | GetOutputPhaseName () const override |
| Get the phase file name (no path). | |
| const char * | GetOutputDirectory () const override |
| Get the output directory. | |
| const char * | GetCalibrationFringeFile () const override |
| Get the calibration fringe file name. | |
| bool | GetOutputIntensity () const override |
| Get the flag that determines if intensity is output. | |
| bool | GetOutputPhase () const override |
| Get the flag that determines if phase is output. | |
| bool | GetDeleteInputFileAfterConversion () const override |
| Get the flag that determines if the RAW input file is deleted after data is converted. | |
| bool | GetOutputTiffFormat () const override |
| Get the flag that determines if the output files will be in Tiff format. | |
| bool | GetOutputLogOfData () const override |
| Get the flag that determines if the log of the output data is taken/used. | |
| bool | GetUseContrast () const override |
| Get the flag that determines if contrast is used on the output. | |
| bool | GetUseScaling () const override |
| Get the flag that determines if scaling is used on the output. | |
| int | GetAScansPerBScan () const override |
| Get the number of A-scans in a B-scan. | |
| int | GetAScanSize () const override |
| Get the size of an A-scan. | |
| bool | GetScanDimensions (int *width, int *height) const override |
| Get the width and height of a scan. | |
| bool | GetDispersionCoefficients (float *coefficients, int length) const override |
| Get the dispersion coefficients. | |
| bool | GetNumberOfLinesToIgnore (int *top, int *bottom) const override |
| Get the top and bottom number of lines to ignore. | |
| bool | GetMinMaxScaling (float *min, float *max) const override |
| Get the min and max scaling values. | |
| int | GetNumScanProcessors () const override |
| Get the number of scan processors currently in use. | |
| int | GetAScanAverage () const override |
| Get the number of A-scan averages. | |
| virtual bool | GetUseMovingAverage () const override |
| Getters for displaying a moving average. | |
| virtual int | GetMovingAverageWindowSize () const override |
| Gets the window size of the moving average. More... | |
| bool | SetQualifiedInputFileName (const char *name) override |
| Set the fully qualified file name (includes path). | |
| bool | SetOutputIntensityName (const char *name) override |
| Set the intensity file name (no path). | |
| bool | SetOutputPhaseName (const char *name) override |
| Set the phase file name (no path). | |
| bool | SetOutputDirectory (const char *name) override |
| Set the output directory, including drive letter. | |
| bool | SetCalibrationFringeFile (const char *name) override |
| Set the calibration fringe file name. | |
| bool | SetOutputIntensity (bool value) override |
| Set the flag that determines if intensity is output. | |
| bool | SetOutputPhase (bool value) override |
| Set the flag that determines if phase is output. | |
| bool | SetDeleteInputFileAfterConversion (bool value) override |
| Set the flag that determines if the RAW input file is deleted after data is converted. | |
| bool | SetOutputTiffFormat (bool value) override |
| Get the flag that determines if the output files will be in Tiff format. | |
| bool | SetOutputLogOfData (bool value) override |
| Set the flag that determines if the log of the output data is taken/used. | |
| bool | SetUseScaling (bool value) override |
| Set the flag that determines if scaling is used on the output. More... | |
| bool | SetUseContrast (bool value) override |
| Set the flag that determines if contrast is used on the output. | |
| bool | SetDispersionCoefficients (const float *dispersionCoeffients, int length) override |
| Set the dispersion coefficients. | |
| bool | SetDispersionOptimizationParameters (int numCoefficients, int maxIterations, float *initialGuesses, int startLine, int stopLine, int offset) override |
| Set the values that are used to calculate the optimal dispersion coefficients. More... | |
| bool | CalcDispersionCoefficients (const unsigned short *inData, int width, int height, float *coefficients) override |
| Calc the optimal dispersion coefficients. More... | |
| bool | SetNumberOfLinesToIgnore (int top, int bottom) override |
| Set the top and bottom number of lines to ignore. | |
| bool | SetMinMaxScaling (float min, float max) override |
| Set the min and max scaling values. | |
| bool | SetAScansPerBScan (int value) override |
| Get the number of A-scans in a B-scan. | |
| bool | SetAScanSize (int value) override |
| Set the size of an A-scan. | |
| bool | SetScanDimensions (int aScansPerBScan, int aScanSize) override |
| Set the width and height of a scan. | |
| bool | SetAScanAverage (int value) override |
| Set the A-scan average. Returns true if successful. | |
| bool | SetNumScanProcessors (int value) override |
| Set the number of scan processors currently in use. | |
| bool | SetUseMovingAverage (bool value) override |
| Setters for displaying a moving average. | |
| bool | SetMovingAverageWindowSize (int value) override |
| Sets the window size of the moving average. More... | |
| bool | ResetMovingAverage () override |
| Resets the moving average by clearing the buffers. More... | |
| bool | UpdateBackgroundImage () override |
| Update the background image used for background subtraction the next time a conversion is performed. More... | |
| bool | GetBackgroundImage (float *buffer, int size) override |
| Get the current background image. | |
| bool | SetBackgroundImage (float *buffer, int size) override |
| Set the current background image. | |
| bool | ConvertSpectralDataToIntensity (IWPOCTInOutData *inOutData) override |
| Convert raw spectral data to intensity array. More... | |
| bool | ConvertSpectralDataToIntensity (const unsigned short *inData, float *outIntensity) override |
| Convert raw spectral data to intensity array. More... | |
| bool | ConvertSpectralDataToPhaseIntensity (IWPOCTInOutData *inOutData) override |
| Convert float array to phase and intensity. Returns true if successful. | |
| bool | ConvertSpectralDataToPhaseIntensity (const unsigned short *inData, float *outIntensity, float *outPhase) override |
| Convert float array to phase and intensity. Returns true if successful. | |
| bool | ConvertSpectralFileToPhaseIntensity () override |
| Convert raw spectral data file to phase and intensity files. More... | |
| bool | ConvertSpectralFileToPhaseIntensity (const char *qualifiedFileName) override |
| Convert binary file to phase and intensity files. More... | |
| bool | ConvertSpectralDirToPhaseIntensity () override |
| Convert raw spectral files in directory to phase and intensity files. More... | |
| bool | ConvertFloatToUnsignedChar (const float *inData, unsigned char *outData, int size) const override |
| Convert float data to unsigned char data. Returns true if successful. | |
| bool | ConvertFloatToUnsignedShort (const float *inData, unsigned short *outData, int size) const override |
| Convert float data to unsigned short data. Returns true if successful. | |
| bool | TransposeArray (const float *src, float *dst, int inWidth, int inHeight) const override |
| Transpose an array of floats. More... | |
| bool | TransposeArray (const unsigned short *src, unsigned short *dst, int inWidth, int inHeight) const override |
| Transpose an array of shorts. More... | |
| bool | TransposeArray (const unsigned char *src, unsigned char *dst, int inWidth, int inHeight) const override |
| Transpose an array of bytes. More... | |
| bool | FlipVertical (unsigned short *data, int width, int height) const override |
| Flips an array (image) around its horizontal axis. More... | |
| bool | FlipHorizontal (unsigned short *data, int width, int height) const override |
| Flips an array (image) around its vertical axis. More... | |
| bool | RotateImage (const unsigned short *inData, unsigned short *outData, int width, int height, unsigned int cw90Multiplier) const override |
| Rotates an image by 0, 90, 180, or 270 degrees. More... | |
| virtual IWPOCTConverter::ErrorCode | GetLastError () const override |
| Gets the result of the most current operation. More... | |
Public Member Functions inherited from IWPOCTConverter | |
| 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) |
| unsafe bool | GetBackgroundImage (float[] buffer, int size) |
| unsafe bool | SetBackgroundImage (float[] buffer, int size) |
| 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) |
| 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 (string qualifiedFileName) |
| 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 () |
Additional Inherited Members | |
Public Types inherited from IWPOCTConverter | |
| 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 } |
Static Public Member Functions inherited from IWPOCTConverter | |
| static IWPOCTConverter | GetOCTConverter () |
| static bool | DestroyOCTConverter () |
Protected Attributes inherited from IWPOCTConverter | |
| bool | swigCMemOwn |
Class that converts a scanned image from one format to another.
This class is the implementation of IWPOCTConverter.
|
overridevirtual |
Calc the optimal dispersion coefficients.
Use variance to calculate the optimal dispersion coefficients.
Implements IWPOCTConverter.
|
overridevirtual |
Convert raw spectral data to intensity array.
| 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. |
Implements IWPOCTConverter.
|
overridevirtual |
Convert raw spectral data to intensity array.
| 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. |
Implements IWPOCTConverter.
|
overridevirtual |
Convert raw spectral files in directory to phase and intensity files.
Convert binary files in directory to phase and intensity files.
Returns true if successful.
Implements IWPOCTConverter.
|
overridevirtual |
Convert raw spectral data file to phase and intensity files.
Convert binary file to phase and intensity files. Returns true if successful.
Uses _qualifiedInputFileName for input file name. Returns true if successful.
Implements IWPOCTConverter.
|
overridevirtual |
Convert binary file to phase and intensity files.
Not setup to be multi=threaded.
Returns true if successful.
Implements IWPOCTConverter.
|
overridevirtual |
Flips an array (image) around its vertical axis.
This is an inplace transformation.
| data[inOut] | pointer to the input data array. |
| width[in] | the input data width |
| height[in] | the input data height @Returns true if successful. |
Implements IWPOCTConverter.
|
overridevirtual |
Flips an array (image) around its horizontal axis.
This is an inplace transformation.
| data[inOut] | pointer to the input data array. |
| width[in] | the input data width |
| height[in] | the input data height @Returns true if successful. |
Implements IWPOCTConverter.
|
overridevirtual |
|
inlineoverridevirtual |
Gets the window size of the moving average.
Implements IWPOCTConverter.
|
inlineoverridevirtual |
Resets the moving average by clearing the buffers.
Implements IWPOCTConverter.
|
overridevirtual |
Rotates an image by 0, 90, 180, or 270 degrees.
| 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. |
Implements IWPOCTConverter.
|
overridevirtual |
Set the values that are used to calculate the optimal dispersion coefficients.
| 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 |
Implements IWPOCTConverter.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Set the flag that determines if scaling is used on the output.
If set to false, then UseContrast is also set to false.
Implements IWPOCTConverter.
|
overridevirtual |
Transpose an array of floats.
| 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. |
Implements IWPOCTConverter.
|
overridevirtual |
Transpose an array of bytes.
| 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. |
Implements IWPOCTConverter.
|
overridevirtual |
Transpose an array of shorts.
| 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. |
Implements IWPOCTConverter.
|
overridevirtual |
Update the background image used for background subtraction the next time a conversion is performed.
The new background is an average of each column of input.
Implements IWPOCTConverter.