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
IWPOCTInOutData Class Referenceabstract

The data object contains pointers to input and output data. More...

#include <IWPOCTInOutData.h>

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

Public Types

enum  ErrorCode {
  NoError = 0 , NullPointer = 1 , InvalidArgumentValue = 2 , MemoryAllocationError = 3 ,
  MemoryDeallocationError = 4 , MemoryCopyError = 5 , AttemptToDeleteDLLAllocMemory = 6 , NumErrors = 7 ,
  NoError = 0 , NullPointer = 1 , InvalidArgumentValue = 2 , MemoryAllocationError = 3 ,
  MemoryDeallocationError = 4 , MemoryCopyError = 5 , AttemptToDeleteDLLAllocMemory = 6 , NumErrors = 7
}
 The following are error codes that are used within the data object. More...
 
enum class  ErrorCode {
  NoError = 0 , NullPointer = 1 , InvalidArgumentValue = 2 , MemoryAllocationError = 3 ,
  MemoryDeallocationError = 4 , MemoryCopyError = 5 , AttemptToDeleteDLLAllocMemory = 6 , NumErrors = 7 ,
  NoError = 0 , NullPointer = 1 , InvalidArgumentValue = 2 , MemoryAllocationError = 3 ,
  MemoryDeallocationError = 4 , MemoryCopyError = 5 , AttemptToDeleteDLLAllocMemory = 6 , NumErrors = 7
}
 

Public Member Functions

virtual bool IsRawAllocated () const =0
 Returns a flag indicating if the raw array is allocated. More...
 
virtual bool IsIntensityAllocated () const =0
 Returns a flag indicating if the intensity array is allocated. More...
 
virtual bool IsPhaseAllocated () const =0
 Returns a flag indicating if the phase array is allocated. More...
 
virtual bool IsScaledAllocated () const =0
 Returns a flag indicating if the scaled array is allocated. More...
 
virtual bool IsTransposedAllocated () const =0
 Returns a flag indicating if the transposed array is allocated. More...
 
virtual bool IsColorAllocated () const =0
 Returns a flag indicating if the color array is allocated. More...
 
virtual int GetRawSize () const =0
 Gets the size of the raw input array. More...
 
virtual int GetIntensitySize () const =0
 Returns the size of the output intensity array. More...
 
virtual int GetPhaseSize () const =0
 Returns the size of the output phase array. More...
 
virtual int GetScaledSize () const =0
 Returns the size of the scaled array. More...
 
virtual int GetTransposedSize () const =0
 Returns the size of the transposed array. More...
 
virtual int GetColorSize () const =0
 Returns the size of the color array. More...
 
virtual int GetInputWidth () const =0
 
virtual int GetInputHeight () const =0
 
virtual int GetOutputWidth () const =0
 
virtual int GetOutputHeight () const =0
 
virtual unsigned short * GetRawData ()=0
 
virtual float * GetIntensityData ()=0
 
virtual float * GetPhaseData ()=0
 
virtual unsigned short * GetScaledData ()=0
 
virtual unsigned short * GetTransposedData ()=0
 Get pointer to transposed array.
 
virtual unsigned char * GetColorData ()=0
 Get pointer to color array.
 
virtual bool GetRawData (unsigned short *data)=0
 Get copy of raw array.
 
virtual bool GetIntensityData (float *data)=0
 Get copy of intensity array.
 
virtual bool GetPhaseData (float *data)=0
 Get copy of phase array.
 
virtual bool GetScaledData (unsigned short *data)=0
 Get copy of scaled array.
 
virtual bool GetTransposedData (unsigned short *data)=0
 Get copy of transposed array.
 
virtual bool GetColorData (unsigned char *data)=0
 Get copy of color array.
 
virtual bool SetAllocateRaw (bool value)=0
 Sets the flag that determines if the raw data array is allocated by this DLL when the Resize API is called. More...
 
virtual bool SetAllocateIntensity (bool value)=0
 Sets the flag that determines if the intensity data array is allocated by this DLL when the Resize API is called. More...
 
virtual bool SetAllocatePhase (bool value)=0
 Sets the flag that determines if the phase data array is allocated by this DLL when the Resize API is called. More...
 
virtual bool SetAllocateScaled (bool value)=0
 Sets the flag that determines if the scaled data array is allocated by this DLL when the Resize API is called. More...
 
virtual bool SetAllocateTransposed (bool value)=0
 Sets the flag that determines if the transposed data array is allocated by this DLL when the Resize API is called. More...
 
virtual bool SetAllocateColor (bool value)=0
 Sets the flag that determines if the color data array is allocated by this DLL when the Resize API is called. More...
 
virtual bool SetInputWidth (int value)=0
 
virtual bool SetInputHeight (int value)=0
 
