VR-Vantage 3.1 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 
61  {
65  OUTPUT_TYPE_NUM
66  };
67 
68 
70 //initialize
74  bool initialize();
75 
76 
78 //outputImage
86  void outputImage(char *filename, float *inputImage, long numCols,
87  long numRows);
88 
90 //applyCpuSensorEffects
97  void applyCpuSensorEffects(float *inputImage, long numCols, long numRows);
98  // Helpers
99 
100 
102 //getFocalLength
107  double getFocalLength() const;
108 
109 
111 //getFNumber
116  double getFNumber() const;
117 
118 
120 //*getDetector
125  seDetector *getDetector() const;
126 
128 //*getOptics
133  seOptics *getOptics() const;
134 
136 //*getFilter
141  seFilter *getFilter(){return m_filter;}
142 
144 //*getNoise
149  seNoise *getNoise(){return m_noise;}
150 
152 //*getElectronics
157  seElectronics *getElectronics() const;
158 
160 //*getGainLevel
165  seGainLevel *getGainLevel() const;
166 
168 //setSensorEffectsFlags
180  void setSensorEffectsFlags(bool enable, bool gpuEnable, bool filterEnable, bool noiseEnable, bool gainEnable, bool AGCenable, bool haloEnable, bool motionBlurEnable = false) {
181  m_enableSensorEffects = enable;
182  m_enableGPUSensorEffects = gpuEnable;
183  m_enableFilterEffects = filterEnable;
184  m_enableGainEffects = gainEnable;
185  m_enableNoiseEffects = noiseEnable;
186  m_enableHaloEffects = haloEnable;
187  m_enableMotionBlurEffects = motionBlurEnable;
188  if (m_enableSensorEffects) {
189  m_optics->setFilterEnable(isFilterOn());
190  m_detector->setNoiseEnable(isNoiseOn());
191  m_optics->setHaloEnable(isHaloOn());
192  m_detector->setMotionBlurEnable(isMotionBlurOn());
193  m_electronics->setGainEnable(isGainOn());
194  m_electronics->setAGCEnable(AGCenable);
195  } else { // xxx this is probably not necessary since if sensor effects are off then these flags aren't used.
196  m_optics->setFilterEnable(false);
197  m_detector->setNoiseEnable(false);
198  m_optics->setHaloEnable(false);
199  m_electronics->setGainEnable(false);
200  m_detector->setMotionBlurEnable(false);
201  m_electronics->setAGCEnable(false);
202  }
203  }
204 
206 //isSensorEffectsOn
211  bool isSensorEffectsOn() const {
212  return m_enableSensorEffects;
213  }
214 
216 //setInputSize
225  void setInputSize(int w, int h, bool use888Encoding = false);
226 
228  //setInputOffset
234  void setInputOffset(int x, int y);
235 
237  //setDisplaySize
245  void setDisplaySize(int w, int h);
246 
248  //setDisplayOffset
254  void setDisplayOffset(int x, int y, bool clearBuffer);
255 
257 //applyGpuSensorEffects
267  void applyGpuSensorEffects(int inputTextureId, bool usePreviousFBO = false,
268  float *inputImage=NULL, bool swapBuffer = false, bool useTextureRect = false, int outputTextureId = 0);
269 
271  //getMTFSamples
281  void getMTFSamples (int numSamples, double &xCutoffFreq, double &yCutoffFreq,
282  double *xMTF, double *yMTF) const;
283 
284 
286 //isFilterOn
291  bool isFilterOn() const { return m_enableFilterEffects; }
293 //isNoiseOn
298  bool isNoiseOn() const { return m_enableNoiseEffects; }
300 //isHaloOn
305  bool isHaloOn() const { return m_enableHaloEffects; }
307 //isMotionBlurOn
312  bool isMotionBlurOn() const { return m_enableMotionBlurEffects; }
314 //isGainOn
319  bool isGainOn() const { return m_enableGainEffects; }
320 
322 //isGpuSensorEffectsOn
327  bool isGpuSensorEffectsOn() const { return m_enableGPUSensorEffects; }
328 
330  //setFilterAdjustment
334  void setFilterAdjustment(double adjustment);
335 
337  //setNoiseAdjustment
341  void setNoiseAdjustment(double adjustment);
342 
344  //setGainAdjustment
348  void setGainAdjustment(double adjustment);
349 
351  //setLevelAdjustment
355  void setLevelAdjustment(double adjustment);
356 
358  //getFilterAdjustment
362  double getFilterAdjustment() const;
363 
365  //getNoiseAdjustment
369  double getNoiseAdjustment() const;
370 
372  //getGainAdjustment
376  double getGainAdjustment() const;
377 
379  //getLevelAdjustment
383  double getLevelAdjustment() const;
384 
386  //isBlackHotEnable
390  bool isBlackHotEnable() const;
391 
393  //setBlackHotEnable
397  void setBlackHotEnable(bool flag);
398 
400  //isAeroDynamicHeatingEnable
404  bool isAeroDynamicHeatingEnable() const;
405 
407  //setAeroDynamicHeatingEnable
411  void setAeroDynamicHeatingEnable(bool flag);
412 
414  //getAeroDynamicHeatingGimbalMode
418  int getAeroDynamicHeatingGimbalMode() const;
419 
421  //setAeroDynamicHeatingGimbalMode
425  void setAeroDynamicHeatingGimbalMode(int flag);
426 
428  //setBandpass
432  void setBandpass(const double ax, const double bx);
433 
435  //setColorMapType
440  void setColorMapType(seElectronics::ColorMapType newColorMapType);
441 
443  //getColorMapType
448  seElectronics::ColorMapType getColorMapType() const;
449 
451  //setColorMapEnable
458  void setColorMapEnable(int flag);
459 
461  //getColorMapEnable
466  int getColorMapEnable() const;
467 
469  //isFullColorEnable
471  bool isFullColorEnable() const;
472 
474  //setFullColorEnable
476  void setFullColorEnable(bool flag);
477 
479  //setSaveImage
489  void setSaveImage(char *saveFileName, bool preAperture = false, bool continuous = false, bool flip = true, bool detectorResolution = false);
490 
492  //setStopContinuous
496  void setStopContinuous();
497 
499  //setSaveImageFileName
505  void setSaveImageFileName(char *saveFileName);
506 
508  //setSavePreApertureImage
514  void setSavePreApertureImage(bool preAperture);
515 
517  //setSaveContinuousImages
522  void setSaveContinuousImages(bool continuous);
523 
525  //setFlipSaveImages
530  void setFlipSaveImages(bool flip);
531 
533  //setSaveImagesAtDetectorResolution
538  void setSaveImagesAtDetectorResolution(bool flag);
539 
541  //setSaveRadianceImageEnable
546  void setSaveRadianceImageEnable();
547 
549  //setSaveRadianceImageArrayEnable
555  void setSaveRadianceImageArrayEnable( bool enable );
556 
558  //applyAeroDynamicHeating
567  void applyAeroDynamicHeating(float azimuthOffset, float elevationOffset, float speed, float aeroDynamicHeating);
568 
569 
571  //getRadianceImageArray
575  float* getRadianceImageArray() const;
576 
578  //getObjectIDImageArray
582  float* getObjectIDImageArray() const;
583 
584 
586  //getDownSampledRadianceImageArray
590  float* getDownSampledRadianceImageArray() const;
591 
593  //getDownSampledObjectIDImageArray
597  float* getDownSampledObjectIDImageArray() const;
598 
599 
601  //getDownSampledImageSize
605  void getDownSampledImageSize( int &width, int &height ) const
606  {
607  m_gpuProcessor->getDownSampledImageSize( width, height);
608  }
609 
611  //setDownSampledImagesEnable
615  void setDownSampledImagesEnable( bool bEnable )
616  {
617  m_gpuProcessor->setDownSampledImagesEnable(bEnable);
618  }
619 
621  //getDownSampledImagesEnable
625  bool getDownSampledImagesEnable() const
626  {
627  return m_gpuProcessor->getDownSampledImagesEnable();
628  }
629 
631  //setObjectIDRenderingEnable
635  void setObjectIDRenderingEnable(bool bEnable)
636  {
637  m_gpuProcessor->setObjectIDRenderingEnable(bEnable);
638  }
640  //getObjectIDRenderingEnable
644  bool getObjectIDRenderingEnable() const
645  {
646  return m_gpuProcessor->getObjectIDRenderingEnable();
647  }
648 
650  //setNumberSubloadRows
655  void setNumberSubloadRows(int numberOfRows)
656  {
657  m_gpuProcessor->setNumberSubloadRows(numberOfRows);
658  }
659 
661  //setOutputImageArrayType
665  void setOutputImageArrayType( OutputImageArrayType type );
666 
668  //getOutputImageArrayType
672  OutputImageArrayType getOutputImageArrayType() const;
673 
675  // initializeLicense
683  bool initializeLicense();
684 
686  //licenseCheck
690  bool licenseCheck() const;
691 
692 
694  // openGLCheck
697  bool openGLCheck() const;
698 
700  //getVersion
705  const char * getVersion() const;
706 
708  //setDisplayTextureID
714  void setDisplayTextureID(GLuint textureID, bool enable = true);
715 
716  bool getUsePreviousFBO() const
717  {
718  return m_usePreviousFBO;
719  }
720 
721  void setFilteringMode(int mode = 1) {}
722  int getFilteringMode() const { return 0; }
723 
724  void setMaxLightLevel(double maxLightLevel)
725  {
726  m_gpuProcessor->setMaxLightLevel(maxLightLevel);
727  }
728 
730  //setMaxRadiance
734  void setMaxRadiance(double maxRadiance);
735 
737  //setMinRadiance
741  void setMinRadiance(double minRadiance);
742 
744  //setApertureWidth
748  void setApertureWidth(double apertureWidth);
749 
751  //setApertureAspectRatio
755  void setApertureAspectRatio(double apertureWidth);
756 
758  //setNoiseEquivalentTemp
762  void setNoiseEquivalentTemp(double apertureWidth);
763 
765  //setNoiseEquivalentRadiance
769  void setNoiseEquivalentRadiance(double apertureWidth);
770 
771 protected:
772 
774  //getDistortionScaleFactor
779  double getDistortionScaleFactor() const
780  {
781  return m_gpuProcessor->getDistortionScaleFactor();
782  }
783 
784  void setHaloQEResponse(double QEResponse)
785  {
786  m_gpuProcessor->setHaloQEResponse(QEResponse);
787  }
788 
791 
792 private:
793 
812 
821 
828 
829  struct Implementation;
830  Implementation *m_impl;
831 
832 
833 };
834 
835 
836 #endif // _seSenSim_


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