Exemple #1
0
        public void dodispose()
        {
            if (!disposed)
            {
                unsafe {
                    GC.SuppressFinalize(this);

                    if (state != null)
                    {
                        dll.freeState(state);
                    }
                }
            }
        }
Exemple #2
0
        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;
                }
            }
        }