Example #1
0
            public void ReadBodySpans(VxlFile f)
            {
                // need to have position at start of bodies
                f.Seek(StartingSpanOffset, SeekOrigin.Current);
                Spans = new SectionSpan[SizeX, SizeY];

                for (byte y = 0; y < SizeY; ++y)
                {
                    for (byte x = 0; x < SizeX; ++x)
                    {
                        var s = new SectionSpan();
                        s.StartIndex = f.ReadInt32();
                        s.Height     = SizeZ;
                        s.X          = x;
                        s.Y          = y;
                        Spans[x, y]  = s;
                    }
                }
                for (byte y = 0; y < SizeY; ++y)
                {
                    for (byte x = 0; x < SizeX; ++x)
                    {
                        Spans[x, y].EndIndex = f.ReadInt32();
                    }
                }

                for (byte y = 0; y < SizeY; ++y)
                {
                    for (byte x = 0; x < SizeX; ++x)
                    {
                        Spans[x, y].Read(f);
                    }
                }
            }
Example #2
0
            internal void PrepareBody()
            {
                Body.Spans = new SectionSpan[Tail.SizeX, Tail.SizeY];

                for (byte y = 0; y < Tail.SizeY; ++y)
                {
                    for (byte x = 0; x < Tail.SizeX; ++x)
                    {
                        var s = new SectionSpan();
                        s.Height         = Tail.SizeZ;
                        s.X              = x;
                        s.Y              = y;
                        Body.Spans[x, y] = s;
                    }
                }
            }
Example #3
0
            internal void PrepareBody()
            {
                Body.Spans = new SectionSpan[Tail.SizeX, Tail.SizeY];

                for (byte y = 0; y < Tail.SizeY; ++y) {
                    for (byte x = 0; x < Tail.SizeX; ++x) {
                        var s = new SectionSpan();
                        s.Height = Tail.SizeZ;
                        s.X = x;
                        s.Y = y;
                        Body.Spans[x,y] = s;
                    }
                }
            }
Example #4
0
			public void ReadBodySpans(VxlFile f) {
				// need to have position at start of bodies
				f.Seek(StartingSpanOffset, SeekOrigin.Current);
				Spans = new SectionSpan[SizeX, SizeY];

				for (byte y = 0; y < SizeY; ++y) {
					for (byte x = 0; x < SizeX; ++x) {
						var s = new SectionSpan();
						s.StartIndex = f.ReadInt32();
						s.Height = SizeZ;
						s.X = x;
						s.Y = y;
						Spans[x, y] = s;
					}
				}
				for (byte y = 0; y < SizeY; ++y)
					for (byte x = 0; x < SizeX; ++x)
						Spans[x, y].EndIndex = f.ReadInt32();

				for (byte y = 0; y < SizeY; ++y) {
					for (byte x = 0; x < SizeX; ++x) {
						Spans[x, y].Read(f);
					}
				}
			}