public MultiSlicerLoader(MultiSlicerDllHandler d, string fname) { unsafe { disposed = false; pathsfilestate.pathfile = null; dll = d; pathsfilestate = dll.loadPathsFile(fname); if (pathsfilestate.pathfile == null) { throw new ApplicationException("The library could not open file " + fname); } if (dll.hasError(pathsfilestate.pathfile)) { throw new ApplicationException("Error trying to open file " + fname); } pathsfileeof = false; pathsfilename = fname; } }
public MultiSlicerHandler(MultiSlicerDllHandler d, string arguments) { dll = d; disposed = false; unsafe { state = null; state = dll.parseArguments(dll.config, arguments); if (dll.hasError(state)) { if (state != null) { dll.freeState(state); state = null; } throw new ApplicationException("Error parsing arguments for the multislicer: " + dll.err); } ParamsExtractInfo info = dll.getParamsExtract(state); numProcesses = info.numProcesses; processRadiuses = new double[numProcesses]; alsoContours = info.alsoContours != 0; usingScheduler = info.usingScheduler != 0; use_z_base = info.use_z_base != 0; if (use_z_base) { z_base = info.z_base; } if (!usingScheduler) { z_uniform_step = info.z_uniform_step; } for (int k = 0; k < numProcesses; ++k) { processRadiuses[k] = info.processRadiuses[k] * dll.factor_internal_to_input; } } }
public MultiSlicerServices(string basepath) { dllpath = System.IO.Path.Combine(basepath, "multires.dll"); dll = new SI.MultiSlicerDllHandler(dllpath); currentconfigname = null; }