virtual bool SetOutputWidth (int value)=0
 
virtual bool SetOutputHeight (int value)=0
 
virtual bool SetRawData (unsigned short *data, int width, int height)=0
 Sets the raw data pointer to the value supplied. More...
 
virtual bool SetIntensityData (float *data, int width, int height)=0
 Sets the intensity data pointer to the value supplied. More...
 
virtual bool SetPhaseData (float *data)=0
 Sets the phase data pointer to the value supplied. More...
 
virtual bool SetScaledData (unsigned short *data)=0
 Sets the scaled data pointer to the value supplied. More...
 
virtual bool SetTransposedData (unsigned short *data)=0
 Sets the transposed data pointer to the value supplied. More...
 
virtual bool SetColorData (unsigned char *data)=0
 Sets the color data pointer to the value supplied. More...
 
virtual bool Resize (int width, int height)=0
 Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT Processor dll. More...
 
virtual bool Resize ()=0
 Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT Processor dll. More...
 
virtual IWPOCTInOutData::ErrorCode GetLastError () const =0
 
virtual void Dispose ()
 
virtual bool IsRawAllocated ()
 
virtual bool IsIntensityAllocated ()
 
virtual bool IsPhaseAllocated ()
 
virtual bool IsScaledAllocated ()
 
virtual bool IsTransposedAllocated ()
 
virtual bool IsColorAllocated ()
 
virtual int GetRawSize ()
 
virtual int GetIntensitySize ()
 
virtual int GetPhaseSize ()
 
virtual int GetScaledSize ()
 
virtual int GetTransposedSize ()
 
virtual int GetColorSize ()
 
virtual int GetInputWidth ()
 
virtual int GetInputHeight ()
 
virtual int GetOutputWidth ()
 
virtual int GetOutputHeight ()
 
global::System.IntPtr GetRawData ()
 
global::System.IntPtr GetIntensityData ()
 
global::System.IntPtr GetPhaseData ()
 
global::System.IntPtr GetScaledData ()
 
global::System.IntPtr GetTransposedData ()
 
global::System.IntPtr GetColorData ()
 
unsafe bool GetRawData (ushort[] data)
 
unsafe bool GetIntensityData (float[] data)
 
unsafe bool GetPhaseData (float[] data)
 
unsafe bool GetScaledData (ushort[] data)
 
unsafe bool GetTransposedData (ushort[] data)
 
unsafe bool GetColorData (byte[] data)
 
virtual bool SetAllocateRaw (bool value)
 
virtual bool SetAllocateIntensity (bool value)
 
virtual bool SetAllocatePhase (bool value)
 
virtual bool SetAllocateScaled (bool value)
 
virtual bool SetAllocateTransposed (bool value)
 
virtual bool SetAllocateColor (bool value)
 
virtual bool SetInputWidth (int value)
 
virtual bool SetInputHeight (int value)
 
virtual bool SetOutputWidth (int value)
 
virtual bool SetOutputHeight (int value)
 
unsafe bool SetRawData (ushort[] data, int width, int height)
 
unsafe bool SetIntensityData (float[] data, int width, int height)
 
unsafe bool SetPhaseData (float[] data)
 
unsafe bool SetScaledData (ushort[] data)
 
unsafe bool SetTransposedData (ushort[] data)
 
unsafe bool SetColorData (byte[] data)
 
virtual bool Resize (int width, int height)
 
virtual bool Resize ()
 
virtual IWPOCTInOutData.ErrorCode GetLastError ()
 

Static Public Member Functions

static IWPOCTInOutData CreateOCTInOutData ()
 
static bool DestroyOCTInOutData (IWPOCTInOutData item)
 

Protected Attributes

bool swigCMemOwn
 

Detailed Description

The data object contains pointers to input and output data.

The data arrays can be allocated by the APIs or can be supplied by the user. The data can also be resized and manipulated using these APIs.

Member Enumeration Documentation

◆ ErrorCode

The following are error codes that are used within the data 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

◆ GetColorSize()

virtual int IWPOCTInOutData::GetColorSize ( ) const
pure virtual

Returns the size of the color array.


Returns
size of the color array (in bytes or elements?)

Implemented in ConversionInOutData.

◆ GetIntensityData()

virtual float* IWPOCTInOutData::GetIntensityData ( )
pure virtual
Returns
pointer to intensity array.

Implemented in ConversionInOutData.

◆ GetIntensitySize()

virtual int IWPOCTInOutData::GetIntensitySize ( ) const
pure virtual

Returns the size of the output intensity array.

Note that the output array(s) will have half as many points as the raw array, but it will have the same number of bytes, since the input data are 16-bit unsigned ints and the output data are 32-bit float values.

Returns
size of the intensity array (in bytes or elements?)

