VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciElectronics.h
Go to the documentation of this file.
1 
2 // Copyright JRM Enterprises, Inc. 2004
3 // All rights reserved.
4 //
5 // This code is the intellectual property of JRM Enterprises, Inc.
6 // It may not be used or released as source or compiled binary form
7 // without the prior written consent of JRM Enterprises, Inc.
8 //
9 // Original Author: Mike Ortalano
10 // Date: Nov 2004
11 //
12 //
13 //
15 
16 #if !defined(_ciELECTRONICS_H_)
17 #define _ciELECTRONICS_H_
18 
19 #if _MSC_VER > 1000
20 #pragma once
21 #endif // _MSC_VER > 1000
22 
26 #include "ciApi.h"
27 #include <stdio.h>
28 #include <string.h>
29 #include <fstream>
30 #include <iostream>
31 #include <assert.h>
32 #include <string.h>
33 #include "clXML.h"
34 #include "clXMLNode.h"
35 
37 {
38 
39 public: // methods
40 
41 
43  // getFrameRate
50  double getFrameRate() { return m_frameRate; }
51 
52 
54  // setFrameRate
62  void setFrameRate( double frameRate ) { m_frameRate = frameRate; }
63 
64 
66  // getPreCutonFreq
73  double getPreCutonFreq() { return m_preCutonFreq; }
74 
76  // setPreCutonFreq
84  void setPreCutonFreq( double preCutonFreq ){ m_preCutonFreq = preCutonFreq; }
86  // getPostCutoffFreq
93  double getPostCutoffFreq() { return m_postCutoffFreq; }
94 
96  // setPostCutoffFreq
104  void setPostCutoffFreq( double postCutoffFreq ){ m_postCutoffFreq = postCutoffFreq; }
105 
107  // getGain
114  double getGain() { return m_gain; }
115 
117  // setGain
125  void setGain( double gain ) { m_gain = gain; }
126 
128  //setAGCMaxGain
133  void setAGCMaxGain(const double gain) {
134  m_AGCMaxGain = gain;
135  }
136 
138  //getAGCMaxGain
143  double getAGCMaxGain(){return m_AGCMaxGain;}
144 
146  //setAGCMinGain
151  void setAGCMinGain(const double gain) {
152  m_AGCMinGain = gain;
153  }
154 
156  //getAGCMinGain
161  double getAGCMinGain(){return m_AGCMinGain;}
162 
164  //setAGCGainThreshold
169  void setAGCGainThreshold(const double threshold)
170  {
171  m_AGCGainThreshold = threshold;
172  }
173 
175  //getAGCGainThreshold
180  double getAGCGainThreshold()
181  {
182  return m_AGCGainThreshold;
183  }
184 
186  //setAGCMode
191  void setAGCMode(const int mode) {
192  if(mode<0) m_AGCMode=0;
193  else if(mode>3) m_AGCMode=3;
194  else m_AGCMode = mode;
195  }
196 
198  //getAGCMode
203  int getAGCMode(){return m_AGCMode;}
204 
206  //setPercentGain
211  void setPercentGain(double percent){m_percentGain = percent;}
212 
214  //getPercentGain
219  double getPercentGain(){return m_percentGain;}
220 
222  //setPercentLevel
227  void setPercentLevel(double percent){m_percentLevel = percent;}
228 
230  //getPercentLevel
235  double getPercentLevel(){return m_percentLevel;}
236 
237 
239  // getLevel
246  double getLevel() { return m_level; }
247 
249  // setLevel
257  void setLevel( double level ){ m_level = level; }
258 
260  //getColorMapType
264  int getColorMapType() { return m_colorMapType; }
265 
267  //setColorMapType
271  void setColorMapType(int type) { m_colorMapType = type; }
272 
274  //getColorMapUserDefinedRadFile
278  char* getColorMapUserDefinedRadFile() { return m_colorMapUserDefinedRadFile; }
279 
281  //setColorMapUserDefinedRadFile
285  void setColorMapUserDefinedRadFile(const char* filepath);
286 
288  //getColorMapEnable
292  int getColorMapEnable() { return m_colorMapEnable; }
293 
295  //setColorMapEnable
299  void setColorMapEnable(int enable) { m_colorMapEnable = enable; }
300 
302  //setBitDepthOutput
306  void setBitDepthOutput( bool enable, float bitDepth )
307  {
308  m_bitDepthOutput = bitDepth;
309  m_enableBitDepthOutput = enable;
310  }
311 
313  //getBitDepthOutput
318  void getBitDepthOutput(bool &enable, float &bitDepth) const
319  {
320  bitDepth = m_bitDepthOutput;
321  enable = m_enableBitDepthOutput;
322  }
323 
325  //setSensorIndex
330  void setSensorIndex(int sensorIndex){m_sensorIndex = sensorIndex;}
332  //getSensorIndex
337  int getSensorIndex(){return m_sensorIndex;}
338 
340  // archive
348  bool archive(std::ofstream &outf, int idx = 0);
349 
351  // serialize
359  int serialize(char *filepath, int idx);
360 
361  //
362  // loadXML
363  //
364  // \par Description:
365  // Loads attributes from an XML node
366  //
367  // \param clXMLNode* xmlParentNode
368  // \return bool
369  //
370  bool loadXML(clXMLNode* xmlParentNode);
371 
372  //
373  // parseXML
374  //
375  // \par Description:
376  // Parses an XML document for specific tags
377  //
378  // \param clXML xmlDocument
379  // \return bool
380  //
381  bool parseXML(clXML& xmlDocument);
382 
384  //loadXMLNode
391  bool loadXMLNode(std::string tag, char *nodeString);
393  //loadXMLNode
400  bool loadXMLNode(std::string tag, bool *nodeBool);
402  //loadXMLNode
409  bool loadXMLNode(std::string tag, int *nodeInt);
411  //loadXMLNode
418  bool loadXMLNode(std::string tag, long *nodeLong);
420  //loadXMLNode
427  bool loadXMLNode(std::string tag, double *nodeDouble);
428 
429  //
430  // saveXML
431  //
432  // \par Description:
433  // Saves XML nodes to an XML document
434  //
435  // \param clXML* xmlDocument
436  //
437  void saveXML(clXML* xmlDocument);
438 
440  //serializeCheck
446  int serializeCheck(char *filepath);
447 
449  // operator =
457  ciElectronics operator = (ciElectronics &obj);
458 
459 protected: // methods
460 
461 public: // construction/destruction
462 
464  // ciElectronics
469  ciElectronics();
470 
472  // ciElectronics
480 
482  //~ciElectronics
487  virtual ~ciElectronics();
488 
489 protected: // variables
490 
491  double m_frameRate; // frame rate [hz]
492  double m_preCutonFreq; // pre-cuton frequency [hz]
493  double m_postCutoffFreq; // post-cutoff frequency [hz]
494  double m_gain; // gain
495  double m_level; // level
496  double m_AGCMaxGain; // maximum gain used by AGC
497  double m_AGCMinGain; // minimum level used by AGC
498  double m_AGCGainThreshold; // gain threshold used by AGC
499  int m_AGCMode; // 0 = Max, 1 = Clipped, 2 = Histogram Equalization, 3 = Histogram Projection
503  int m_colorMapType; //color map type. in seElectronics it is an enum
504  char m_colorMapUserDefinedRadFile[512]; //*.rad file
505  int m_colorMapEnable; //Is color mapping turned enabled
506 
507  // Control for bit depth output to buffers and rendered image
510 
512 
513 private: // variables
514 
515 };
516 
517 #endif // _ciELECTRONICS_H_


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)