Ejemplo n.º 1
0
        public void Profile()
        {
            CircularProfile p = new CircularProfile(1500);

            RectangleD<Bitmap> i = p.GetImage(1000, 1000, new RectangleF(-2000, -2000, 4000, 4000));

            string signature = i.Item.GetSignature();
            Assert.AreEqual("B1FF0A62F65DD493C2781D6D9FB57C4F588F9B0E767EEBAC6219E01EA5A5DF4D", signature, "Image hash");
        }
Ejemplo n.º 2
0
        public void ProfileWithFlat()
        {
            CircularProfile search = new CircularProfile(1000);

            search.AddProfileFlatByLength(0, 1500);
            search.AddProfileFlatByLength(Math.PI, 500, 0.0001, 500);
            search.AddProfileFlat(Math.PI / 2f, 200, 1000);
            search.AddProfileStep(-Math.PI / 4, 1000);
            search.AddProfileStep(-3 * Math.PI / 4, 800);

            string signature = search.GetImage(1000, 1000).Item.GetSignature();
            Assert.AreEqual("EED4365394FDB98CE5A4566244C50FA9925A28F54F8561533295FAC5E4B91FE4", signature, "Image hash");
        }
Ejemplo n.º 3
0
        public void ProfileWith0()
        {
            CircularProfile search = new CircularProfile(1000);

            for (int a = 0; a < 4; a++)
            {
                double a0 = -13f * Math.PI / 12f + a * Math.PI / 2f;
                double a1 = -11f * Math.PI / 12f + a * Math.PI / 2f;
                search.AddProfileStep(a0, 0);
                search.AddProfileStep(a1, 1000);
            }

            string signature = search.GetImage(1000, 1000).Item.GetSignature();
            Assert.AreEqual("98AE8580E2596469A774C97BEE234564E96281C519BFFED621FBB8CC2A63F6D8", signature, "Image hash");
        }
Ejemplo n.º 4
0
		public void Rulers()
		{
			TileTests.MainTile tile = TileTests.GetTile(1);

			IQuantifiedTile<IContextual<TileTests.Item>> t1 = tile
               .Flatten<TileTests.SubTile, TileTests.Item>();

			t1.Reference.Context.Color = Color.Lavender;

			IContextual<TileTests.Item> item = t1.FirstOrDefault(500, 1000);
			item.Context.Color = Color.Red;

			RectangleD<Bitmap> i1 = t1.GetImage(2000, 2000, (z, s) => z.Context.ToBitmap(100, 100, z.X + "\n" + z.Y));

			CircularProfile p = new CircularProfile(1000);

			RectangleD<Bitmap> i2 = p.GetImage(i1);

			string signature = t1.GetRulers(i2, new float[] { 100f, 500f }).Item.GetSignature();
			Assert.AreEqual("9272D2C42A039C2122B649DAD516B390A3A2A3C51BA861B6E615F27BA0F1BDA3", signature, "Image hash");
		}