Example #1
0
        public SySal.Scanning.Plate.IO.OPERA.RawData.Fragment LoadFragment(uint index)
        {
            System.IO.FileStream f;
            int    i;
            string basetext = CatalogFile.Text.Substring(0, CatalogFile.Text.Length - 1) + "d.";

            f = new System.IO.FileStream(basetext + Convert.ToString(index, 16).PadLeft(8, '0'), FileMode.Open, FileAccess.Read);
            Fragment Frag = new Fragment(f);

            for (i = 0; i < Frag.Length; i++)
            {
                Fragment.View v = Frag[i];
                int           j, l;
                l = v.Top.Length;
                for (j = 0; j < l; j++)
                {
                    MIPEmulsionTrack.AdjustSlopes(v.Top[j], MyConfig.TopSlopeMultiplier, MyConfig.TopSlopeDX, MyConfig.TopSlopeDY);
                }
                l = v.Bottom.Length;
                for (j = 0; j < l; j++)
                {
                    MIPEmulsionTrack.AdjustSlopes(v.Bottom[j], MyConfig.BottomSlopeMultiplier, MyConfig.BottomSlopeDX, MyConfig.BottomSlopeDY);
                }
            }
            f.Close();
            return(Frag);
        }
Example #2
0
 public static void AdjustSlopes(SySal.Scanning.MIPIndexedEmulsionTrack t, double slopemultiplier, double slopedx, double slopedy)
 {
     SySal.Tracking.MIPEmulsionTrackInfo info = MIPEmulsionTrack.AccessInfo(t);
     info.Slope.X = info.Slope.X * slopemultiplier + slopedx;
     info.Slope.Y = info.Slope.Y * slopemultiplier + slopedy;
 }