void EpiDisplayOrigImg(ImgIdxPos pos, Image <Gray, byte> img) { this.BeginInvoke(( Action )(() => { var src = img.Resize(0.1, Inter.Cubic).Normalize(64).Gamma(1.4).ToBitmapSource(); switch (pos) { case ImgIdxPos.TL: imgEpOriginTL.ImageSource = src; break; case ImgIdxPos.TM: imgEpOriginTM.ImageSource = src; break; case ImgIdxPos.TR: imgEpOriginTR.ImageSource = src; break; case ImgIdxPos.BL: imgEpOriginBL.ImageSource = src; break; case ImgIdxPos.BM: imgEpOriginBM.ImageSource = src; break; case ImgIdxPos.BR: imgEpOriginBR.ImageSource = src; break; } })); }
public static EpiProcMethod ImgIdx2EpiMethod( this ImgIdxPos src) { if (src == ImgIdxPos.TM || src == ImgIdxPos.BM) return EpiProcMethod.Mid; else return EpiProcMethod.Side; }
public static double GetPosThreshold( this ImgIdxPos src) { return(src.Match() .With(s => s == ImgIdxPos.TM, 244) .With(s => s == ImgIdxPos.BM, 244) .Else(170) .Do()); }
public static EpiProcMethod ImgIdx2EpiMethod( this ImgIdxPos src) { if (src == ImgIdxPos.TM || src == ImgIdxPos.BM) { return(EpiProcMethod.Mid); } else { return(EpiProcMethod.Side); } }
public Image <Bgr, byte> GetProcedImg(ImgIdxPos pos) { //return new Image<Bgr , byte>( @"C:\Veeco_Result\TestSample.png" ); try { return(EpiProcedImgDic [pos]); } catch (Exception) { return(null); } }
private MouseButtonEventHandler CreateZoomClickMethod(ImgIdxPos pos) { return(( MouseButtonEventHandler ) ((sender, e) => { new ZoomWindow() .Act(win => win.ShowImage(CoreEpi.GetProcedImg(pos))) .Act(win => win.BringToFront()) .Act(win => win.evtClosed += new EvtClosed(RestoreWindowSize)) .Act(win => win.TopMost = true) .Show(); })); }
//public static EpiProcMethod ImgIdx2EpiMethod( // this ImgIdxPos src) //{ // if (src == ImgIdxPos.TM || src == ImgIdxPos.BM) // return EpiProcMethod.Mid; // else // return EpiProcMethod.Side; //} public static EpiProcMethod ImgIdx2EpiMethod( // 20171013 modified for veeco mid top sample this ImgIdxPos src) { if (src == ImgIdxPos.BM) { return(EpiProcMethod.Mid); } if (src == ImgIdxPos.TM) { return(EpiProcMethod.MTop); } else { return(EpiProcMethod.Side); } }
public static T SetImgPos2GridPos <T>( this T src , ImgIdxPos pos) where T : Control { var rowcol = pos.Match() .With(x => x == ImgIdxPos.TL, new int[] { 0, 0 }) .With(x => x == ImgIdxPos.TM, new int[] { 0, 1 }) .With(x => x == ImgIdxPos.TR, new int[] { 0, 2 }) .With(x => x == ImgIdxPos.BL, new int[] { 1, 0 }) .With(x => x == ImgIdxPos.BM, new int[] { 1, 1 }) .With(x => x == ImgIdxPos.BR, new int[] { 1, 2 }) .Else(new int[2]) .Do(); return(src.SetGridPos(rowcol [0], rowcol [1])); }
public static List <DefectData> ShiftDefectData( this List <DefectData> src , Dictionary <OffsetPos, int> offset , ImgIdxPos pos , int resol) { return(pos.Match() .With(x => x == ImgIdxPos.TM, src.ShiftDefect (0, offset[OffsetPos.Col1], resol)) .With(x => x == ImgIdxPos.TR, src.ShiftDefect (0, offset[OffsetPos.Col2], resol)) .With(x => x == ImgIdxPos.BL, src.ShiftDefect (offset [OffsetPos.Row1], 0, resol)) .With(x => x == ImgIdxPos.BM, src.ShiftDefect (offset [OffsetPos.Row1], offset[OffsetPos.Col1], resol)) .With(x => x == ImgIdxPos.BR, src.ShiftDefect (offset [OffsetPos.Row1], offset[OffsetPos.Col2], resol)) .Else(src) .Do()); }
public Image <Bgr, byte> GetProcedImg(ImgIdxPos pos) { //return new Image<Bgr , byte>( @"C:\Veeco_Result\TestSample.png" ); return(EpiProcedImgDic [pos]); }
void EpiDisplayOrigImg(ImgIdxPos pos, Image <Gray, byte> img) { }