Implemented in ConversionInOutData.

◆ GetPhaseData()

virtual float* IWPOCTInOutData::GetPhaseData ( )
pure virtual
Returns
pointer to phase array.

Implemented in ConversionInOutData.

◆ GetPhaseSize()

virtual int IWPOCTInOutData::GetPhaseSize ( ) const
pure virtual

Returns the size of the output phase array.

Note that the output array(s) will have half as many points as the raw array, but it will have the same number of bytes, since the input data are 16-bit unsigned ints and the output data are 32-bit float values.

Returns
size of the phase array (in bytes or elements?)

Implemented in ConversionInOutData.

◆ GetRawData()

virtual unsigned short* IWPOCTInOutData::GetRawData ( )
pure virtual
Returns
pointer to the raw input array.

Implemented in ConversionInOutData.

◆ GetRawSize()

virtual int IWPOCTInOutData::GetRawSize ( ) const
pure virtual

Gets the size of the raw input array.

The input data are 16-bit unsigned ints, while the output data are 32-bit float values.

Returns
size of the raw array (in bytes or elements?)

Implemented in ConversionInOutData.

◆ GetScaledData()

virtual unsigned short* IWPOCTInOutData::GetScaledData ( )
pure virtual
Returns
pointer to scaled array.

Implemented in ConversionInOutData.

◆ GetScaledSize()

virtual int IWPOCTInOutData::GetScaledSize ( ) const
pure virtual

Returns the size of the scaled array.

Note that this output array(s) should have half as many points as the raw array.

Returns
size of the scaled array (in bytes or elements?)

Implemented in ConversionInOutData.

◆ GetTransposedSize()

virtual int IWPOCTInOutData::GetTransposedSize ( ) const
pure virtual

Returns the size of the transposed array.

Note that this output array(s) should have half as many points as the raw array.

Returns
size of the transposed array (in bytes or elements?)

Implemented in ConversionInOutData.

◆ IsColorAllocated()

virtual bool IWPOCTInOutData::IsColorAllocated ( ) const
pure virtual

Returns a flag indicating if the color array is allocated.

Returns
true if the color array is allocated

Implemented in ConversionInOutData.

◆ IsIntensityAllocated()

virtual bool IWPOCTInOutData::IsIntensityAllocated ( ) const
pure virtual

Returns a flag indicating if the intensity array is allocated.

Returns
true if the intensity array is allocated

Implemented in ConversionInOutData.

◆ IsPhaseAllocated()

virtual bool IWPOCTInOutData::IsPhaseAllocated ( ) const
pure virtual

Returns a flag indicating if the phase array is allocated.

Returns
true if the phase array is allocated

Implemented in ConversionInOutData.

◆ IsRawAllocated()

virtual bool IWPOCTInOutData::IsRawAllocated ( ) const
pure virtual

Returns a flag indicating if the raw array is allocated.

Returns
true if the raw array is allocated

Implemented in ConversionInOutData.

◆ IsScaledAllocated()

virtual bool IWPOCTInOutData::IsScaledAllocated ( ) const
pure virtual

Returns a flag indicating if the scaled array is allocated.

Returns
true if the scaled array is allocated

Implemented in ConversionInOutData.

◆ IsTransposedAllocated()

virtual bool IWPOCTInOutData::IsTransposedAllocated ( ) const
pure virtual

Returns a flag indicating if the transposed array is allocated.

Returns
true if the transposed array is allocated

Implemented in ConversionInOutData.

◆ Resize() [1/2]

virtual bool IWPOCTInOutData::Resize ( )
pure virtual

Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT Processor dll.

For example, if GetIntensityAllocated is set to true, then calling Resize will resize the intensity array to the current height and width.

Warning
Any time one or more of the allocated flags are changed, one of the Resize APIs should be called immediately after.

Implemented in ConversionInOutData.

◆ Resize() [2/2]

virtual bool IWPOCTInOutData::Resize ( int  width,
int  height 
)
pure virtual

Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT Processor dll.

For example, if GetIntensityAllocated is set to true, then calling Resize will resize the intensity array to the height and width specified.

Parameters
width[in]the new width of the arrays
height[in]the new height of the arrays
Warning
Any time one or more of the allocated flags are changed, one of the Resize APIs should be called immediately after.

Implemented in ConversionInOutData.

◆ SetAllocateColor()

virtual bool IWPOCTInOutData::SetAllocateColor ( bool  value)
pure virtual

Sets the flag that determines if the color data array is allocated by this DLL when the Resize API is called.

If true, it is allocated by this DLL. If false, any existing color data array allocated by this DLL is deleted once the Resize API is called.

Parameters
value[in]true if the array should be allocated by this DLL; false if user supplied
Returns
true

Implemented in ConversionInOutData.

