WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
Public Member Functions | Protected Member Functions | List of all members
ConversionInOutData Class Reference
Inheritance diagram for ConversionInOutData:
Inheritance graph
[legend]
Collaboration diagram for ConversionInOutData:
Collaboration graph
[legend]

Public Member Functions

 ConversionInOutData (int width, int height, bool allocateRaw=false, bool allocateIntensity=false, bool allocatePhase=false, bool allocateScaled=false, bool allocateTransposed=false, bool allocateColor=false)
 
bool IsRawAllocated () const override
 Returns a flag indicating if the raw array is allocated. More...
 
bool IsIntensityAllocated () const override
 Returns a flag indicating if the intensity array is allocated. More...
 
bool IsPhaseAllocated () const override
 Returns a flag indicating if the phase array is allocated. More...
 
bool IsScaledAllocated () const override
 Returns a flag indicating if the scaled array is allocated. More...
 
bool IsTransposedAllocated () const override
 Returns a flag indicating if the transposed array is allocated. More...
 
bool IsColorAllocated () const override
 Returns a flag indicating if the color array is allocated. More...
 
int GetRawSize () const override
 Gets the size of the raw input array. More...
 
int GetIntensitySize () const override
 Returns the size of the output intensity array. More...
 
int GetPhaseSize () const override
 Returns the size of the output phase array. More...
 
int GetScaledSize () const override
 Returns the size of the scaled array. More...
 
int GetTransposedSize () const override
 Returns the size of the transposed array. More...
 
int GetColorSize () const override
 Returns the size of the color array. More...
 
int GetInputWidth () const override
 
int GetInputHeight () const override
 
int GetOutputWidth () const override
 
int GetOutputHeight () const override
 
unsigned short * GetRawData () override
 Get pointer to raw array.
 
float * GetIntensityData () override
 Get pointer to intensity array.
 
float * GetPhaseData () override
 Get pointer to phase array.
 
unsigned short * GetScaledData () override
 Get pointer to extra array.
 
unsigned short * GetTransposedData () override
 Get pointer to transposed array.
 
unsigned char * GetColorData () override
 Get pointer to color array.
 
bool GetRawData (unsigned short *data) override
 Get copy of raw array.
 
bool GetIntensityData (float *data) override
 Get copy of intensity array.
 
bool GetPhaseData (float *data) override
 Get copy of phase array.
 
bool GetScaledData (unsigned short *data) override
 Get copy of scaled array.
 
bool GetTransposedData (unsigned short *data) override
 Get copy of transposed array.
 
bool GetColorData (unsigned char *data) override
 Get copy of color array.
 
bool SetAllocateRaw (bool value) override
 Sets the flag that determines if the raw data array is allocated by this DLL when the Resize API is called. More...
 
bool SetAllocateIntensity (bool value) override
 Sets the flag that determines if the intensity data array is allocated by this DLL when the Resize API is called. More...
 
bool SetAllocatePhase (bool value) override
 Sets the flag that determines if the phase data array is allocated by this DLL when the Resize API is called. More...
 
bool SetAllocateScaled (bool value) override
 Sets the flag that determines if the scaled data array is allocated by this DLL when the Resize API is called. More...
 
bool SetAllocateTransposed (bool value) override
 Sets the flag that determines if the transposed data array is allocated by this DLL when the Resize API is called. More...
 
bool SetAllocateColor (bool value) override
 Sets the flag that determines if the color data array is allocated by this DLL when the Resize API is called. More...
 
bool SetInputWidth (int value) override
 
bool SetInputHeight (int value) override
 
bool SetOutputWidth (int value) override
 
bool SetOutputHeight (int value) override
 
bool SetRawData (unsigned short *data, int width, int height) override
 Sets the raw data array pointer.
 
bool SetIntensityData (float *data, int width, int height) override
 Sets the intensity data array pointer.
 
bool SetPhaseData (float *data) override
 Sets the phase data array pointer.
 
bool SetScaledData (unsigned short *data) override
 Sets the scaled data array pointer.
 
bool SetTransposedData (unsigned short *data) override
 Sets the transposed data array pointer.
 
bool SetColorData (unsigned char *data) override
 Sets the color data array pointer.
 
bool Resize (int width, int height) override
 Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT Processor dll. More...
 
bool Resize () override
 After changing one or more of the allocated flags, one of these methods must be called.
 
