#include "sphere.h" #include "rts/optics/material.h" #include //#include "rts/complex.h" #include "nearfield.h" //nearfieldStruct* NF; #include "microscope.h" microscopeStruct* SCOPE; #include "fieldslice.h" #include "fileout.h" //#include "options.h" #include "arguments.h" #include "rts/tools/arguments.h" #include "montecarlo.h" #include "rts/math/point.h" #include "rts/math/spherical_bessel.h" #include "rts/math/matrix.h" #include "rts/math/quaternion.h" #include "rts/envi/envi.h" #include "warnings.h" #include "planewave.h" //user interface #include "qtMainDialog.h" bool gui = false; #ifdef _WIN32 bool ansi = false; #else bool ansi = true; #endif fileoutStruct gFileOut; bool verbose = false; using namespace std; int cbessjyva(double v,complex z,double &vm,complex*cjv, complex*cyv,complex*cjvp,complex*cyvp); int main(int argc, char *argv[]) { //arguments test rts::arglist args; SetArguments(args); //parse the input arguments args.parse(argc, argv); SCOPE = new microscopeStruct(); //load the user specified parameters into the simulation LoadParameters(args); //activate ansi output if specified args.set_ansi(ansi); //display help and exit if(args("help")) { cout<init(); if(gui) { QApplication app(argc, argv); qtMainDialog bsDialog; //populate the user interface with the default and command-line values bsDialog.populateUi(); bsDialog.show(); return app.exec(); } else { gFileOut.Save(SCOPE); if(verbose) OutputOptions(); SCOPE->destroy(); } }