◆ SetAllocateIntensity()

virtual bool IWPOCTInOutData::SetAllocateIntensity ( bool  value)
pure virtual

Sets the flag that determines if the intensity data array is allocated by this DLL when the Resize API is called.

If true, it is allocated by this DLL. If false, any existing intensity data array allocated by this DLL is deleted once the Resize API is called.

Parameters
value[in]true if the array should be allocated by this DLL; false if user supplied
Returns
true

Implemented in ConversionInOutData.

◆ SetAllocatePhase()

virtual bool IWPOCTInOutData::SetAllocatePhase ( bool  value)
pure virtual

Sets the flag that determines if the phase data array is allocated by this DLL when the Resize API is called.

If true, it is allocated by this DLL. If false, any existing phase data array allocated by this DLL is deleted once the Resize API is called.

Parameters
value[in]true if the array should be allocated by this DLL; false if user supplied
Returns
true

Implemented in ConversionInOutData.

◆ SetAllocateRaw()

virtual bool IWPOCTInOutData::SetAllocateRaw ( bool  value)
pure virtual

Sets the flag that determines if the raw data array is allocated by this DLL when the Resize API is called.

If true, it is allocated by this DLL. If false, any existing raw data array allocated by this DLL is deleted once the Resize API is called.

Parameters
value[in]true if the array should be allocated by this DLL; false if user supplied
Returns
true

Implemented in ConversionInOutData.

◆ SetAllocateScaled()

virtual bool IWPOCTInOutData::SetAllocateScaled ( bool  value)
pure virtual

Sets the flag that determines if the scaled data array is allocated by this DLL when the Resize API is called.

If true, it is allocated by this DLL. If false, any existing scaled data array allocated by this DLL is deleted once the Resize API is called.

Parameters
value[in]true if the array should be allocated by this DLL; false if user supplied
Returns
true

Implemented in ConversionInOutData.

◆ SetAllocateTransposed()

virtual bool IWPOCTInOutData::SetAllocateTransposed ( bool  value)
pure virtual

Sets the flag that determines if the transposed data array is allocated by this DLL when the Resize API is called.

If true, it is allocated by this DLL. If false, any existing transposed data array allocated by this DLL is deleted once the Resize API is called.

Parameters
value[in]true if the array should be allocated by this DLL; false if user supplied
Returns
true

Implemented in ConversionInOutData.

◆ SetColorData()

virtual bool IWPOCTInOutData::SetColorData ( unsigned char *  data)
pure virtual

Sets the color data pointer to the value supplied.

When this is called, the color data array should not currently be allocated by this DLL. The user should have allocated an array and then this API can be called to set the color data pointer.

Returns
true if pointer is non-NULL and can be set

Implemented in ConversionInOutData.

◆ SetIntensityData()

virtual bool IWPOCTInOutData::SetIntensityData ( float *  data,
int  width,
int  height 
)
pure virtual

Sets the intensity data pointer to the value supplied.

When this is called, the intensity data array should not currently be allocated by this DLL. The user should have allocated an array and then this API can be called to set the intensity data pointer.

Returns
true if pointer is non-NULL and can be set

Implemented in ConversionInOutData.

◆ SetPhaseData()

virtual bool IWPOCTInOutData::SetPhaseData ( float *  data)
pure virtual

Sets the phase data pointer to the value supplied.

When this is called, the phase data array should not currently be allocated by this DLL. The user should have allocated an array and then this API can be called to set the phase data pointer.

Returns
true if pointer is non-NULL and can be set

Implemented in ConversionInOutData.

◆ SetRawData()

virtual bool IWPOCTInOutData::SetRawData ( unsigned short *  data,
int  width,
int  height 
)
pure virtual

Sets the raw data pointer to the value supplied.

When this is called, the raw data array should not currently be allocated by this DLL. The user should have allocated an array and then this API can be called to set the raw data pointer.

Returns
true if pointer is non-NULL and can be set

Implemented in ConversionInOutData.

◆ SetScaledData()

virtual bool IWPOCTInOutData::SetScaledData ( unsigned short *  data)
pure virtual

Sets the scaled data pointer to the value supplied.

When this is called, the scaled data array should not currently be allocated by this DLL. The user should have allocated an array and then this API can be called to set the scaled data pointer.

Returns
true if pointer is non-NULL and can be set

Implemented in ConversionInOutData.

◆ SetTransposedData()

virtual bool IWPOCTInOutData::SetTransposedData ( unsigned short *  data)
pure virtual

Sets the transposed data pointer to the value supplied.

When this is called, the transposed data array should not currently be allocated by this DLL. The user should have allocated an array and then this API can be called to set the transposed data pointer.

Returns
true if pointer is non-NULL and can be set

Implemented in ConversionInOutData.


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