IWPOCTInOutData::ErrorCode GetLastError () const override
 
- Public Member Functions inherited from IWPOCTInOutData
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)
 
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 IWPOCTInOutData.ErrorCode GetLastError ()
 

Protected Member Functions

void Init ()
 

Additional Inherited Members

- Public Types inherited from IWPOCTInOutData
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
}
 
- Static Public Member Functions inherited from IWPOCTInOutData
static IWPOCTInOutData CreateOCTInOutData ()
 
static bool DestroyOCTInOutData (IWPOCTInOutData item)
 
- Protected Attributes inherited from IWPOCTInOutData
bool swigCMemOwn
 

Member Function Documentation

◆ GetColorSize()

int ConversionInOutData::GetColorSize ( ) const
overridevirtual

Returns the size of the color array.


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

Implements IWPOCTInOutData.

◆ GetIntensitySize()

int ConversionInOutData::GetIntensitySize ( ) const
overridevirtual

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?)

Implements IWPOCTInOutData.

◆ GetPhaseSize()

int ConversionInOutData::GetPhaseSize ( ) const
overridevirtual

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?)

Implements IWPOCTInOutData.

◆ GetRawSize()

int ConversionInOutData::GetRawSize ( ) const
overridevirtual

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?)

Implements IWPOCTInOutData.

◆ GetScaledSize()

int ConversionInOutData::GetScaledSize ( ) const
overridevirtual

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?)

Implements IWPOCTInOutData.

◆ GetTransposedSize()

int ConversionInOutData::GetTransposedSize ( ) const
overridevirtual

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?)

Implements IWPOCTInOutData.

◆ IsColorAllocated()

bool ConversionInOutData::IsColorAllocated ( ) const
inlineoverridevirtual

Returns a flag indicating if the color array is allocated.

Returns
true if the color array is allocated

Implements IWPOCTInOutData.

◆ IsIntensityAllocated()

bool ConversionInOutData::IsIntensityAllocated ( ) const
inlineoverridevirtual

Returns a flag indicating if the intensity array is allocated.

Returns
true if the intensity array is allocated

Implements IWPOCTInOutData.

◆ IsPhaseAllocated()

bool ConversionInOutData::IsPhaseAllocated ( ) const
inlineoverridevirtual

Returns a flag indicating if the phase array is allocated.

Returns
true if the phase array is allocated

Implements IWPOCTInOutData.

◆ IsRawAllocated()

bool ConversionInOutData::IsRawAllocated ( ) const
inlineoverridevirtual

Returns a flag indicating if the raw array is allocated.

Returns
true if the raw array is allocated

Implements IWPOCTInOutData.

◆ IsScaledAllocated()

bool ConversionInOutData::IsScaledAllocated ( ) const
inlineoverridevirtual

Returns a flag indicating if the scaled array is allocated.

Returns
true if the scaled array is allocated

Implements IWPOCTInOutData.

◆ IsTransposedAllocated()

bool ConversionInOutData::IsTransposedAllocated ( ) const
inlineoverridevirtual

Returns a flag indicating if the transposed array is allocated.

Returns
true if the transposed array is allocated

Implements IWPOCTInOutData.

◆ Resize()

bool ConversionInOutData::Resize ( int  width,
int  height 
)
overridevirtual

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.

Implements IWPOCTInOutData.

◆ SetAllocateColor()

bool ConversionInOutData::SetAllocateColor ( bool  value)
overridevirtual

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

Implements IWPOCTInOutData.

◆ SetAllocateIntensity()

bool ConversionInOutData::SetAllocateIntensity ( bool  value)
overridevirtual

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

Implements IWPOCTInOutData.

◆ SetAllocatePhase()

bool ConversionInOutData::SetAllocatePhase ( bool  value)
overridevirtual

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

Implements IWPOCTInOutData.

◆ SetAllocateRaw()

bool ConversionInOutData::SetAllocateRaw ( bool  value)
overridevirtual

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

Implements IWPOCTInOutData.

◆ SetAllocateScaled()

bool ConversionInOutData::SetAllocateScaled ( bool  value)
overridevirtual

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

Implements IWPOCTInOutData.

◆ SetAllocateTransposed()

bool ConversionInOutData::SetAllocateTransposed ( bool  value)
overridevirtual

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

Implements IWPOCTInOutData.


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