VR-Vantage 3.0.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciOptics.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: Oct 2004
11 //
12 //
13 //
15 
16 #if !defined(_ciOPTICS_H_)
17 #define _ciOPTICS_H_
18 #include "ciApi.h"
19 
20 #if _MSC_VER > 1000
21 #pragma once
22 #endif // _MSC_VER > 1000
23 
24 #ifndef JRM_PI
25 #define JRM_PI 3.14159265358979323846264338327950288419716939937511
26 #endif
27 #ifndef DEG2RAD
28 #define DEG2RAD (JRM_PI/180.0)
29 #endif
30 
34 #include <stdio.h>
35 #include <string.h>
36 #include <fstream>
37 #include <iostream>
38 #include <assert.h>
39 #include <string.h>
40 #include "clXML.h"
41 #include "clXMLNode.h"
42 
44 {
45 public: // enumerations
46 
48  // enum aperture Shape Type
54  {
56  RECTANGULAR
57  };
58 
59 public: // methods
60 
62  // getAspectRatio
69  double getAspectRatio() { return m_aspectRatio; }
70 
72  // setAspectRatio
80  void setAspectRatio( double aspectRatio ) { m_aspectRatio = aspectRatio; }
81 
83  // getWidthDimension
90  double getWidthDimension() { return m_widthDimension; }
91 
93  // setWidthDimension
101  void setWidthDimension( double widthDimension ){ m_widthDimension = widthDimension; }
102 
104  // getApertureShape
111  int getApertureShape() { return m_apertureShape; }
112 
114  // setApertureShape
122  void setApertureShape( int apertureShape ) { m_apertureShape = apertureShape; }
123 
125  // getBlurSpotDiameter
132  double getBlurSpotDiameter( ) { return m_blurSpotDiameter; }
133 
135  // setBlurSpotDiameter
143  void setBlurSpotDiameter( double blurSpotDiameter ) { m_blurSpotDiameter = blurSpotDiameter; }
144 
146  // getMtfMotionBlurSize
153  double getMtfMotionBlurSize( ) { return m_mtfMotionBlur; }
154 
156  // setMtfMotionBlurSize
164  void setMtfMotionBlurSize( double mtfMotionBlur ) { m_mtfMotionBlur = mtfMotionBlur; }
165 
167  // getHorizFOV
174  double getHorizFOV() { return m_horizFOV; }
175 
177  // setHorizFOV
185  void setHorizFOV( double horizFOV ) { m_horizFOV = horizFOV; }
186 
188  // getVertFOV
195  double getVertFOV() { return m_vertFOV; }
196 
198  // setVertFOV
206  void setVertFOV( double vertFOV ) { m_vertFOV = vertFOV; }
208  //setHaloThreshold
213  void setHaloThreshold(double threshold ){m_haloThreshold = threshold;}
215  //getHaloThreshold
220  double getHaloThreshold(){return m_haloThreshold;}
222  //setHaloRadius
227  void setHaloRadius(double radius){m_haloRadius = radius;}
229  //getHaloRadius
234  double getHaloRadius(){return m_haloRadius;}
236  //setHaloIntensity
241  void setHaloIntensity(double intensity){m_haloIntensity = intensity;}
243  //getHaloIntensity
248  double getHaloIntensity(){return m_haloIntensity;}
250  //setPercentHaloIntensity
255  void setPercentHaloIntensity(double percent){m_percentHaloIntensity = percent;}
257  //getPercentHaloIntensity
262  double getPercentHaloIntensity(){return m_percentHaloIntensity;}
263 
265  //setUserDefinedMTFenable
271  void setUserDefinedMTFenable(bool enable) { m_userDefinedMTFenable = enable; }
272 
274  //getUserDefinedMTFenable
278  bool getUserDefinedMTFenable() { return m_userDefinedMTFenable; }
279 
281  //setUserDefinedMTFfilename
282  //
294  void setUserDefinedMTFfilename(char* filename);
295 
297  //getUserDefinedMTFfilename
303  char * getUserDefinedMTFfilename() { return m_userDefinedMTFfilename; }
304 
306  //setSensorIndex
311  void setSensorIndex(int sensorIndex){m_sensorIndex = sensorIndex;}
313  //getSensorIndex
318  int getSensorIndex(){return m_sensorIndex;}
320  // archive
328  bool archive(std::ofstream &outf, int idx = 0);
329 
331  // serialize
339  int serialize(char *filepath, int idx);
340 
341  //
342  // loadXML
343  //
344  // \par Description:
345  // Loads attributes from an XML node
346  //
347  // \param clXMLNode* xmlParentNode
348  // \return bool
349  //
350  bool loadXML(clXMLNode* xmlParentNode);
351 
352  //
353  // parseXML
354  //
355  // \par Description:
356  // Parses an XML document for specfic tags
357  //
358  // \param clXML xmlDocument
359  // \return bool
360  //
361  bool parseXML(clXML& xmlDocument);
362 
364  //loadXMLNode
371  bool loadXMLNode(std::string tag, char *nodeString);
373  //loadXMLNode
380  bool loadXMLNode(std::string tag, bool *nodeBool);
382  //loadXMLNode
389  bool loadXMLNode(std::string tag, int *nodeInt);
391  //loadXMLNode
398  bool loadXMLNode(std::string tag, long *nodeLong);
400  //loadXMLNode
407  bool loadXMLNode(std::string tag, double *nodeDouble);
408 
409  //
410  // saveXML
411  //
412  // \par Description:
413  // Saves XML nodes to an XML document
414  //
415  // \param clXML* xmlDocument
416  //
417  void saveXML(clXML* xmlDocument);
418 
420  //serializeCheck
426  int serializeCheck(char *filepath);
427 
429  // operator =
437  ciOptics operator = (ciOptics &obj);
438 
439 protected: // methods
440 
441 public: // construction/destruction
442 
444  // ciOptics
449  ciOptics();
450 
452  // ciOptics
460 
461  virtual ~ciOptics();
462 
463 protected: // variables
464 
465  double m_aspectRatio;
469  double m_horizFOV;
470  double m_vertFOV;
473  double m_haloRadius;
479  char m_userDefinedMTFfilename[512];
480 
483 
484 private: // variables
485 
486 };
487 
488 #endif // _ciOPTICS_H_


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