VR-Vantage 3.0.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
seSenSim.h
Go to the documentation of this file.
1 
3 // Copyright JRM Enterprises, Inc. 2004 - 2011
4 // All rights reserved.
5 //
6 // This code is the intellectual property of JRM Enterprises, Inc.
7 // It may not be used or released as source or compiled binary form
8 // without the prior written consent of JRM Enterprises, Inc.
9 //
10 // Original Author: Ken George Date: October 2004
12 
13 #ifndef _seSenSim_
14 #define _seSenSim_
15 
16 // SenSim headers
17 #include <stdlib.h>
18 #include "seDetector.h"
19 #include "seOptics.h"
20 #include "seElectronics.h"
21 #include "seGainLevel.h"
22 #include "seFilter.h"
23 #include "seNoise.h"
24 #include "seGpuProcessor.h"
25 
26 #include "sedllexport.h"
27 
28 #define PRODUCT_VERSION "SenSimRT"
29 #ifndef VERSIONNUMBER
30 #define VERSIONNUMBER 100
31 #endif
32 
33 
34 
35 
42 {
43 
44 public:
45 
47 // seSenSim
51  seSenSim();
52 
54 //seSenSim
58  ~seSenSim();
59 
60 
62 //initialize
66  bool initialize();
67 
68 
70 //outputImage
78  void outputImage(char *filename, float *inputImage, long numCols,
79  long numRows);
80 
82 //applyCpuSensorEffects
89  void applyCpuSensorEffects(float *inputImage, long numCols, long numRows);
90  // Helpers
91 
92 
94 //getFocalLength
99  double getFocalLength() const;
100 
101 
103 //getFNumber
108  double getFNumber() const;
109 
110 
112 //*getDetector
117  seDetector *getDetector() const;
118 
120 //*getOptics
125  seOptics *getOptics() const;
126 
128 //*getFilter
133  seFilter *getFilter(){return m_filter;}
134 
136 //*getNoise
141 // seNoise *getNoise(){return m_noise;}
142 
144 //*getElectronics
149  seElectronics *getElectronics() const;
150 
152 //*getGainLevel
157  seGainLevel *getGainLevel() const;
158 
160 //setSensorEffectsFlags
171  void setSensorEffectsFlags(bool enable, bool gpuEnable, bool filterEnable, bool noiseEnable, bool gainEnable, bool haloEnable, bool motionBlurEnable = false) {
172  m_enableSensorEffects = enable;
173  m_enableGPUSensorEffects = gpuEnable;
174  m_enableFilterEffects = filterEnable;
175  m_enableGainEffects = gainEnable;
176  m_enableNoiseEffects = noiseEnable;
177  m_enableHaloEffects = haloEnable;
178  m_enableMotionBlurEffects = motionBlurEnable;
179  if (m_enableSensorEffects) {
180  m_optics->setFilterEnable(isFilterOn());
181  m_detector->setNoiseEnable(isNoiseOn());
182  m_optics->setHaloEnable(isHaloOn());
183  m_detector->setMotionBlurEnable(isMotionBlurOn());
184  m_electronics->setGainEnable(isGainOn());
185  } else { // xxx this is probably not necessary since if sensor effects are off then these flags aren't used.
186  m_optics->setFilterEnable(false);
187  m_detector->setNoiseEnable(false);
188  m_optics->setHaloEnable(false);
189  m_electronics->setGainEnable(false);
190  m_detector->setMotionBlurEnable(false);
191  }
192  }
193 
195 //isSensorEffectsOn
200  bool isSensorEffectsOn() const {
201  return m_enableSensorEffects;
202  }
203 
205  //setInputSize
214  void setInputSize(int w, int h, bool use888Encoding = false);
215 
217  //setInputOffset
223  void setInputOffset(int x, int y);
224 
226  //setDisplaySize
232  void setDisplaySize(int w, int h);
233 
235  //setDisplayOffset
242  void setDisplayOffset(int x, int y, bool clearBuffer=true);
243 
244 
246  //applyGpuSensorEffects
255  void applyGpuSensorEffects(int inputTextureId, float *inputImage=NULL, bool swapBuffer = false, bool useTextureRect = false, int outputTextureId = 0);
256 
258  //getMTFSamples
268  void getMTFSamples (int numSamples, double &xCutoffFreq, double &yCutoffFreq,
269  double *xMTF, double *yMTF) const;
270 
271 
273 //isFilterOn
278  bool isFilterOn() const { return m_enableFilterEffects; }
280 //isNoiseOn
285  bool isNoiseOn() const { return m_enableNoiseEffects; }
287 //isHaloOn
292  bool isHaloOn() const { return m_enableHaloEffects; }
294 //isMotionBlurOn
299  bool isMotionBlurOn() const { return m_enableMotionBlurEffects; }
301 //isGainOn
306  bool isGainOn() const { return m_enableGainEffects; }
307 
309 //isGpuSensorEffectsOn
314  bool isGpuSensorEffectsOn() const { return m_enableGPUSensorEffects; }
315 
317  //setFilterAdjustment
321  void setFilterAdjustment(double adjustment);
322 
324  //setNoiseAdjustment
328  void setNoiseAdjustment(double adjustment);
329 
331  //setGainAdjustment
335  void setGainAdjustment(double adjustment);
336 
338  //setLevelAdjustment
342  void setLevelAdjustment(double adjustment);
343 
345  //getFilterAdjustment
349  double getFilterAdjustment() const;
350 
352  //getNoiseAdjustment
356  double getNoiseAdjustment() const;
357 
359  //getGainAdjustment
363  double getGainAdjustment() const;
364 
366  //getLevelAdjustment
370  double getLevelAdjustment() const;
371 
373  //isBlackHotEnable
377  bool isBlackHotEnable() const;
378 
380  //setBlackHotEnable
384  void setBlackHotEnable(bool flag);
385 
387  //setBandpass
391  void setBandpass(const double ax, const double bx);
392 
394  //isFullColorEnable
396  bool isFullColorEnable() const;
397 
399  //setFullColorEnable
401  void setFullColorEnable(bool flag);
402 
404  //setSaveImage
413  void setSaveImage(char *saveFileName, bool preAperture = false, bool continuous = false, bool flip = true);
414 
416  //setStopContinuous
420  void setStopContinuous();
421 
423  //setSaveImageFileName
429  void setSaveImageFileName(char *saveFileName);
430 
432  //setSavePreApertureImage
438  void setSavePreApertureImage(bool preAperture);
439 
441  //setSaveContinuousImages
446  void setSaveContinuousImages(bool continuous);
447 
449  //setFlipSaveImages
454  void setFlipSaveImages(bool flip);
455 
457  //setSaveRadianceImageEnable
462  void setSaveRadianceImageEnable();
463 
465  //setSaveRadianceImageArrayEnable
471  void setSaveRadianceImageArrayEnable( bool enable );
472 
473 
475  //getRadianceImageArray
479  float* getRadianceImageArray() const;
480 
482  //getObjectIDImageArray
486  float* getObjectIDImageArray() const;
487 
488 
490  //getDownSampledRadianceImageArray
494  float* getDownSampledRadianceImageArray() const;
495 
497  //getDownSampledObjectIDImageArray
501  float* getDownSampledObjectIDImageArray() const;
502 
503 
505  //getDownSampledImageSize
509  void getDownSampledImageSize( int &width, int &height ) const
510  {
511  m_gpuProcessor->getDownSampledImageSize( width, height);
512  }
513 
515  //setDownSampledImagesEnable
519  void setDownSampledImagesEnable( bool bEnable )
520  {
521  m_gpuProcessor->setDownSampledImagesEnable(bEnable);
522  }
523 
525  //getDownSampledImagesEnable
529  bool getDownSampledImagesEnable() const
530  {
531  return m_gpuProcessor->getDownSampledImagesEnable();
532  }
533 
535  //setObjectIDRenderingEnable
539  void setObjectIDRenderingEnable(bool bEnable)
540  {
541  m_gpuProcessor->setObjectIDRenderingEnable(bEnable);
542  }
544  //getObjectIDRenderingEnable
548  bool getObjectIDRenderingEnable() const
549  {
550  return m_gpuProcessor->getObjectIDRenderingEnable();
551  }
552 
553 
555  // initializeLicense
563  bool initializeLicense();
564 
566  //licenseCheck
570  bool licenseCheck() const;
571 
572 
574  // openGLCheck
577  bool openGLCheck() const;
578 
580  //getVersion
585  const char * getVersion() const;
586 
588  //setDisplayTextureID
594  void setDisplayTextureID(GLuint textureID, bool enable = true);
595 
596 
597 
598 private:
599 
614 
616  bool m_license;
625 
632 
633  struct Implementation;
634  Implementation *m_impl;
635 
636 
637 };
638 
639 
640 #endif // _seSenSim_


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