Format of a text file of a raster mask

Top

The file should have the quantity of lines corresponding to the height of a raster. Each line of a text file describes a corresponding ruler of pixels of a raster. Passing by a raster is doing from top to down, i.e. the uppermost ruler of pixels corresponds to the first line of a file, etc.

Into a file of a mask the numbers of displayed pixels of the raster standing on border of invisible zones are entered.

The line of a mask file begins from the numerical value designating quantity of alternating zones in a ruler of pixels:

1 - all pixels of a ruler are displayed;

2 - the ruler of pixels contains displayed and not displayed sites;

3 - the ruler of pixels contains 3 sites: displayed, not displayed, displayed;

etc.

If all ruler of pixels is displayed the values are entered into a mask:

      1 (width-1), where

width - width of the image of a raster in pixels.

Example of a text file of a mask for the raster image with a width 4043 pixels:

 

The beginning of a file

1 4042

1 4042

1 4042

1 4042

1 4042

1 4042

1 4042

1 4042

.

.

.

3 3248 3318 4042

3 3248 3318 4042

3 3248 3318 4042

3 3248 3318 4042

3 3248 3318 4042

3 3248 3318 4042

3 3229 3328 4042

3 3229 3328 4042

3 3229 3328 4042

3 3229 3328 4042

3 3229 3328 4042

3 3229 3328 4042

3 3229 3328 4042

.

.

.

5 2227 2267 2386 3496 4042

5 2227 2267 2386 3496 4042

5 2178 2267 2366 3496 4042

5 2178 2267 2366 3496 4042

5 2178 2267 2366 3496 4042

5 2178 2267 2366 3496 4042

5 2178 2267 2366 3496 4042

.

.

.

3 2059 3526 4042

3 2059 3526 4042

3 2059 3526 4042

3 2039 3526 4042

3 2039 3526 4042

3 2039 3526 4042

3 2039 3526 4042

.

.

.

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

5 1087 1107 1266 3665 4042

.

.

.

3 525 4042 4042

3 525 4042 4042

3 525 4042 4042

3 526 4042 4042

3 526 4042 4042

2 526 4042

2 526 4042

2 526 4042

2 526 4042

2 526 4042

.

.

.

1 4042

1 4042

1 4042

1 4042

1 4042

The end of a file