VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
seElectronics.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: Ken George Date: Oct 2004
11 #ifndef _seElectronics_
12 #define _seElectronics_
13 
14 //#include "seIncAll.h"
15 
16 #include "sedllexport.h"
17 
25 {
26 public:
32  typedef enum {
33  Undefined_ColorMap = -1,
34  UserDefined_ColorMap = 0,
35  LADAR_ColorMap = 1,
36  NVG_ColorMap = 2,
37  RG16_ColorMap = 3,
38  LogScale_ColorMap = 4,
39  UserDefinedRG_ColorMap = 5,
40  RG16_RB16_ColorMap = 6,
41  UserDefinedRG_RB_ColorMap = 7,
42  NUM_ColorMap = 8
43  } ColorMapType ;
44 
45 
46 public:
47 
49  //seElectronics
53  seElectronics();
54 
56  //seElectronics
60  ~seElectronics();
61 
62 
64  //loadDefaults
68  void loadDefaults();
69 
70 
72  //setFrameRate
78  void setFrameRate(const double rate) {
79  if (m_frameRate != rate) {
80  m_frameRate = rate;
81  setDirty();
82  }
83  }
84 
86  //getFrameRate
92  double getFrameRate(){return m_frameRate;}
93 
94 
96  //setPostCutoffFreq
104  void setPostCutoffFreq(const double freq) {
105  if (m_postCutoffFreq != freq) {
106  m_postCutoffFreq = freq;
107  setDirty();
108  }
109  }
110 
112  //getPostCutoffFreq
120  double getPostCutoffFreq(){return m_postCutoffFreq;}
121 
122 
124  //setPreCutonFreq
132  void setPreCutonFreq(const double freq) {
133  if (m_preCutonFreq != freq) {
134  m_preCutonFreq = freq;
135  setDirty();
136  }
137  }
138 
140  //getPreCutonFreq
148  double getPreCutonFreq(){return m_preCutonFreq;}
149 
150 
152  //setManualGain
157  void setManualGain(const double gain) {
158  m_manualGain = gain;
159  }
160 
162  //getManualGain
167  double getManualGain(){return m_manualGain;}
168 
169 
171  //setManualLevel
176  void setManualLevel(const double level) {
177  m_manualLevel = level;
178  }
179 
181  //getManualLevel
186  double getManualLevel(){return m_manualLevel;}
187 
189  //setPreGain
194  void setPreGain(const double gain) {
195  m_preGain = gain;
196  }
197 
199  //getPreGain
204  double getPreGain(){return m_preGain;}
205 
206 
208  //setPreLevel
213  void setPreLevel(const double level) {
214  m_preLevel = level;
215  }
216 
218  //getPreLevel
223  double getPreLevel(){return m_preLevel;}
224 
226  //setAGCMaxGain
231  void setAGCMaxGain(const double gain) {
232  m_AGCMaxGain = gain;
233  }
234 
236  //getAGCMaxGain
241  double getAGCMaxGain(){return m_AGCMaxGain;}
242 
244  //setAGCMinGain
249  void setAGCMinGain(const double gain) {
250  m_AGCMinGain = gain;
251  }
252 
254  //getAGCMinGain
259  double getAGCMinGain(){return m_AGCMinGain;}
260 
262  //setAGCGainThreshold
267  void setAGCGainThreshold(const double threshold)
268  {
269  m_AGCGainThreshold = threshold;
270  }
271 
273  //getAGCGainThreshold
278  double getAGCGainThreshold() const
279  {
280  return m_AGCGainThreshold;
281  }
282 
284  //setMaxRadiance
291  void setMaxRadiance(const double maxRad) {
292  m_maxRadiance = maxRad;
293  }
294 
296  //getMaxRadiance
302  double getMaxRadiance(){return m_maxRadiance;}
303 
305  //setMinRadiance
312  void setMinRadiance(const double minRad) {
313  m_minRadiance = minRad;
314  }
315 
317  //getMinRadiance
323  double getMinRadiance(){return m_minRadiance;}
324 
326  //setMaxLutRadiance
333  void setMaxLutRadiance(const double maxLutRad) {
334  m_maxLutRadiance = maxLutRad;
335  }
336 
338  //getMaxLutRadiance
344  double getMaxLutRadiance(){return m_maxLutRadiance;}
345 
347  //setMinRadiance
354  void setMinLutRadiance(const double minLutRad) {
355  m_minLutRadiance = minLutRad;
356  }
357 
359  //getMinLutRadiance
365  double getMinLutRadiance(){return m_minLutRadiance;}
366 
368  //setBitDepthOutput
372  void setBitDepthOutput( bool enable, float bitDepth = -1.0f );
373 
375  //getBitDepthOutput
380  void getBitDepthOutput(bool &enable, float &bitDepth) const;
381 
383  //setLogScaleEnable
388  void setLogScaleEnable(const bool flag) {
389  m_logScaleEnable = flag;
390  }
391 
393  //isLogScaleEnable
398  bool isLogScaleEnable(){return m_logScaleEnable;}
399 
401  //setBlackHotEnable
406  void setBlackHotEnable(const bool flag) {
407  m_enableBlackHot = flag;
408  }
409 
411  //isBlackHotEnable
416  bool isBlackHotEnable(){return m_enableBlackHot;}
417 
419  //setGainEnable
424  void setGainEnable(const bool flag) {
425  m_gainEnable = flag;
426  }
427 
429  //isGainEnable
434  bool isGainEnable(){return m_gainEnable;}
435 
436 
438  //setInternalGainEnable
444  void setInternalGainEnable(const bool flag) {
445  m_internalGainEnable = flag;
446  }
447 
449  //isInternalGainEnable
455  bool isInternalGainEnable(){return m_internalGainEnable;}
456 
457 
459  //setACcouplingEnable
464  void setACcouplingEnable(const bool flag) {
465  m_ACcouplingEnable = flag;
466  }
467 
469  //isACcouplingEnable
474  bool isACcouplingEnable(){return m_ACcouplingEnable;}
475 
476 
478  //setAGCEnable
483  void setAGCEnable(const bool flag) {
484  m_AGCEnable = flag;
485  }
486 
488  //isAGCEnable
493  bool isAGCEnable(){return m_AGCEnable;}
494 
496  //setAGCMode
501  void setAGCMode(const int mode) {
502  if(mode<0) m_AGCMode=0;
503  else if(mode>3) m_AGCMode=3;
504  else m_AGCMode = mode;
505  }
506 
508  //getAGCMode
513  int getAGCMode(){return m_AGCMode;}
514 
515 
516 
518  //setGainAdjustment
524  void setGainAdjustment(double adjustment) {
525  if (adjustment > 0.0)
526  m_gainAdjustment = adjustment;
527  else
528  m_gainAdjustment = 0.01;
529  }
531  //getGainAdjustment
537  double getGainAdjustment(){return m_gainAdjustment;}
538 
540  //setLevelAdjustment
546  void setLevelAdjustment(double adjustment) {
547  m_levelAdjustment = adjustment;
548  }
550  //getLevelAdjustment
556  double getLevelAdjustment(){return m_levelAdjustment;}
557 
558 
560  //setNumDisplayPixels
566  void setNumDisplayPixels(const long width, const long height) {
567  if ((m_displayWidth != width) ||
568  (m_displayHeight != height)) {
569  m_displayWidth = width;
570  m_displayHeight = height;
571  setDirty();
572  }
573  }
574 
576  //getNumDisplayPixels
582  void getNumDisplayPixels(long &width, long &height){
583  width = m_displayWidth;
584  height = m_displayHeight;
585  }
586 
588  //setDisplayOffset
598  void setDisplayOffset(const long offsetX, const long offsetY, bool clearBuffer=true) {
599  if ((m_displayOffsetX != offsetX) ||
600  (m_displayOffsetY != offsetY) ||
601  (m_clearBufferFlag != clearBuffer)) {
602  m_displayOffsetX = offsetX;
603  m_displayOffsetY = offsetY;
604  m_clearBufferFlag = clearBuffer;
605  setDirty();
606  }
607  }
608 
610  //getDisplayOffset
618  void getDisplayOffset(long &offsetX, long &offsetY, bool &clearBuffer){
619  offsetX = m_displayOffsetX;
620  offsetY = m_displayOffsetY;
621  clearBuffer = m_clearBufferFlag;
622  }
623 
625  //getDisplayOffset
632  void getDisplayOffset(long &offsetX, long &offsetY){
633  offsetX = m_displayOffsetX;
634  offsetY = m_displayOffsetY;
635  }
636 
638  //isDirty
643  bool isDirty() {return m_dirty;}
644 
646  //setDirty
650  void setDirty() {m_dirty = true;}
652  //clrDirty
656  void clrDirty() {m_dirty = false;}
657 
659  //setColorMapType
664  void setColorMapType(ColorMapType newColorMapType) {
665  if (m_currentColorMapType != newColorMapType) {
666  m_currentColorMapType = newColorMapType;
667  setDirty();
668  }
669  }
670 
672  //getColorMapType
677  ColorMapType getColorMapType() { return m_currentColorMapType; }
678 
680  //setColorMapEnable
687  void setColorMapEnable(const int flag) {
688  m_colorMapEnable = flag;
689  setDirty();
690  }
691 
693  //getColorMapEnable
698  int getColorMapEnable() { return m_colorMapEnable; }
699 
701  //setFullColorOutputEnable
706  void setFullColorOutputEnable(const bool flag) {
707  m_fullColorOutputEnable = flag;
708  }
709 
711  //isFullColorOutputEnable
716  bool isFullColorOutputEnable() { return m_fullColorOutputEnable; }
717 
719  // getBayerFilterMapWidth
723  inline int getBayerFilterMapWidth();
724 
726  // getBayerFilterMapHeight
730  inline int getBayerFilterMapHeight();
731 
733  // loadUserDefinedRadianceLUT
737  bool loadUserDefinedRadianceLUT(char *filename);
738 
740  // getColorMapUserDefinedRadFile
744  char* getColorMapUserDefinedRadFile();
745 
747  // setColorMapUserDefinedRadFile
751  void setColorMapUserDefinedRadFile(const char* filepath);
752 
754  // loadColorMap
758  void loadColorMap(unsigned int *textureId);
759 
761  // loadBayerFilterMap
765  void loadBayerFilterMap(unsigned int *textureId, bool flip);
766 
768  // loadHistogramEqualizationMap
772  void loadHistogramEqualizationMap(unsigned int *textureId, float *mapData, int size);
773 
774 private:
775 
777  double m_frameRate;
783  double m_manualGain;
787  double m_preGain;
789  double m_preLevel;
791  double m_AGCMaxGain;
795  double m_AGCMinGain;
835  bool m_dirty;
837 
839  int m_AGCMode; // 0 = Max, 1 = Clipped, 2 = Histogram Equalization, 3 = Histogram Projection
840 
846  char m_colorMapUserDefinedRadFile[512];
848  unsigned int m_ColorMapSize;
857 
860 
861 };
862 
863 #endif /* _seElectronics_ */


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