WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
IWPOCTInOutData.h
Go to the documentation of this file.
1 
6 #pragma once
7 
14 {
18  enum ErrorCode
19  {
20  NoError = 0,
21  NullPointer = 1,
22  InvalidArgumentValue = 2,
23  MemoryAllocationError = 3,
24  MemoryDeallocationError = 4,
25  MemoryCopyError = 5,
26  AttemptToDeleteDLLAllocMemory = 6,
27  NumErrors = 7
28  };
29 
30  // Destructor
31  virtual ~IWPOCTInOutData() { }
32 
34  // Getters
36 
37  // Determines if these arrays were allocated by the converter dll.
38  // If value returned is true, then the dll allocated the array.
39 
42  virtual bool IsRawAllocated () const = 0;
43 
46  virtual bool IsIntensityAllocated() const = 0;
47 
50  virtual bool IsPhaseAllocated () const = 0;
51 
54  virtual bool IsScaledAllocated () const = 0;
55 
58  virtual bool IsTransposedAllocated() const = 0;
59 
62  virtual bool IsColorAllocated () const = 0;
63 
64  // Get the sizes of the arrays if not supplied by the user. If they are, returns 0.
65 
69  virtual int GetRawSize () const = 0;
70 
76  virtual int GetIntensitySize() const = 0;
77 
83  virtual int GetPhaseSize () const = 0;
84 
88  virtual int GetScaledSize () const = 0;
89 
93  virtual int GetTransposedSize() const = 0;
94 
97  virtual int GetColorSize () const = 0;
98 
99  virtual int GetInputWidth () const = 0;
100  virtual int GetInputHeight () const = 0;
101  virtual int GetOutputWidth () const = 0;
102  virtual int GetOutputHeight () const = 0;
103 
105  virtual unsigned short* GetRawData () = 0;
106 
108  virtual float* GetIntensityData() = 0;
109 
111  virtual float* GetPhaseData () = 0;
112 
114  virtual unsigned short* GetScaledData () = 0;
115 
117  virtual unsigned short* GetTransposedData() = 0;
118 
120  virtual unsigned char* GetColorData () = 0;
121 
123  virtual bool GetRawData (unsigned short* data) = 0;
124 
126  virtual bool GetIntensityData(float* data) = 0;
127 
129  virtual bool GetPhaseData (float* data) = 0;
130 
132  virtual bool GetScaledData (unsigned short* data) = 0;
133 
135  virtual bool GetTransposedData(unsigned short* data) = 0;
136 
138  virtual bool GetColorData (unsigned char* data) = 0;
139 
141  // Setters
143 
144  // Determines if these arrays will be allocated or they will be supplied by the user.
145  // If value is true, then the dll will allocate the array. If false, the application
146  // must supply the array.
147 
155  virtual bool SetAllocateRaw (bool value) = 0;
156 
164  virtual bool SetAllocateIntensity (bool value) = 0;
165 
173  virtual bool SetAllocatePhase (bool value) = 0;
174 
182  virtual bool SetAllocateScaled (bool value) = 0;
183 
191  virtual bool SetAllocateTransposed (bool value) = 0;
192 
200  virtual bool SetAllocateColor (bool value) = 0;
201 
202  virtual bool SetInputWidth (int value) = 0;
203  virtual bool SetInputHeight (int value) = 0;
204  virtual bool SetOutputWidth (int value) = 0;
205  virtual bool SetOutputHeight (int value) = 0;
206 
212  virtual bool SetRawData (unsigned short* data, int width, int height) = 0;
213 
219  virtual bool SetIntensityData(float* data, int width, int height) = 0;
220 
226  virtual bool SetPhaseData (float* data) = 0;
227 
233  virtual bool SetScaledData (unsigned short* data) = 0;
234 
240  virtual bool SetTransposedData(unsigned short* data) = 0;
241 
247  virtual bool SetColorData (unsigned char* data) = 0;
248 
259  virtual bool Resize(int width, int height) = 0;
260 
268  virtual bool Resize() = 0;
269 
271  // Status
273 
274  virtual IWPOCTInOutData::ErrorCode GetLastError() const = 0;
275 
276 // Include the section below when compiling with Swig.
277 #ifdef _RUNSWIG
281  static IWPOCTInOutData* CreateOCTInOutData();
282 
285  static bool DestroyOCTInOutData(IWPOCTInOutData* item);
286 };
287 
288 // Include the section below when compiling in Visual Studio.
289 #else
290 };
291 #ifdef __cplusplus
292 extern "C" {
293 #endif
294 
297 __declspec(dllexport) IWPOCTInOutData* CreateOCTInOutData();
298 
301 __declspec(dllexport) bool DestroyOCTInOutData(IWPOCTInOutData* item);
302 
303 #ifdef __cplusplus
304 }
305 #endif
306 #endif
__declspec(dllexport) IWPOCTInOutData *CreateOCTInOutData()
Creates an instance of the in/out data object.
Definition: IWPOCTController.cpp:13
The data object contains pointers to input and output data.
Definition: IWPOCTInOutData.h:14
virtual bool GetColorData(unsigned char *data)=0
Get copy of color array.
virtual bool GetScaledData(unsigned short *data)=0
Get copy of scaled 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 c...
virtual int GetRawSize() const =0
Gets the size of the raw input array.
virtual unsigned short * GetTransposedData()=0
Get pointer to transposed array.
virtual bool IsPhaseAllocated() const =0
Returns a flag indicating if the phase array is allocated.
virtual bool Resize(int width, int height)=0
Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT...
virtual bool SetIntensityData(float *data, int width, int height)=0
Sets the intensity data pointer to the value supplied.
virtual bool SetRawData(unsigned short *data, int width, int height)=0
Sets the raw data pointer to the value supplied.
virtual int GetIntensitySize() const =0
Returns the size of the output intensity array.
virtual int GetColorSize() const =0
Returns the size of the color array.
virtual bool SetTransposedData(unsigned short *data)=0
Sets the transposed data pointer to the value supplied.
virtual bool GetRawData(unsigned short *data)=0
Get copy of raw array.
virtual bool IsIntensityAllocated() const =0
Returns a flag indicating if the intensity array is allocated.
virtual bool SetAllocateTransposed(bool value)=0
Sets the flag that determines if the transposed data array is allocated by this DLL when the Resize A...
virtual bool IsColorAllocated() const =0
Returns a flag indicating if the color array is allocated.
virtual int GetTransposedSize() const =0
Returns the size of the transposed array.
virtual bool SetAllocateIntensity(bool value)=0
Sets the flag that determines if the intensity data array is allocated by this DLL when the Resize AP...
virtual bool GetIntensityData(float *data)=0
Get copy of intensity array.
virtual bool SetScaledData(unsigned short *data)=0
Sets the scaled data pointer to the value supplied.
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 i...
virtual bool GetPhaseData(float *data)=0
Get copy of phase array.
virtual float * GetIntensityData()=0
virtual int GetScaledSize() const =0
Returns the size of the scaled array.
virtual unsigned short * GetScaledData()=0
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...
virtual bool IsRawAllocated() const =0
Returns a flag indicating if the raw array is allocated.
virtual bool IsTransposedAllocated() const =0
Returns a flag indicating if the transposed array is allocated.
virtual bool SetPhaseData(float *data)=0
Sets the phase data pointer to the value supplied.
virtual bool SetColorData(unsigned char *data)=0
Sets the color data pointer to the value supplied.
virtual int GetPhaseSize() const =0
Returns the size of the output phase array.
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...
virtual float * GetPhaseData()=0
virtual unsigned short * GetRawData()=0
virtual bool GetTransposedData(unsigned short *data)=0
Get copy of transposed array.
virtual bool IsScaledAllocated() const =0
Returns a flag indicating if the scaled array is allocated.
ErrorCode
The following are error codes that are used within the data object.
Definition: IWPOCTInOutData.h:19
virtual unsigned char * GetColorData()=0
Get pointer to color array.
virtual bool Resize()=0
Changes and resizes the data structures in the IWPOCTInOutData object that are allocated by the WPOCT...