public void SetOutTime(int outtime) { if (outtime == 0) { OutTime = 0; TimeOutEnable = false; } else { OutTime = outtime; TimeOutEnable = true; } if (nCCModel != null && nCCModel.IsInitialized()) { if (TimeOutEnable) { nCCModel.SetNccModelParam("timeout", OutTime); } else { nCCModel.SetNccModelParam("timeout", "false"); } } }
public bool CreateNccModel() { try { HImage modelImage = ModelImg.ReduceDomain(ModelRegion); HNCCModel model = new HNCCModel(modelImage, nCCParam.NumLevels, nCCParam.mStartingAngle, nCCParam.mAngleExtent, nCCParam.AngleStep, nCCParam.Metric); if (nCCModel != null) { nCCModel.Dispose(); } nCCModel = model; ModelImgRow = ModelRegion.Row[0].F; ModelImgCol = ModelRegion.Column[0].F; if (TimeOutEnable) { model.SetNccModelParam("timeout", OutTime); } createNewModelID = false; return(true); } catch { return(false); } }