/// <summary internal= "true">
      /// The static constructor instantiates and initializes the MATLAB Component
      /// Runtime instance.
      /// </summary>
      static Camera_controls()
      {
          if (MWArray.MCRAppInitialized)
          {
              Assembly assembly= Assembly.GetExecutingAssembly();

              string ctfFilePath= assembly.Location;

              int lastDelimeter= ctfFilePath.LastIndexOf(@"\");

              ctfFilePath= ctfFilePath.Remove(lastDelimeter, (ctfFilePath.Length - lastDelimeter));

              string ctfFileName = MCRComponentState.MCC_camera_controls_name_data + ".ctf";

              Stream embeddedCtfStream = null;

              String[] resourceStrings = assembly.GetManifestResourceNames();

              foreach (String name in resourceStrings)
                {
                  if (name.Contains(ctfFileName))
                    {
                      embeddedCtfStream = assembly.GetManifestResourceStream(name);
                      break;
                    }
                }
              mcr= new MWMCR(MCRComponentState.MCC_camera_controls_name_data,
                             MCRComponentState.MCC_camera_controls_root_data,
                             MCRComponentState.MCC_camera_controls_public_data,
                             MCRComponentState.MCC_camera_controls_session_data,
                             MCRComponentState.MCC_camera_controls_matlabpath_data,
                             MCRComponentState.MCC_camera_controls_classpath_data,
                             MCRComponentState.MCC_camera_controls_libpath_data,
                             MCRComponentState.MCC_camera_controls_mcr_application_options,
                             MCRComponentState.MCC_camera_controls_mcr_runtime_options,
                             MCRComponentState.MCC_camera_controls_mcr_pref_dir,
                             MCRComponentState.MCC_camera_controls_set_warning_state,
                             ctfFilePath, embeddedCtfStream, true);
          }
          else
          {
              throw new ApplicationException("MWArray assembly could not be initialized");
          }
      }
      /// <summary internal= "true">
      /// The static constructor instantiates and initializes the MATLAB Component
      /// Runtime instance.
      /// </summary>
      static PdchNewclass()
        {
          if (MWArray.MCRAppInitialized)
            {
              Assembly assembly= Assembly.GetExecutingAssembly();

              string ctfFilePath= assembly.Location;

              int lastDelimeter= ctfFilePath.LastIndexOf(@"\");

              ctfFilePath= ctfFilePath.Remove(lastDelimeter, (ctfFilePath.Length - lastDelimeter));

              mcr= new MWMCR(MCRComponentState.MCC_PdchNew_name_data,
                             MCRComponentState.MCC_PdchNew_root_data,
                             MCRComponentState.MCC_PdchNew_public_data,
                             MCRComponentState.MCC_PdchNew_session_data,
                             MCRComponentState.MCC_PdchNew_matlabpath_data,
                             MCRComponentState.MCC_PdchNew_classpath_data,
                             MCRComponentState.MCC_PdchNew_libpath_data,
                             MCRComponentState.MCC_PdchNew_mcr_application_options,
                             MCRComponentState.MCC_PdchNew_mcr_runtime_options,
                             MCRComponentState.MCC_PdchNew_mcr_pref_dir,
                             MCRComponentState.MCC_PdchNew_set_warning_state,
                             ctfFilePath, true);
            }
          else
            {
              throw new ApplicationException("MWArray assembly could not be initialized");
            }
        }
Beispiel #3
0
        /// <summary internal= "true">
        /// The static constructor instantiates and initializes the MATLAB Compiler Runtime
        /// instance.
        /// </summary>
        static Class1()
        {
            if (MWMCR.MCRAppInitialized)
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                string ctfFilePath = assembly.Location;

                int lastDelimiter = ctfFilePath.LastIndexOf(@"\");

                ctfFilePath = ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

                string ctfFileName = "Untitled1.ctf";

                Stream embeddedCtfStream = null;

                String[] resourceStrings = assembly.GetManifestResourceNames();

                foreach (String name in resourceStrings)
                {
                    if (name.Contains(ctfFileName))
                    {
                        embeddedCtfStream = assembly.GetManifestResourceStream(name);
                        break;
                    }
                }
                mcr = new MWMCR("",
                                ctfFilePath, embeddedCtfStream, true);
            }
            else
            {
                throw new ApplicationException("MWArray assembly could not be initialized");
            }
        }
Beispiel #4
0
    /// <summary internal= "true">
    /// The static constructor instantiates and initializes the MATLAB Compiler Runtime
    /// instance.
    /// </summary>
    static Loader()
    {
      if (MWMCR.MCRAppInitialized)
      {
        Assembly assembly= Assembly.GetExecutingAssembly();

        string ctfFilePath= assembly.Location;

        int lastDelimiter= ctfFilePath.LastIndexOf(@"\");

        ctfFilePath= ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

        string ctfFileName = "Load.ctf";

        Stream embeddedCtfStream = null;

        String[] resourceStrings = assembly.GetManifestResourceNames();

        foreach (String name in resourceStrings)
        {
          if (name.Contains(ctfFileName))
          {
            embeddedCtfStream = assembly.GetManifestResourceStream(name);
            break;
          }
        }
        mcr= new MWMCR("",
                       ctfFilePath, embeddedCtfStream, true);
      }
      else
      {
        throw new ApplicationException("MWArray assembly could not be initialized");
      }
    }
Beispiel #5
0
        /// <summary internal= "true">
        /// The static constructor instantiates and initializes the MATLAB Compiler Runtime
        /// instance.
        /// </summary>
        static PNT()
        {
            if (MWMCR.MCRAppInitialized)
            {
                try
                {
                    Assembly assembly = Assembly.GetExecutingAssembly();

                    string ctfFilePath = assembly.Location;

                    int lastDelimiter = ctfFilePath.LastIndexOf(@"\");

                    ctfFilePath = ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

                    mcr = new MWMCR("PNTSim",
                                    ctfFilePath, true);
                }
                catch (Exception ex)
                {
                    ex_ = new Exception("MWArray assembly failed to be initialized", ex);
                }
            }
            else
            {
                ex_ = new ApplicationException("MWArray assembly could not be initialized");
            }
        }
Beispiel #6
0
        /// <summary internal= "true">
        /// The static constructor instantiates and initializes the MATLAB Component
        /// Runtime instance.
        /// </summary>
        static CalibrationAlgorithmsMATLABclass()
        {
            if (MWArray.MCRAppInitialized)
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                string ctfFilePath = assembly.Location;

                int lastDelimeter = ctfFilePath.LastIndexOf(@"\");

                ctfFilePath = ctfFilePath.Remove(lastDelimeter, (ctfFilePath.Length - lastDelimeter));

                mcr = new MWMCR(MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_name_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_root_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_public_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_session_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_matlabpath_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_classpath_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_libpath_data,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_mcr_application_options,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_mcr_runtime_options,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_mcr_pref_dir,
                                MCRComponentState.MCC_CalibrationAlgorithmsMATLAB_set_warning_state,
                                ctfFilePath, true);
            }
            else
            {
                throw new ApplicationException("MWArray assembly could not be initialized");
            }
        }
Beispiel #7
0
        /// <summary internal= "true">
        /// The static constructor instantiates and initializes the MATLAB Runtime instance.
        /// </summary>
        static Component()
        {
            if (MWMCR.MCRAppInitialized)
            {
                try
                {
                    Assembly assembly = Assembly.GetExecutingAssembly();

                    string ctfFilePath = assembly.Location;

                    int lastDelimiter = ctfFilePath.LastIndexOf(@"/");

                    if (lastDelimiter == -1)
                    {
                        lastDelimiter = ctfFilePath.LastIndexOf(@"\");
                    }

                    ctfFilePath = ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

                    string ctfFileName = "Optimization_For_Test.ctf";

                    Stream embeddedCtfStream = null;

                    String[] resourceStrings = assembly.GetManifestResourceNames();

                    foreach (String name in resourceStrings)
                    {
                        if (name.Contains(ctfFileName))
                        {
                            embeddedCtfStream = assembly.GetManifestResourceStream(name);
                            break;
                        }
                    }
                    mcr = new MWMCR("",
                                    ctfFilePath, embeddedCtfStream, true);
                }
                catch (Exception ex)
                {
                    ex_ = new Exception("MWArray assembly failed to be initialized", ex);
                }
            }
            else
            {
                ex_ = new ApplicationException("MWArray assembly could not be initialized");
            }
        }
Beispiel #8
0
        /// <summary internal= "true">
        /// The static constructor instantiates and initializes the MATLAB Compiler Runtime
        /// instance.
        /// </summary>
        static FigFormatExportor()
        {
            if (MWMCR.MCRAppInitialized)
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                string ctfFilePath = assembly.Location;

                int lastDelimiter = ctfFilePath.LastIndexOf(@"\");

                ctfFilePath = ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

                string ctfFileName = MCRComponentState.MCC_FigExportor_name_data + ".ctf";

                Stream embeddedCtfStream = null;

                String[] resourceStrings = assembly.GetManifestResourceNames();

                foreach (String name in resourceStrings)
                {
                    if (name.Contains(ctfFileName))
                    {
                        embeddedCtfStream = assembly.GetManifestResourceStream(name);
                        break;
                    }
                }
                mcr = new MWMCR(MCRComponentState.MCC_FigExportor_name_data,
                                MCRComponentState.MCC_FigExportor_root_data,
                                MCRComponentState.MCC_FigExportor_public_data,
                                MCRComponentState.MCC_FigExportor_session_data,
                                MCRComponentState.MCC_FigExportor_matlabpath_data,
                                MCRComponentState.MCC_FigExportor_classpath_data,
                                MCRComponentState.MCC_FigExportor_libpath_data,
                                MCRComponentState.MCC_FigExportor_mcr_application_options,
                                MCRComponentState.MCC_FigExportor_mcr_runtime_options,
                                MCRComponentState.MCC_FigExportor_mcr_pref_dir,
                                MCRComponentState.MCC_FigExportor_set_warning_state,
                                ctfFilePath, embeddedCtfStream, true);
            }
            else
            {
                throw new ApplicationException("MWArray assembly could not be initialized");
            }
        }
    /// <summary internal= "true">
    /// The static constructor instantiates and initializes the MATLAB Compiler Runtime
    /// instance.
    /// </summary>
    static MTLSaveVector()
    {
      if (MWMCR.MCRAppInitialized)
      {
        try
        {
          Assembly assembly= Assembly.GetExecutingAssembly();

          string ctfFilePath= assembly.Location;

          int lastDelimiter= ctfFilePath.LastIndexOf(@"\");

          ctfFilePath= ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

          string ctfFileName = "MatLabSaveVectorLib.ctf";

          Stream embeddedCtfStream = null;

          String[] resourceStrings = assembly.GetManifestResourceNames();

          foreach (String name in resourceStrings)
          {
            if (name.Contains(ctfFileName))
            {
              embeddedCtfStream = assembly.GetManifestResourceStream(name);
              break;
            }
          }
          mcr= new MWMCR("",
                         ctfFilePath, embeddedCtfStream, true);
        }
        catch(Exception ex)
        {
          ex_ = new Exception("MWArray assembly failed to be initialized", ex);
        }
      }
      else
      {
        ex_ = new ApplicationException("MWArray assembly could not be initialized");
      }
    }