/usr/share/doc/libcpl-dev/html/group__cpl__mask.html is in libcpl-doc 7.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>Common Pipeline Library Reference Manual: Masks of pixels</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="cpl.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Common Pipeline Library Reference Manual
 <span id="projectnumber">7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Masks of pixels</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5e856d16ee1665f5072658967a595c2d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga5e856d16ee1665f5072658967a595c2d">cpl_mask_and</a> (cpl_mask *in1, const cpl_mask *in2)</td></tr>
<tr class="memdesc:ga5e856d16ee1665f5072658967a595c2d"><td class="mdescLeft"> </td><td class="mdescRight">Performs a logical AND of one mask onto another. <a href="#ga5e856d16ee1665f5072658967a595c2d">More...</a><br /></td></tr>
<tr class="separator:ga5e856d16ee1665f5072658967a595c2d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga642b27231cdcec2fff9379868419ffb8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga642b27231cdcec2fff9379868419ffb8">cpl_mask_closing</a> (cpl_mask *in, const cpl_matrix *ker)</td></tr>
<tr class="memdesc:ga642b27231cdcec2fff9379868419ffb8"><td class="mdescLeft"> </td><td class="mdescRight">Compute a morphological closing. <a href="#ga642b27231cdcec2fff9379868419ffb8">More...</a><br /></td></tr>
<tr class="separator:ga642b27231cdcec2fff9379868419ffb8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaca65aba3c896a83a68054403544a4959"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaca65aba3c896a83a68054403544a4959">cpl_mask_collapse_create</a> (const cpl_mask *in, int dir)</td></tr>
<tr class="memdesc:gaca65aba3c896a83a68054403544a4959"><td class="mdescLeft"> </td><td class="mdescRight">Collapse a mask. <a href="#gaca65aba3c896a83a68054403544a4959">More...</a><br /></td></tr>
<tr class="separator:gaca65aba3c896a83a68054403544a4959"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga53baa443039ca40d078fae26ca9e2fac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga53baa443039ca40d078fae26ca9e2fac">cpl_mask_copy</a> (cpl_mask *in1, const cpl_mask *in2, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> x_pos, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> y_pos)</td></tr>
<tr class="memdesc:ga53baa443039ca40d078fae26ca9e2fac"><td class="mdescLeft"> </td><td class="mdescRight">Insert a mask in an other one. <a href="#ga53baa443039ca40d078fae26ca9e2fac">More...</a><br /></td></tr>
<tr class="separator:ga53baa443039ca40d078fae26ca9e2fac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga38f7063792f43c2ca0955e5188d0b66d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga38f7063792f43c2ca0955e5188d0b66d">cpl_mask_count</a> (const cpl_mask *in)</td></tr>
<tr class="memdesc:ga38f7063792f43c2ca0955e5188d0b66d"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of occurences of CPL_BINARY_1. <a href="#ga38f7063792f43c2ca0955e5188d0b66d">More...</a><br /></td></tr>
<tr class="separator:ga38f7063792f43c2ca0955e5188d0b66d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga039a62ece165a67688e12fdf20bfc9a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga039a62ece165a67688e12fdf20bfc9a9">cpl_mask_count_window</a> (const cpl_mask *self, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> llx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> lly, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> urx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ury)</td></tr>
<tr class="memdesc:ga039a62ece165a67688e12fdf20bfc9a9"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of occurences of CPL_BINARY_1 in a window. <a href="#ga039a62ece165a67688e12fdf20bfc9a9">More...</a><br /></td></tr>
<tr class="separator:ga039a62ece165a67688e12fdf20bfc9a9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa312160718b8fdc24de0cd755cf35224"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete</a> (cpl_mask *m)</td></tr>
<tr class="memdesc:gaa312160718b8fdc24de0cd755cf35224"><td class="mdescLeft"> </td><td class="mdescRight">Delete a cpl_mask. <a href="#gaa312160718b8fdc24de0cd755cf35224">More...</a><br /></td></tr>
<tr class="separator:gaa312160718b8fdc24de0cd755cf35224"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0cfe07358900f79c4c58f4e682d1e450"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga0cfe07358900f79c4c58f4e682d1e450">cpl_mask_dilation</a> (cpl_mask *in, const cpl_matrix *ker)</td></tr>
<tr class="memdesc:ga0cfe07358900f79c4c58f4e682d1e450"><td class="mdescLeft"> </td><td class="mdescRight">Compute a morphological dilation. <a href="#ga0cfe07358900f79c4c58f4e682d1e450">More...</a><br /></td></tr>
<tr class="separator:ga0cfe07358900f79c4c58f4e682d1e450"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga368d785075cd44092774666b6918ef25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga368d785075cd44092774666b6918ef25">cpl_mask_dump_window</a> (const cpl_mask *self, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> llx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> lly, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> urx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ury, FILE *stream)</td></tr>
<tr class="memdesc:ga368d785075cd44092774666b6918ef25"><td class="mdescLeft"> </td><td class="mdescRight">Dump a mask. <a href="#ga368d785075cd44092774666b6918ef25">More...</a><br /></td></tr>
<tr class="separator:ga368d785075cd44092774666b6918ef25"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga9eb7b94e28606874356b70be4eedb53d"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate</a> (const cpl_mask *in)</td></tr>
<tr class="memdesc:ga9eb7b94e28606874356b70be4eedb53d"><td class="mdescLeft"> </td><td class="mdescRight">Duplicates a cpl_mask. <a href="#ga9eb7b94e28606874356b70be4eedb53d">More...</a><br /></td></tr>
<tr class="separator:ga9eb7b94e28606874356b70be4eedb53d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gacc6e71e1be5d91e3675d47ec848138c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gacc6e71e1be5d91e3675d47ec848138c5">cpl_mask_erosion</a> (cpl_mask *in, const cpl_matrix *ker)</td></tr>
<tr class="memdesc:gacc6e71e1be5d91e3675d47ec848138c5"><td class="mdescLeft"> </td><td class="mdescRight">Compute a morphological erosion. <a href="#gacc6e71e1be5d91e3675d47ec848138c5">More...</a><br /></td></tr>
<tr class="separator:gacc6e71e1be5d91e3675d47ec848138c5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8fd7d6feabd3a80f239650fa4eb6db4f"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga8fd7d6feabd3a80f239650fa4eb6db4f">cpl_mask_extract</a> (const cpl_mask *in, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> llx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> lly, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> urx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ury)</td></tr>
<tr class="memdesc:ga8fd7d6feabd3a80f239650fa4eb6db4f"><td class="mdescLeft"> </td><td class="mdescRight">Extract a mask from an other one. <a href="#ga8fd7d6feabd3a80f239650fa4eb6db4f">More...</a><br /></td></tr>
<tr class="separator:ga8fd7d6feabd3a80f239650fa4eb6db4f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac7eff859335d64ef228ff51d9fcde05d"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gac7eff859335d64ef228ff51d9fcde05d">cpl_mask_extract_subsample</a> (const cpl_mask *in, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> xstep, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ystep)</td></tr>
<tr class="memdesc:gac7eff859335d64ef228ff51d9fcde05d"><td class="mdescLeft"> </td><td class="mdescRight">Subsample a mask. <a href="#gac7eff859335d64ef228ff51d9fcde05d">More...</a><br /></td></tr>
<tr class="separator:gac7eff859335d64ef228ff51d9fcde05d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga093beb6bd195ec15a931034b3d28a8eb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter</a> (cpl_mask *self, const cpl_mask *other, const cpl_mask *kernel, <a class="el" href="group__cpl__filter.html#ga4469cc9402438f791bbcccae762e0b2f">cpl_filter_mode</a> filter, <a class="el" href="group__cpl__filter.html#ga9d26d8ff5e92c0df5fae1289fae9ecbc">cpl_border_mode</a> border)</td></tr>
<tr class="memdesc:ga093beb6bd195ec15a931034b3d28a8eb"><td class="mdescLeft"> </td><td class="mdescRight">Filter a mask using a binary kernel. <a href="#ga093beb6bd195ec15a931034b3d28a8eb">More...</a><br /></td></tr>
<tr class="separator:ga093beb6bd195ec15a931034b3d28a8eb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac5c6b63e393cf52d09101c6b731d0916"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gac5c6b63e393cf52d09101c6b731d0916">cpl_mask_flip</a> (cpl_mask *in, int angle)</td></tr>
<tr class="memdesc:gac5c6b63e393cf52d09101c6b731d0916"><td class="mdescLeft"> </td><td class="mdescRight">Flip a mask on a given mirror line. <a href="#gac5c6b63e393cf52d09101c6b731d0916">More...</a><br /></td></tr>
<tr class="separator:gac5c6b63e393cf52d09101c6b731d0916"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gabc90bc577ad09eb79cbd702cbd69dec2"><td class="memItemLeft" align="right" valign="top">cpl_binary </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gabc90bc577ad09eb79cbd702cbd69dec2">cpl_mask_get</a> (const cpl_mask *self, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> xpos, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ypos)</td></tr>
<tr class="memdesc:gabc90bc577ad09eb79cbd702cbd69dec2"><td class="mdescLeft"> </td><td class="mdescRight">Get the value of a mask at a given position. <a href="#gabc90bc577ad09eb79cbd702cbd69dec2">More...</a><br /></td></tr>
<tr class="separator:gabc90bc577ad09eb79cbd702cbd69dec2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga462a148e501731a123e573e6f818f8c2"><td class="memItemLeft" align="right" valign="top">cpl_binary * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data</a> (cpl_mask *in)</td></tr>
<tr class="memdesc:ga462a148e501731a123e573e6f818f8c2"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the data part of the mask. <a href="#ga462a148e501731a123e573e6f818f8c2">More...</a><br /></td></tr>
<tr class="separator:ga462a148e501731a123e573e6f818f8c2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac9ab11af7ef4ff0b8424141271fd685b"><td class="memItemLeft" align="right" valign="top">const cpl_binary * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const</a> (const cpl_mask *in)</td></tr>
<tr class="memdesc:gac9ab11af7ef4ff0b8424141271fd685b"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the data part of the mask. <a href="#gac9ab11af7ef4ff0b8424141271fd685b">More...</a><br /></td></tr>
<tr class="separator:gac9ab11af7ef4ff0b8424141271fd685b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaefb412dd754146bc78faf7356209a0e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaefb412dd754146bc78faf7356209a0e6">cpl_mask_get_size_x</a> (const cpl_mask *in)</td></tr>
<tr class="memdesc:gaefb412dd754146bc78faf7356209a0e6"><td class="mdescLeft"> </td><td class="mdescRight">Get the x size of the mask. <a href="#gaefb412dd754146bc78faf7356209a0e6">More...</a><br /></td></tr>
<tr class="separator:gaefb412dd754146bc78faf7356209a0e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2c515a5ba20381c54c0496c1b9769495"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga2c515a5ba20381c54c0496c1b9769495">cpl_mask_get_size_y</a> (const cpl_mask *in)</td></tr>
<tr class="memdesc:ga2c515a5ba20381c54c0496c1b9769495"><td class="mdescLeft"> </td><td class="mdescRight">Get the y size of the mask. <a href="#ga2c515a5ba20381c54c0496c1b9769495">More...</a><br /></td></tr>
<tr class="separator:ga2c515a5ba20381c54c0496c1b9769495"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0009ad4c6aed58343b09e47ef38ef9e4"><td class="memItemLeft" align="right" valign="top">cpl_boolean </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga0009ad4c6aed58343b09e47ef38ef9e4">cpl_mask_is_empty</a> (const cpl_mask *self)</td></tr>
<tr class="memdesc:ga0009ad4c6aed58343b09e47ef38ef9e4"><td class="mdescLeft"> </td><td class="mdescRight">Return CPL_TRUE iff a mask has no elements set (to CPL_BINARY_1) <a href="#ga0009ad4c6aed58343b09e47ef38ef9e4">More...</a><br /></td></tr>
<tr class="separator:ga0009ad4c6aed58343b09e47ef38ef9e4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga444cf7285691d170647742a20560e93e"><td class="memItemLeft" align="right" valign="top">cpl_boolean </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga444cf7285691d170647742a20560e93e">cpl_mask_is_empty_window</a> (const cpl_mask *self, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> llx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> lly, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> urx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ury)</td></tr>
<tr class="memdesc:ga444cf7285691d170647742a20560e93e"><td class="mdescLeft"> </td><td class="mdescRight">Return CPL_TRUE iff a mask has no elements set in the window. <a href="#ga444cf7285691d170647742a20560e93e">More...</a><br /></td></tr>
<tr class="separator:ga444cf7285691d170647742a20560e93e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa4e10ebd475259a69598a2bbdb280c01"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaa4e10ebd475259a69598a2bbdb280c01">cpl_mask_load</a> (const char *filename, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> pnum, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> xtnum)</td></tr>
<tr class="memdesc:gaa4e10ebd475259a69598a2bbdb280c01"><td class="mdescLeft"> </td><td class="mdescRight">Load a mask from a FITS file. <a href="#gaa4e10ebd475259a69598a2bbdb280c01">More...</a><br /></td></tr>
<tr class="separator:gaa4e10ebd475259a69598a2bbdb280c01"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3df2641567591e06e3f3d1e9f7b4d848"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga3df2641567591e06e3f3d1e9f7b4d848">cpl_mask_load_window</a> (const char *filename, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> pnum, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> xtnum, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> llx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> lly, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> urx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ury)</td></tr>
<tr class="memdesc:ga3df2641567591e06e3f3d1e9f7b4d848"><td class="mdescLeft"> </td><td class="mdescRight">Load a mask from a FITS file. <a href="#ga3df2641567591e06e3f3d1e9f7b4d848">More...</a><br /></td></tr>
<tr class="separator:ga3df2641567591e06e3f3d1e9f7b4d848"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2abd710ec2b8c2e9b2de9336ea6d441f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga2abd710ec2b8c2e9b2de9336ea6d441f">cpl_mask_move</a> (cpl_mask *in, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> nb_cut, const <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> *new_pos)</td></tr>
<tr class="memdesc:ga2abd710ec2b8c2e9b2de9336ea6d441f"><td class="mdescLeft"> </td><td class="mdescRight">Reorganize the pixels in a mask. <a href="#ga2abd710ec2b8c2e9b2de9336ea6d441f">More...</a><br /></td></tr>
<tr class="separator:ga2abd710ec2b8c2e9b2de9336ea6d441f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab67918578893ea4a0e005cb4397f8754"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gab67918578893ea4a0e005cb4397f8754">cpl_mask_new</a> (<a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> nx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ny)</td></tr>
<tr class="memdesc:gab67918578893ea4a0e005cb4397f8754"><td class="mdescLeft"> </td><td class="mdescRight">Create a new cpl_mask. <a href="#gab67918578893ea4a0e005cb4397f8754">More...</a><br /></td></tr>
<tr class="separator:gab67918578893ea4a0e005cb4397f8754"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa30bea67c21cd608beb6add0a45a3f2f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaa30bea67c21cd608beb6add0a45a3f2f">cpl_mask_not</a> (cpl_mask *in)</td></tr>
<tr class="memdesc:gaa30bea67c21cd608beb6add0a45a3f2f"><td class="mdescLeft"> </td><td class="mdescRight">Performs a logical NOT on a mask. <a href="#gaa30bea67c21cd608beb6add0a45a3f2f">More...</a><br /></td></tr>
<tr class="separator:gaa30bea67c21cd608beb6add0a45a3f2f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0b486fea034d89b0500661833f710942"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga0b486fea034d89b0500661833f710942">cpl_mask_opening</a> (cpl_mask *in, const cpl_matrix *ker)</td></tr>
<tr class="memdesc:ga0b486fea034d89b0500661833f710942"><td class="mdescLeft"> </td><td class="mdescRight">Compute a morphological opening. <a href="#ga0b486fea034d89b0500661833f710942">More...</a><br /></td></tr>
<tr class="separator:ga0b486fea034d89b0500661833f710942"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf12dc55fffbbd55e9525bc69f39339a4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaf12dc55fffbbd55e9525bc69f39339a4">cpl_mask_or</a> (cpl_mask *in1, const cpl_mask *in2)</td></tr>
<tr class="memdesc:gaf12dc55fffbbd55e9525bc69f39339a4"><td class="mdescLeft"> </td><td class="mdescRight">Performs a logical OR of one mask onto another. <a href="#gaf12dc55fffbbd55e9525bc69f39339a4">More...</a><br /></td></tr>
<tr class="separator:gaf12dc55fffbbd55e9525bc69f39339a4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa1404cab121f52a6eae13697c0ca5d0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaa1404cab121f52a6eae13697c0ca5d0e">cpl_mask_save</a> (const cpl_mask *self, const char *filename, const <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> *pl, unsigned mode)</td></tr>
<tr class="memdesc:gaa1404cab121f52a6eae13697c0ca5d0e"><td class="mdescLeft"> </td><td class="mdescRight">Save a mask to a FITS file. <a href="#gaa1404cab121f52a6eae13697c0ca5d0e">More...</a><br /></td></tr>
<tr class="separator:gaa1404cab121f52a6eae13697c0ca5d0e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga849bad9dc8eb9dbd9a463d7a24f8de61"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga849bad9dc8eb9dbd9a463d7a24f8de61">cpl_mask_set</a> (cpl_mask *self, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> xpos, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ypos, cpl_binary value)</td></tr>
<tr class="memdesc:ga849bad9dc8eb9dbd9a463d7a24f8de61"><td class="mdescLeft"> </td><td class="mdescRight">Set a value in a mask at a given position. <a href="#ga849bad9dc8eb9dbd9a463d7a24f8de61">More...</a><br /></td></tr>
<tr class="separator:ga849bad9dc8eb9dbd9a463d7a24f8de61"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab90af7f91b5537fa94a77472869c9588"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gab90af7f91b5537fa94a77472869c9588">cpl_mask_shift</a> (cpl_mask *self, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> dx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> dy)</td></tr>
<tr class="memdesc:gab90af7f91b5537fa94a77472869c9588"><td class="mdescLeft"> </td><td class="mdescRight">Shift a mask. <a href="#gab90af7f91b5537fa94a77472869c9588">More...</a><br /></td></tr>
<tr class="separator:gab90af7f91b5537fa94a77472869c9588"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga876fa3873a09a7ed4a473432b399c9a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2">cpl_mask_threshold_image</a> (cpl_mask *self, const cpl_image *image, double lo_cut, double hi_cut, cpl_binary inval)</td></tr>
<tr class="memdesc:ga876fa3873a09a7ed4a473432b399c9a2"><td class="mdescLeft"> </td><td class="mdescRight">Select parts of an image with provided thresholds. <a href="#ga876fa3873a09a7ed4a473432b399c9a2">More...</a><br /></td></tr>
<tr class="separator:ga876fa3873a09a7ed4a473432b399c9a2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae96b3b0d506ef4f97f0ce2d8d0d70d22"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gae96b3b0d506ef4f97f0ce2d8d0d70d22">cpl_mask_threshold_image_create</a> (const cpl_image *in, double lo_cut, double hi_cut)</td></tr>
<tr class="memdesc:gae96b3b0d506ef4f97f0ce2d8d0d70d22"><td class="mdescLeft"> </td><td class="mdescRight">Select parts of an image with provided thresholds. <a href="#gae96b3b0d506ef4f97f0ce2d8d0d70d22">More...</a><br /></td></tr>
<tr class="separator:gae96b3b0d506ef4f97f0ce2d8d0d70d22"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2a4b0a1ac819f9904541feb96bc7c82d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga2a4b0a1ac819f9904541feb96bc7c82d">cpl_mask_turn</a> (cpl_mask *self, int rot)</td></tr>
<tr class="memdesc:ga2a4b0a1ac819f9904541feb96bc7c82d"><td class="mdescLeft"> </td><td class="mdescRight">Rotate a mask by a multiple of 90 degrees clockwise. <a href="#ga2a4b0a1ac819f9904541feb96bc7c82d">More...</a><br /></td></tr>
<tr class="separator:ga2a4b0a1ac819f9904541feb96bc7c82d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1b3fef7416a8189fb121fdb69a44653b"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga1b3fef7416a8189fb121fdb69a44653b">cpl_mask_unwrap</a> (cpl_mask *m)</td></tr>
<tr class="memdesc:ga1b3fef7416a8189fb121fdb69a44653b"><td class="mdescLeft"> </td><td class="mdescRight">Delete a cpl_mask except the data array. <a href="#ga1b3fef7416a8189fb121fdb69a44653b">More...</a><br /></td></tr>
<tr class="separator:ga1b3fef7416a8189fb121fdb69a44653b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7f9767654033c50dd87d31cbde060593"><td class="memItemLeft" align="right" valign="top">cpl_mask * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#ga7f9767654033c50dd87d31cbde060593">cpl_mask_wrap</a> (<a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> nx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ny, cpl_binary *data)</td></tr>
<tr class="memdesc:ga7f9767654033c50dd87d31cbde060593"><td class="mdescLeft"> </td><td class="mdescRight">Create a cpl_mask from existing data. <a href="#ga7f9767654033c50dd87d31cbde060593">More...</a><br /></td></tr>
<tr class="separator:ga7f9767654033c50dd87d31cbde060593"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa8fcc4a4de703661d38198e74002a777"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__mask.html#gaa8fcc4a4de703661d38198e74002a777">cpl_mask_xor</a> (cpl_mask *in1, const cpl_mask *in2)</td></tr>
<tr class="memdesc:gaa8fcc4a4de703661d38198e74002a777"><td class="mdescLeft"> </td><td class="mdescRight">Performs a logical XOR of one mask onto another. <a href="#gaa8fcc4a4de703661d38198e74002a777">More...</a><br /></td></tr>
<tr class="separator:gaa8fcc4a4de703661d38198e74002a777"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module provides functions to handle masks of pixels</p>
<p>These masks are useful for object detection routines or bad pixel map handling. Morphological routines (erosion, dilation, closing and opening) and logical operations are provided. A cpl_mask is a kind of binary array whose elements are of type cpl_binary and can take only two values: either CPL_BINARY_0 or CPL_BINARY_1.</p>
<p>The element indexing follows the FITS convention in the sense that the lower left element in a CPL mask has index (1, 1).</p>
<dl class="section user"><dt>Synopsis:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include "cpl_mask.h"</span></div>
</div><!-- fragment --> </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga5e856d16ee1665f5072658967a595c2d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_and </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs a logical AND of one mask onto another. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in1</td><td>first mask, to be modified </td></tr>
<tr><td class="paramname">in2</td><td>second mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success, otherwise the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga6e4e66328086841fcd96e2eec56a7bb7" title="The bit-wise and of two images with integer pixels. ">cpl_image_and()</a></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the two masks have different sizes </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga642b27231cdcec2fff9379868419ffb8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_closing </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>ker</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute a morphological closing. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask to filter </td></tr>
<tr><td class="paramname">ker</td><td>binary kernel (0 for 0, any other value is considered as 1) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000016">Deprecated:</a></b></dt><dd>Replace this call with <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> using CPL_FILTER_CLOSING and CPL_BORDER_ZERO.</dd></dl>
<p>References <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2acae7599ac2a7a21ebbcf186b59089f38bc">CPL_BORDER_ZERO</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372a6b163d35efe2489a022eef54789cdce9">CPL_FILTER_CLOSING</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, and <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>.</p>
</div>
</div>
<a class="anchor" id="gaca65aba3c896a83a68054403544a4959"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_collapse_create </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>dir</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Collapse a mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask to collapse </td></tr>
<tr><td class="paramname">dir</td><td>collapsing direction </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the newly allocated mask or NULL on error </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned mask must be deallocated using <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a>.</dd></dl>
<p>direction 0 collapses along y, producing a nx by 1 mask direction 1 collapses along x, producing a 1 by ny mask</p>
<p>The resulting mask element is set to CPL_BINARY_1 iff all elements of the associated column (resp. row) in the input mask are set to CPL_BINARY_1.</p>
<pre class="fragment">Direction 0 collapse:
1 0 1 Input mask.
0 1 1
0 0 1
-----
0 0 1 Only the third element is set to CPL_BINARY_1 since all input
elements of that column are set to CPL_BINARY_1.
</pre><p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT</li>
<li>CPL_ERROR_ILLEGAL_INPUT </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc()</a>, and <a class="el" href="group__cpl__mask.html#ga7f9767654033c50dd87d31cbde060593">cpl_mask_wrap()</a>.</p>
</div>
</div>
<a class="anchor" id="ga53baa443039ca40d078fae26ca9e2fac"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_copy </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>x_pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>y_pos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert a mask in an other one. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in1</td><td>mask in which in2 is inserted </td></tr>
<tr><td class="paramname">in2</td><td>mask to insert </td></tr>
<tr><td class="paramname">x_pos</td><td>the x pixel position in in1 where the lower left pixel of in2 should go (from 1 to the x size of in1) </td></tr>
<tr><td class="paramname">y_pos</td><td>the y pixel position in in1 where the lower left pixel of in2 should go (from 1 to the y size of in1) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> or CPL_ERROR_NONE</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if in1 or in2 is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if x_pos, y_pos is outside in1 </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, and <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#ga13a42c86638d087b5a097c87e36ea7bc">cpl_image_copy()</a>, and <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>.</p>
</div>
</div>
<a class="anchor" id="ga38f7063792f43c2ca0955e5188d0b66d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> cpl_mask_count </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of occurences of CPL_BINARY_1. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>the input mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of occurences of CPL_BINARY_1 or -1 on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga039a62ece165a67688e12fdf20bfc9a9" title="Get the number of occurences of CPL_BINARY_1 in a window. ">cpl_mask_count_window()</a></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, and <a class="el" href="group__cpl__mask.html#ga039a62ece165a67688e12fdf20bfc9a9">cpl_mask_count_window()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gafc771042281af33e78b366ef2f8e95e7">cpl_image_count_rejected()</a>, and <a class="el" href="group__cpl__image.html#ga41844eae7e6bfd6594c3fbfe4b1e481e">cpl_image_dump_structure()</a>.</p>
</div>
</div>
<a class="anchor" id="ga039a62ece165a67688e12fdf20bfc9a9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> cpl_mask_count_window </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>llx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>lly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>urx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ury</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of occurences of CPL_BINARY_1 in a window. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The mask to count </td></tr>
<tr><td class="paramname">llx</td><td>Lower left x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">lly</td><td>Lower left y position (FITS convention, 1 for lowest) </td></tr>
<tr><td class="paramname">urx</td><td>Upper right x position (FITS convention) </td></tr>
<tr><td class="paramname">ury</td><td>Upper right y position (FITS convention) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of occurences of CPL_BINARY_1 or -1 on error</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the window coordinates are invalid </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__mask.html#ga38f7063792f43c2ca0955e5188d0b66d">cpl_mask_count()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa312160718b8fdc24de0cd755cf35224"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cpl_mask_delete </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>m</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete a cpl_mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">m</td><td>cpl_mask to delete </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void</dd></dl>
<p>The function deallocates the memory used by the mask <em>m</em>. If <em>m</em> is <code>NULL</code>, nothing is done, and no error is set. </p>
<p>References <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__apertures.html#ga35155a7e7eac69da19b08aa1cb112168">cpl_apertures_extract_sigma()</a>, <a class="el" href="group__cpl__fit.html#gac3d906c5ea114812ee3ca7f8e9fa49b7">cpl_fit_imagelist_polynomial_window()</a>, <a class="el" href="group__cpl__geom__img.html#ga135df3510913add18d5550a8aa356923">cpl_geom_img_offset_fine()</a>, <a class="el" href="group__cpl__image.html#ga035ba167b6776b782e9920335dba5587">cpl_image_accept_all()</a>, <a class="el" href="group__cpl__image.html#ga13a42c86638d087b5a097c87e36ea7bc">cpl_image_copy()</a>, <a class="el" href="group__cpl__image.html#ga272e4e004716651b94d6d36e575b6841">cpl_image_delete()</a>, <a class="el" href="group__cpl__image.html#gaf84f969c52240629187d1a5e65411435">cpl_image_divide()</a>, <a class="el" href="group__cpl__image.html#gafad621e6d1960251ec23984039e838c6">cpl_image_divide_create()</a>, <a class="el" href="group__cpl__image.html#ga52d2e5aa1ce2c9bc3c560209e344ba40">cpl_image_filter_median()</a>, <a class="el" href="group__cpl__image.html#ga19d4e60abbeaf99717d3985c76aaadbd">cpl_image_filter_stdev()</a>, <a class="el" href="group__cpl__image.html#ga0e7668aa99a78f4f5314cfc00a89a04f">cpl_image_unwrap()</a>, <a class="el" href="group__cpl__image.html#ga53d75eb2e23114e4870c4d523081bfda">cpl_image_warp()</a>, <a class="el" href="group__cpl__image.html#ga34b80ed421f88c5bdad3f0127d251975">cpl_image_warp_polynomial()</a>, <a class="el" href="group__cpl__imagelist.html#gaebff09158515dcd0e9e95a32f3678631">cpl_imagelist_swap_axis_create()</a>, <a class="el" href="group__cpl__mask.html#ga642b27231cdcec2fff9379868419ffb8">cpl_mask_closing()</a>, <a class="el" href="group__cpl__mask.html#ga0cfe07358900f79c4c58f4e682d1e450">cpl_mask_dilation()</a>, <a class="el" href="group__cpl__mask.html#gacc6e71e1be5d91e3675d47ec848138c5">cpl_mask_erosion()</a>, <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>, <a class="el" href="group__cpl__mask.html#gac5c6b63e393cf52d09101c6b731d0916">cpl_mask_flip()</a>, <a class="el" href="group__cpl__mask.html#ga2abd710ec2b8c2e9b2de9336ea6d441f">cpl_mask_move()</a>, <a class="el" href="group__cpl__mask.html#ga0b486fea034d89b0500661833f710942">cpl_mask_opening()</a>, <a class="el" href="group__cpl__mask.html#gae96b3b0d506ef4f97f0ce2d8d0d70d22">cpl_mask_threshold_image_create()</a>, <a class="el" href="group__cpl__mask.html#ga2a4b0a1ac819f9904541feb96bc7c82d">cpl_mask_turn()</a>, and <a class="el" href="group__cpl__vector.html#gae804fc37f617a11d5c5e73f901c55f36">cpl_vector_filter_median_create()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0cfe07358900f79c4c58f4e682d1e450"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_dilation </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>ker</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute a morphological dilation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask to filter </td></tr>
<tr><td class="paramname">ker</td><td>binary kernel (0 for 0, any other value is considered as 1) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000018">Deprecated:</a></b></dt><dd>Replace this call with <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> using CPL_FILTER_DILATION and CPL_BORDER_ZERO.</dd></dl>
<p>References <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2acae7599ac2a7a21ebbcf186b59089f38bc">CPL_BORDER_ZERO</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372ab798984e3cc1e7677fd09fa1db11fcdd">CPL_FILTER_DILATION</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate()</a>, and <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>.</p>
</div>
</div>
<a class="anchor" id="ga368d785075cd44092774666b6918ef25"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_dump_window </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>llx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>lly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>urx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ury</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FILE * </td>
<td class="paramname"><em>stream</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Dump a mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>mask to dump </td></tr>
<tr><td class="paramname">llx</td><td>Lower left x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">lly</td><td>Lower left y position (FITS convention, 1 for lowest) </td></tr>
<tr><td class="paramname">urx</td><td>Upper right x position (FITS convention) </td></tr>
<tr><td class="paramname">ury</td><td>Upper right y position (FITS convention) </td></tr>
<tr><td class="paramname">stream</td><td>Output stream, accepts <code>stdout</code> or <code>stderr</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE or the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on error</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_FILE_IO if a write operation fails</li>
<li>CPL_ERROR_ACCESS_OUT_OF_RANGE if the defined window is not in the mask</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the window definition is wrong (e.g llx > urx) </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0d916ea6a7e198a74863ecd9ea03d733">CPL_ERROR_ACCESS_OUT_OF_RANGE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900aa54303ad2fb0efc3f8c57c788b342c81">CPL_ERROR_FILE_IO</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, and <a class="el" href="group__cpl__type.html#ga4f6c44a14bbc3aea87b1f47acf8dfd02">CPL_SIZE_FORMAT</a>.</p>
</div>
</div>
<a class="anchor" id="ga9eb7b94e28606874356b70be4eedb53d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_duplicate </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Duplicates a cpl_mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>the mask to duplicate </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated cpl_mask or NULL on error</dd></dl>
<p>The returned object must be deallocated using <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a>.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if in is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc()</a>, and <a class="el" href="group__cpl__mask.html#ga7f9767654033c50dd87d31cbde060593">cpl_mask_wrap()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gaa171e04962288d941cd599cca86e4311">cpl_image_average_create()</a>, <a class="el" href="group__cpl__image.html#gad986c25e9250952770f854022e1ffb24">cpl_image_cast()</a>, <a class="el" href="group__cpl__image.html#gaf84f969c52240629187d1a5e65411435">cpl_image_divide()</a>, <a class="el" href="group__cpl__image.html#gafad621e6d1960251ec23984039e838c6">cpl_image_divide_create()</a>, <a class="el" href="group__cpl__image.html#gadebfe1dae2cbd7a59fc09b323c55c10e">cpl_image_duplicate()</a>, <a class="el" href="group__cpl__image.html#ga787eff33b78af1e8d6d79189cdcf418b">cpl_image_or_mask()</a>, <a class="el" href="group__cpl__image.html#ga6c69e93b4bdfa9d09730d3707a4786b9">cpl_image_or_mask_unary()</a>, <a class="el" href="group__cpl__mask.html#ga0cfe07358900f79c4c58f4e682d1e450">cpl_mask_dilation()</a>, <a class="el" href="group__cpl__mask.html#gacc6e71e1be5d91e3675d47ec848138c5">cpl_mask_erosion()</a>, <a class="el" href="group__cpl__mask.html#gac5c6b63e393cf52d09101c6b731d0916">cpl_mask_flip()</a>, <a class="el" href="group__cpl__mask.html#ga2abd710ec2b8c2e9b2de9336ea6d441f">cpl_mask_move()</a>, and <a class="el" href="group__cpl__mask.html#ga2a4b0a1ac819f9904541feb96bc7c82d">cpl_mask_turn()</a>.</p>
</div>
</div>
<a class="anchor" id="gacc6e71e1be5d91e3675d47ec848138c5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_erosion </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>ker</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute a morphological erosion. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask to filter </td></tr>
<tr><td class="paramname">ker</td><td>binary kernel (0 for 0, any other value is considered as 1) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000017">Deprecated:</a></b></dt><dd>Replace this call with <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> using CPL_FILTER_EROSION and CPL_BORDER_ZERO.</dd></dl>
<p>References <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2acae7599ac2a7a21ebbcf186b59089f38bc">CPL_BORDER_ZERO</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372a1bb66829791d72fde00b833602c623d0">CPL_FILTER_EROSION</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate()</a>, and <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>.</p>
</div>
</div>
<a class="anchor" id="ga8fd7d6feabd3a80f239650fa4eb6db4f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_extract </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>llx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>lly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>urx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ury</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Extract a mask from an other one. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask </td></tr>
<tr><td class="paramname">llx</td><td>Lower left x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">lly</td><td>Lower left y position (FITS convention, 1 for lowest) </td></tr>
<tr><td class="paramname">urx</td><td>Upper right x position (FITS convention) </td></tr>
<tr><td class="paramname">ury</td><td>Upper right y position (FITS convention) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated mask or NULL on error.</dd></dl>
<p>The returned mask must be deallocated using <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a>.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_ILLEGAL_INPUT if the zone falls outside the mask</li>
<li>CPL_ERROR_NULL_INPUT if the input mask is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc()</a>, and <a class="el" href="group__cpl__mask.html#ga7f9767654033c50dd87d31cbde060593">cpl_mask_wrap()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__fit.html#gac3d906c5ea114812ee3ca7f8e9fa49b7">cpl_fit_imagelist_polynomial_window()</a>, and <a class="el" href="group__cpl__image.html#ga2f0f5804717110451f74d3b9e1bdf8c7">cpl_image_extract()</a>.</p>
</div>
</div>
<a class="anchor" id="gac7eff859335d64ef228ff51d9fcde05d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_extract_subsample </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>xstep</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ystep</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Subsample a mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask </td></tr>
<tr><td class="paramname">xstep</td><td>Take every xstep pixel in x </td></tr>
<tr><td class="paramname">ystep</td><td>Take every ystep pixel in y </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the newly allocated mask or NULL on error case </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga5e8ab59e3dabbcddf5da4e9c8aad659f" title="Sub-sample an image. ">cpl_image_extract_subsample()</a></dd></dl>
<p>The returned mask must be deallocated using <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a>.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if in is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if xstep and ystep are not greater than zero </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>, and <a class="el" href="group__cpl__mask.html#gab67918578893ea4a0e005cb4397f8754">cpl_mask_new()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#ga5e8ab59e3dabbcddf5da4e9c8aad659f">cpl_image_extract_subsample()</a>.</p>
</div>
</div>
<a class="anchor" id="ga093beb6bd195ec15a931034b3d28a8eb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_filter </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>other</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>kernel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__filter.html#ga4469cc9402438f791bbcccae762e0b2f">cpl_filter_mode</a> </td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__filter.html#ga9d26d8ff5e92c0df5fae1289fae9ecbc">cpl_border_mode</a> </td>
<td class="paramname"><em>border</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Filter a mask using a binary kernel. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Pre-allocated mask to hold the filtered result </td></tr>
<tr><td class="paramname">other</td><td>Mask to filter </td></tr>
<tr><td class="paramname">kernel</td><td>Elements to use, if set to CPL_BINARY_1 </td></tr>
<tr><td class="paramname">filter</td><td>CPL_FILTER_EROSION, CPL_FILTER_DILATION, CPL_FILTER_OPENING, CPL_FILTER_CLOSING </td></tr>
<tr><td class="paramname">border</td><td>CPL_BORDER_NOP, CPL_BORDER_ZERO or CPL_BORDER_COPY </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE or the relevant CPL error code</dd></dl>
<p>The two masks must have equal dimensions.</p>
<p>The kernel must have an odd number of rows and an odd number of columns.</p>
<p>At least one kernel element must be set to CPL_BINARY_1.</p>
<p>For erosion and dilation: In-place filtering is not supported, but the input buffer may overlap all but the 1+h first rows of the output buffer, where 1+2*h is the number of rows in the kernel.</p>
<p>For opening and closing: Opening is implemented as an erosion followed by a dilation, and closing is implemented as a dilation followed by an erosion. As such a temporary, internal buffer the size of self is allocated and used. Consequently, in-place opening and closing is supported with no additional overhead, it is achieved by passing the same mask as both self and other.</p>
<p>Duality and idempotency: Erosion and Dilation have the duality relations: not(dil(A,B)) = er(not(A), B) and not(er(A,B)) = dil(not(A), B).</p>
<p>Opening and closing have similar duality relations: not(open(A,B)) = close(not(A), B) and not(close(A,B)) = open(not(A), B).</p>
<p>Opening and closing are both idempotent, i.e. open(A,B) = open(open(A,B),B) and close(A,B) = close(close(A,B),B).</p>
<p>The above duality and idempotency relations do <em>not</em> hold on the mask border (with the currently supported border modes).</p>
<p>Unnecessary large kernels: Adding an empty border to a given kernel should not change the outcome of the filtering. However doing so widens the border of the mask to be filtered and therefore has an effect on the filtering of the mask border. Since an unnecessary large kernel is also more costly to apply, such kernels should be avoided.</p>
<dl class="section user"><dt>A 1 x 3 erosion filtering example (error checking omitted for brevity)</dt><dd><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> cpl_mask * kernel = cpl_mask_new(1, 3); </div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> cpl_mask_not(kernel);</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> cpl_mask_filter(filtered, raw, kernel, CPL_FILTER_EROSION,</div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>  CPL_BORDER_NOP);</div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> cpl_mask_delete(kernel);</div>
</div><!-- fragment --></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL.</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the kernel has a side of even length.</li>
<li>CPL_ERROR_DATA_NOT_FOUND If the kernel is empty.</li>
<li>CPL_ERROR_ACCESS_OUT_OF_RANGE If the kernel has a side longer than the input mask.</li>
<li>CPL_ERROR_INCOMPATIBLE_INPUT If the input and output masks have incompatible sizes.</li>
<li>CPL_ERROR_UNSUPPORTED_MODE If the output pixel buffer overlaps the input one (or the kernel), or the border/filter mode is unsupported. </li>
</ul>
<p>References <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2aca7def968b1c3265f8ba7336a82ea4dafb">CPL_BORDER_COPY</a>, <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2aca3cf424290882dea1f05a8b1ff165fcdd">CPL_BORDER_CROP</a>, <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2acad654c63bc64849819525f442991d3068">CPL_BORDER_NOP</a>, <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2acae7599ac2a7a21ebbcf186b59089f38bc">CPL_BORDER_ZERO</a>, <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0d916ea6a7e198a74863ecd9ea03d733">CPL_ERROR_ACCESS_OUT_OF_RANGE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a5b82c7780a2a8a79dfafcac70717b830">CPL_ERROR_DATA_NOT_FOUND</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a74ef8e37f3412e85cfc22840d13bdd0c">CPL_ERROR_UNSUPPORTED_MODE</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372a6b163d35efe2489a022eef54789cdce9">CPL_FILTER_CLOSING</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372ab798984e3cc1e7677fd09fa1db11fcdd">CPL_FILTER_DILATION</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372a1bb66829791d72fde00b833602c623d0">CPL_FILTER_EROSION</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372a3ae095eb114698e8dfff1f78dbef3112">CPL_FILTER_OPENING</a>, <a class="el" href="group__cpl__mask.html#ga53baa443039ca40d078fae26ca9e2fac">cpl_mask_copy()</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>, <a class="el" href="group__cpl__mask.html#gaefb412dd754146bc78faf7356209a0e6">cpl_mask_get_size_x()</a>, <a class="el" href="group__cpl__mask.html#ga2c515a5ba20381c54c0496c1b9769495">cpl_mask_get_size_y()</a>, <a class="el" href="group__cpl__mask.html#ga0009ad4c6aed58343b09e47ef38ef9e4">cpl_mask_is_empty()</a>, and <a class="el" href="group__cpl__mask.html#gab67918578893ea4a0e005cb4397f8754">cpl_mask_new()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__apertures.html#ga35155a7e7eac69da19b08aa1cb112168">cpl_apertures_extract_sigma()</a>, <a class="el" href="group__cpl__mask.html#ga642b27231cdcec2fff9379868419ffb8">cpl_mask_closing()</a>, <a class="el" href="group__cpl__mask.html#ga0cfe07358900f79c4c58f4e682d1e450">cpl_mask_dilation()</a>, <a class="el" href="group__cpl__mask.html#gacc6e71e1be5d91e3675d47ec848138c5">cpl_mask_erosion()</a>, and <a class="el" href="group__cpl__mask.html#ga0b486fea034d89b0500661833f710942">cpl_mask_opening()</a>.</p>
</div>
</div>
<a class="anchor" id="gac5c6b63e393cf52d09101c6b731d0916"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_flip </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>angle</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Flip a mask on a given mirror line. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>mask to flip </td></tr>
<tr><td class="paramname">angle</td><td>mirror line in polar coord. is theta = (PI/4) * angle </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> or CPL_ERROR_NONE</dd></dl>
<p>angle can take one of the following values:</p><ul>
<li>0 (theta=0) to flip the image around the horizontal</li>
<li>1 (theta=pi/4) to flip the image around y=x</li>
<li>2 (theta=pi/2) to flip the image around the vertical</li>
<li>3 (theta=3pi/4) to flip the image around y=-x</li>
</ul>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if in is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if angle is not as specified </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate()</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, and <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gad56b75f0a57369da35456feb764f567b">cpl_image_flip()</a>.</p>
</div>
</div>
<a class="anchor" id="gabc90bc577ad09eb79cbd702cbd69dec2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_binary cpl_mask_get </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>xpos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ypos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the value of a mask at a given position. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The input mask </td></tr>
<tr><td class="paramname">xpos</td><td>Pixel x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">ypos</td><td>Pixel y position (FITS convention, 1 for lowest) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mask value or undefined if an error code is set</dd></dl>
<p>The mask value can be either CPL_BINARY_0 or CPL_BINARY_1</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if xpos or ypos is out of bounds </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#ga4f350c4251a89dc2c6792faa1028cab8">cpl_image_dump_window()</a>, and <a class="el" href="group__cpl__image.html#gaa426e0c52b2188ceac9632b7c15e2aeb">cpl_image_is_rejected()</a>.</p>
</div>
</div>
<a class="anchor" id="ga462a148e501731a123e573e6f818f8c2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_binary* cpl_mask_get_data </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a pointer to the data part of the mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>the input mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the data or NULL on error</dd></dl>
<p>The returned pointer refers to already allocated data.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gad10b1cfd108bca93f71cf0bdf74366d9">cpl_image_accept()</a>, <a class="el" href="group__cpl__image.html#gaf84f969c52240629187d1a5e65411435">cpl_image_divide()</a>, <a class="el" href="group__cpl__image.html#gafad621e6d1960251ec23984039e838c6">cpl_image_divide_create()</a>, <a class="el" href="group__cpl__image.html#gabdd5469f56fb6e7fa791b23fe459a75c">cpl_image_fill_rejected()</a>, <a class="el" href="group__cpl__image.html#gacabd23385727059b61a8f20181485b05">cpl_image_filter()</a>, <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, <a class="el" href="group__cpl__image.html#ga787eff33b78af1e8d6d79189cdcf418b">cpl_image_or_mask()</a>, <a class="el" href="group__cpl__image.html#ga6c69e93b4bdfa9d09730d3707a4786b9">cpl_image_or_mask_unary()</a>, <a class="el" href="group__cpl__image.html#ga509a88acd4a109ff88d699df01b64baa">cpl_image_rebin()</a>, <a class="el" href="group__cpl__image.html#gafaa53eac47a33da029e30b9b44bf91be">cpl_image_reject()</a>, <a class="el" href="group__cpl__image.html#ga2596acf228f922542f4a1ff4f17d7e71">cpl_image_reject_from_mask()</a>, <a class="el" href="group__cpl__image.html#ga53d75eb2e23114e4870c4d523081bfda">cpl_image_warp()</a>, <a class="el" href="group__cpl__image.html#ga34b80ed421f88c5bdad3f0127d251975">cpl_image_warp_polynomial()</a>, <a class="el" href="group__cpl__imagelist.html#gaebff09158515dcd0e9e95a32f3678631">cpl_imagelist_swap_axis_create()</a>, <a class="el" href="group__cpl__mask.html#ga53baa443039ca40d078fae26ca9e2fac">cpl_mask_copy()</a>, <a class="el" href="group__cpl__mask.html#gac7eff859335d64ef228ff51d9fcde05d">cpl_mask_extract_subsample()</a>, <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>, <a class="el" href="group__cpl__mask.html#gac5c6b63e393cf52d09101c6b731d0916">cpl_mask_flip()</a>, <a class="el" href="group__cpl__mask.html#ga2abd710ec2b8c2e9b2de9336ea6d441f">cpl_mask_move()</a>, <a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2">cpl_mask_threshold_image()</a>, and <a class="el" href="group__cpl__mask.html#ga2a4b0a1ac819f9904541feb96bc7c82d">cpl_mask_turn()</a>.</p>
</div>
</div>
<a class="anchor" id="gac9ab11af7ef4ff0b8424141271fd685b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_binary* cpl_mask_get_data_const </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a pointer to the data part of the mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>the input mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the data or NULL on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2" title="Get a pointer to the data part of the mask. ">cpl_mask_get_data</a> </dd></dl>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__detector.html#ga83fd1a1d48eeeb444d6a1a84c6d5e2de">cpl_detector_interpolate_rejected()</a>, <a class="el" href="group__cpl__image.html#gacabd23385727059b61a8f20181485b05">cpl_image_filter()</a>, <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, <a class="el" href="group__cpl__image.html#ga7b4a871df75c1e8198ebe9359efd181b">cpl_image_get_interpolated()</a>, <a class="el" href="group__cpl__image.html#gad38071b4db44e17818a0bade99a123c0">cpl_image_labelise_mask_create()</a>, <a class="el" href="group__cpl__image.html#ga258483437ae0eb156025b379ef8fe810">cpl_image_new_from_mask()</a>, <a class="el" href="group__cpl__image.html#ga787eff33b78af1e8d6d79189cdcf418b">cpl_image_or_mask()</a>, <a class="el" href="group__cpl__image.html#ga6c69e93b4bdfa9d09730d3707a4786b9">cpl_image_or_mask_unary()</a>, <a class="el" href="group__cpl__image.html#ga509a88acd4a109ff88d699df01b64baa">cpl_image_rebin()</a>, <a class="el" href="group__cpl__image.html#ga2596acf228f922542f4a1ff4f17d7e71">cpl_image_reject_from_mask()</a>, <a class="el" href="group__cpl__mask.html#ga53baa443039ca40d078fae26ca9e2fac">cpl_mask_copy()</a>, <a class="el" href="group__cpl__mask.html#gac7eff859335d64ef228ff51d9fcde05d">cpl_mask_extract_subsample()</a>, <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>, <a class="el" href="group__cpl__mask.html#gac5c6b63e393cf52d09101c6b731d0916">cpl_mask_flip()</a>, <a class="el" href="group__cpl__mask.html#ga2abd710ec2b8c2e9b2de9336ea6d441f">cpl_mask_move()</a>, <a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2">cpl_mask_threshold_image()</a>, <a class="el" href="group__cpl__mask.html#ga2a4b0a1ac819f9904541feb96bc7c82d">cpl_mask_turn()</a>, and <a class="el" href="group__cpl__plot.html#ga3b6721af46c6dddca011362c7f2b4b12">cpl_plot_mask()</a>.</p>
</div>
</div>
<a class="anchor" id="gaefb412dd754146bc78faf7356209a0e6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> cpl_mask_get_size_x </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the x size of the mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>the input mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mask x size, or -1 on NULL input</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, <a class="el" href="group__cpl__image.html#ga19d4e60abbeaf99717d3985c76aaadbd">cpl_image_filter_stdev()</a>, <a class="el" href="group__cpl__image.html#gad38071b4db44e17818a0bade99a123c0">cpl_image_labelise_mask_create()</a>, <a class="el" href="group__cpl__image.html#ga258483437ae0eb156025b379ef8fe810">cpl_image_new_from_mask()</a>, <a class="el" href="group__cpl__image.html#ga2596acf228f922542f4a1ff4f17d7e71">cpl_image_reject_from_mask()</a>, <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>, <a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2">cpl_mask_threshold_image()</a>, and <a class="el" href="group__cpl__plot.html#ga3b6721af46c6dddca011362c7f2b4b12">cpl_plot_mask()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2c515a5ba20381c54c0496c1b9769495"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> cpl_mask_get_size_y </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the y size of the mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>the input mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mask y size, or -1 on NULL input</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, <a class="el" href="group__cpl__image.html#ga19d4e60abbeaf99717d3985c76aaadbd">cpl_image_filter_stdev()</a>, <a class="el" href="group__cpl__image.html#gad38071b4db44e17818a0bade99a123c0">cpl_image_labelise_mask_create()</a>, <a class="el" href="group__cpl__image.html#ga258483437ae0eb156025b379ef8fe810">cpl_image_new_from_mask()</a>, <a class="el" href="group__cpl__image.html#ga2596acf228f922542f4a1ff4f17d7e71">cpl_image_reject_from_mask()</a>, <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>, <a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2">cpl_mask_threshold_image()</a>, and <a class="el" href="group__cpl__plot.html#ga3b6721af46c6dddca011362c7f2b4b12">cpl_plot_mask()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0009ad4c6aed58343b09e47ef38ef9e4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_boolean cpl_mask_is_empty </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return CPL_TRUE iff a mask has no elements set (to CPL_BINARY_1) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The mask to search </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_TRUE iff the mask has no elements set (to CPL_BINARY_1) </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga444cf7285691d170647742a20560e93e" title="Return CPL_TRUE iff a mask has no elements set in the window. ">cpl_mask_is_empty_window()</a></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__apertures.html#ga23b66826669fa90caafd5ad3060a116d">cpl_apertures_new_from_image()</a>, <a class="el" href="group__cpl__geom__img.html#ga8df5c11aeb84394817af6a0680c2859c">cpl_geom_img_offset_saa()</a>, <a class="el" href="group__cpl__image.html#ga4f350c4251a89dc2c6792faa1028cab8">cpl_image_dump_window()</a>, <a class="el" href="group__cpl__image.html#gabdd5469f56fb6e7fa791b23fe459a75c">cpl_image_fill_rejected()</a>, <a class="el" href="group__cpl__image.html#gacabd23385727059b61a8f20181485b05">cpl_image_filter()</a>, <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, and <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>.</p>
</div>
</div>
<a class="anchor" id="ga444cf7285691d170647742a20560e93e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_boolean cpl_mask_is_empty_window </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>llx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>lly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>urx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ury</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return CPL_TRUE iff a mask has no elements set in the window. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The mask to search </td></tr>
<tr><td class="paramname">llx</td><td>Lower left x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">lly</td><td>Lower left y position (FITS convention, 1 for lowest) </td></tr>
<tr><td class="paramname">urx</td><td>Upper right x position (FITS convention) </td></tr>
<tr><td class="paramname">ury</td><td>Upper right y position (FITS convention) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_TRUE iff the mask has no elements set (to CPL_BINARY_1)</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the window coordinates are not valid </li>
</ul>
</div>
</div>
<a class="anchor" id="gaa4e10ebd475259a69598a2bbdb280c01"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_load </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>pnum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>xtnum</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load a mask from a FITS file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>Name of the file to load from. </td></tr>
<tr><td class="paramname">pnum</td><td>Plane number in the Data Unit (0 for first) </td></tr>
<tr><td class="paramname">xtnum</td><td>Extension number in the file (0 for primary HDU) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated mask or NULL on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga4a1d222d9e71fbccc9596b0d10eaf9f7" title="Load an image from a FITS file. ">cpl_image_load()</a></dd></dl>
<p>This function loads a mask from a FITS file (NAXIS=2 or 3). Each non-zero pixel is set to CPL_BINARY_1.</p>
<p>The returned mask has to be deallocated with <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a>.</p>
<p>'xtnum' specifies from which extension the mask should be loaded. This could be 0 for the main data section (files without extension), or any number between 1 and N, where N is the number of extensions present in the file.</p>
<p>The requested plane number runs from 0 to nplanes-1, where nplanes is the number of planes present in the requested data section.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_FILE_IO if the file cannot be opened or does not exist</li>
<li>CPL_ERROR_BAD_FILE_FORMAT if the data cannot be loaded from the file</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the passed extension number is negative</li>
<li>CPL_ERROR_DATA_NOT_FOUND if the specified extension has no mask data </li>
</ul>
</div>
</div>
<a class="anchor" id="ga3df2641567591e06e3f3d1e9f7b4d848"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_load_window </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>pnum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>xtnum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>llx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>lly</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>urx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ury</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load a mask from a FITS file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>Name of the file to load from. </td></tr>
<tr><td class="paramname">pnum</td><td>Plane number in the Data Unit (0 for first) </td></tr>
<tr><td class="paramname">xtnum</td><td>Extension number in the file. </td></tr>
<tr><td class="paramname">llx</td><td>Lower left x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">lly</td><td>Lower left y position (FITS convention, 1 for lowest) </td></tr>
<tr><td class="paramname">urx</td><td>Upper right x position (FITS convention) </td></tr>
<tr><td class="paramname">ury</td><td>Upper right y position (FITS convention) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated mask or NULL on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#gaa4e10ebd475259a69598a2bbdb280c01" title="Load a mask from a FITS file. ">cpl_mask_load()</a></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_FILE_IO if the file does not exist</li>
<li>CPL_ERROR_BAD_FILE_FORMAT if the data cannot be loaded from the file</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the passed position is invalid </li>
</ul>
</div>
</div>
<a class="anchor" id="ga2abd710ec2b8c2e9b2de9336ea6d441f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_move </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>nb_cut</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> * </td>
<td class="paramname"><em>new_pos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reorganize the pixels in a mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>mask to collapse </td></tr>
<tr><td class="paramname">nb_cut</td><td>the number of cut in x and y </td></tr>
<tr><td class="paramname">new_pos</td><td>array with the nb_cut^2 new positions </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> or CPL_ERROR_NONE </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#gaf2e8ea696ca2967a4b57d0e7940286a2" title="Reorganize the pixels in an image. ">cpl_image_move()</a></dd></dl>
<p>nb_cut must be positive and divide the size of the input mask in x and y.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if in or new_pos is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if nb_cut is not as requested. </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate()</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, and <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gaf2e8ea696ca2967a4b57d0e7940286a2">cpl_image_move()</a>.</p>
</div>
</div>
<a class="anchor" id="gab67918578893ea4a0e005cb4397f8754"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_new </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>nx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ny</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new cpl_mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">nx</td><td>The number of elements in the X-direction </td></tr>
<tr><td class="paramname">ny</td><td>The number of elements in the Y-direction </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated cpl_mask or NULL on error </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned object must be deallocated using <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a>.</dd></dl>
<p>The created cpl_mask elements are all set to CPL_BINARY_0.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_ILLEGAL_INPUT if nx or ny is negative </li>
</ul>
<p>References <a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b">cpl_calloc()</a>, <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, and <a class="el" href="group__cpl__mask.html#ga7f9767654033c50dd87d31cbde060593">cpl_mask_wrap()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__apertures.html#ga35155a7e7eac69da19b08aa1cb112168">cpl_apertures_extract_sigma()</a>, <a class="el" href="group__cpl__geom__img.html#ga135df3510913add18d5550a8aa356923">cpl_geom_img_offset_fine()</a>, <a class="el" href="group__cpl__image.html#ga13a42c86638d087b5a097c87e36ea7bc">cpl_image_copy()</a>, <a class="el" href="group__cpl__image.html#gaf84f969c52240629187d1a5e65411435">cpl_image_divide()</a>, <a class="el" href="group__cpl__image.html#gafad621e6d1960251ec23984039e838c6">cpl_image_divide_create()</a>, <a class="el" href="group__cpl__image.html#gae9bede9669991943541a96e6921b4637">cpl_image_get_bpm()</a>, <a class="el" href="group__cpl__image.html#ga509a88acd4a109ff88d699df01b64baa">cpl_image_rebin()</a>, <a class="el" href="group__cpl__image.html#gafaa53eac47a33da029e30b9b44bf91be">cpl_image_reject()</a>, <a class="el" href="group__cpl__image.html#gaec847d228bb8d3f8c74831e33d93b758">cpl_image_shift()</a>, <a class="el" href="group__cpl__image.html#ga53d75eb2e23114e4870c4d523081bfda">cpl_image_warp()</a>, <a class="el" href="group__cpl__image.html#ga34b80ed421f88c5bdad3f0127d251975">cpl_image_warp_polynomial()</a>, <a class="el" href="group__cpl__imagelist.html#gaebff09158515dcd0e9e95a32f3678631">cpl_imagelist_swap_axis_create()</a>, <a class="el" href="group__cpl__mask.html#gac7eff859335d64ef228ff51d9fcde05d">cpl_mask_extract_subsample()</a>, <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>, <a class="el" href="group__cpl__mask.html#gae96b3b0d506ef4f97f0ce2d8d0d70d22">cpl_mask_threshold_image_create()</a>, and <a class="el" href="group__cpl__vector.html#gae804fc37f617a11d5c5e73f901c55f36">cpl_vector_filter_median_create()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa30bea67c21cd608beb6add0a45a3f2f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_not </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs a logical NOT on a mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>mask to be modified </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success, otherwise the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga22eb04de3cd84dade9190302c705e9a5" title="The bit-wise complement (not) of an image with integer pixels. ">cpl_image_not()</a></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__apertures.html#ga35155a7e7eac69da19b08aa1cb112168">cpl_apertures_extract_sigma()</a>, <a class="el" href="group__cpl__geom__img.html#ga135df3510913add18d5550a8aa356923">cpl_geom_img_offset_fine()</a>, <a class="el" href="group__cpl__geom__img.html#ga8df5c11aeb84394817af6a0680c2859c">cpl_geom_img_offset_saa()</a>, and <a class="el" href="group__cpl__vector.html#gae804fc37f617a11d5c5e73f901c55f36">cpl_vector_filter_median_create()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0b486fea034d89b0500661833f710942"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_opening </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>ker</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute a morphological opening. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>input mask to filter </td></tr>
<tr><td class="paramname">ker</td><td>binary kernel (0 for 0, any other value is considered as 1) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000015">Deprecated:</a></b></dt><dd>Replace this call with <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb" title="Filter a mask using a binary kernel. ">cpl_mask_filter()</a> using CPL_FILTER_OPENING and CPL_BORDER_ZERO.</dd></dl>
<p>References <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2acae7599ac2a7a21ebbcf186b59089f38bc">CPL_BORDER_ZERO</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372a3ae095eb114698e8dfff1f78dbef3112">CPL_FILTER_OPENING</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, and <a class="el" href="group__cpl__mask.html#ga093beb6bd195ec15a931034b3d28a8eb">cpl_mask_filter()</a>.</p>
</div>
</div>
<a class="anchor" id="gaf12dc55fffbbd55e9525bc69f39339a4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_or </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs a logical OR of one mask onto another. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in1</td><td>first mask, to be modified </td></tr>
<tr><td class="paramname">in2</td><td>second mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success, otherwise the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#gab458b92eba7eea710c82fab760ac92b2" title="The bit-wise or of two images with integer pixels. ">cpl_image_or()</a></dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the two masks have different sizes </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__fit.html#gac3d906c5ea114812ee3ca7f8e9fa49b7">cpl_fit_imagelist_polynomial_window()</a>, <a class="el" href="group__cpl__image.html#gaa171e04962288d941cd599cca86e4311">cpl_image_average_create()</a>, <a class="el" href="group__cpl__image.html#gaf84f969c52240629187d1a5e65411435">cpl_image_divide()</a>, <a class="el" href="group__cpl__image.html#gafad621e6d1960251ec23984039e838c6">cpl_image_divide_create()</a>, and <a class="el" href="group__cpl__image.html#ga787eff33b78af1e8d6d79189cdcf418b">cpl_image_or_mask()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa1404cab121f52a6eae13697c0ca5d0e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_save </td>
<td>(</td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> * </td>
<td class="paramname"><em>pl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>mode</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Save a mask to a FITS file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>mask to write to disk </td></tr>
<tr><td class="paramname">filename</td><td>Name of the file to write </td></tr>
<tr><td class="paramname">pl</td><td>Property list for the output header or NULL </td></tr>
<tr><td class="paramname">mode</td><td>The desired output options </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE or the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__propertylist.html#gacd7a0cbf0a42ae4fef7dcd34a897b773" title="Save a property list to a FITS file. ">cpl_propertylist_save()</a></dd></dl>
<p>This function saves a mask to a FITS file. If a property list is provided, it is written to the header where the mask is written.</p>
<p>The type used in the file is CPL_TYPE_UCHAR (8 bit unsigned).</p>
<p>Supported output modes are CPL_IO_CREATE (create a new file) and CPL_IO_EXTEND (append a new extension to an existing file)</p>
<p>The output mode CPL_IO_EXTEND can be combined (via bit-wise or) with an option for tile-compression. This compression is lossless. The options are: CPL_IO_COMPRESS_GZIP, CPL_IO_COMPRESS_RICE, CPL_IO_COMPRESS_HCOMPRESS, CPL_IO_COMPRESS_PLIO.</p>
<p>Note that in append mode the file must be writable (and do not take for granted that a file is writable just because it was created by the same application, as this depends from the system <em>umask</em>).</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the mode is not supported</li>
<li>CPL_ERROR_FILE_NOT_CREATED if the output file cannot be created</li>
<li>CPL_ERROR_FILE_IO if the data cannot be written to the file </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900aa54303ad2fb0efc3f8c57c788b342c81">CPL_ERROR_FILE_IO</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77a89b4dadbe93bb6d1130f3b27f252cab3">CPL_IO_COMPRESS_GZIP</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77a1dd694cb9b28ad9e7b342f800d52567c">CPL_IO_COMPRESS_HCOMPRESS</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77acce0d369fdfd60f8cc3a1b6e0c71b022">CPL_IO_COMPRESS_PLIO</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77ab33f273c1cee726f42cbc8c0a7618886">CPL_IO_COMPRESS_RICE</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77aed05bd031c90261ee45232f7119407d2">CPL_IO_CREATE</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77a3e972c1ee30d34d16a0ca1e3f1dee560">CPL_IO_EXTEND</a>, <a class="el" href="group__cpl__io.html#ggaeaee6d6dbefbfc273111e19988b50d77aa65ef2290fab873ed5f64da56b9aaecc">CPL_IO_MAX</a>, and <a class="el" href="group__cpl__memory.html#ga3182acba4528fb26736337aadfb839de">cpl_sprintf()</a>.</p>
</div>
</div>
<a class="anchor" id="ga849bad9dc8eb9dbd9a463d7a24f8de61"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_set </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>xpos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ypos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_binary </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a value in a mask at a given position. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>the input mask </td></tr>
<tr><td class="paramname">xpos</td><td>Pixel x position (FITS convention, 1 for leftmost) </td></tr>
<tr><td class="paramname">ypos</td><td>Pixel y position (FITS convention, 1 for lowest) </td></tr>
<tr><td class="paramname">value</td><td>the value to set in the mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> or CPL_ERROR_NONE</dd></dl>
<p>The value can be either CPL_BINARY_0 or CPL_BINARY_1</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if xpos or ypos is out of bounds or if value is different from CPL_BINARY_0 and CPL_BINARY_1 </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="gab90af7f91b5537fa94a77472869c9588"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_shift </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>dx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>dy</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shift a mask. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Mask to shift in place </td></tr>
<tr><td class="paramname">dx</td><td>Shift in X </td></tr>
<tr><td class="paramname">dy</td><td>Shift in Y </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> or CPL_ERROR_NONE </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga0693c816bb297e093454d3031dcdbc1f" title="Rotate an image by a multiple of 90 degrees clockwise. ">cpl_image_turn()</a></dd></dl>
<p>The 'empty zone' in the shifted mask is set to CPL_BINARY_1. The shift values have to be valid: -nx < dx < nx and -ny < dy < ny</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if in is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the offsets are too big </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gaec847d228bb8d3f8c74831e33d93b758">cpl_image_shift()</a>.</p>
</div>
</div>
<a class="anchor" id="ga876fa3873a09a7ed4a473432b399c9a2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_threshold_image </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_image * </td>
<td class="paramname"><em>image</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lo_cut</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>hi_cut</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_binary </td>
<td class="paramname"><em>inval</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Select parts of an image with provided thresholds. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Mask to flag according to threshold </td></tr>
<tr><td class="paramname">image</td><td>Image to threshold. </td></tr>
<tr><td class="paramname">lo_cut</td><td>Lower bound for threshold. </td></tr>
<tr><td class="paramname">hi_cut</td><td>Higher bound for threshold. </td></tr>
<tr><td class="paramname">inval</td><td>This value (CPL_BINARY_1 or CPL_BINARY_0) is assigned where the pixel value is not marked as rejected and is strictly inside the provided interval. The other positions are assigned the other value. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE or the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on error</dd></dl>
<p>The input image type can be CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT or CPL_TYPE_INT. If lo_cut is greater than or equal to hi_cut, then the mask is filled with outval.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_UNSUPPORTED_MODE if the pixel type is unsupported</li>
<li>CPL_ERROR_INCOMPATIBLE_INPUT if the mask and image have different sizes</li>
<li>CPL_ERROR_ILLEGAL_INPUT if inval is not one of CPL_BINARY_1 or CPL_BINARY_0 </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a74ef8e37f3412e85cfc22840d13bdd0c">CPL_ERROR_UNSUPPORTED_MODE</a>, <a class="el" href="group__cpl__image.html#gaa199c6fc00ac1d83ed37fb9717e2c4bd">cpl_image_get_bpm_const()</a>, <a class="el" href="group__cpl__image.html#ga670404d662c8420249028acc8025121b">cpl_image_get_data_const()</a>, <a class="el" href="group__cpl__image.html#gab5a6bc059aa1d38c37ab5852b5170e45">cpl_image_get_size_x()</a>, <a class="el" href="group__cpl__image.html#gaf3495f9be1d6892cfed9c5232ccee350">cpl_image_get_size_y()</a>, <a class="el" href="group__cpl__image.html#ga17f97e60794f88e7f06b85cccbecc132">cpl_image_get_type()</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>, <a class="el" href="group__cpl__mask.html#gaefb412dd754146bc78faf7356209a0e6">cpl_mask_get_size_x()</a>, <a class="el" href="group__cpl__mask.html#ga2c515a5ba20381c54c0496c1b9769495">cpl_mask_get_size_y()</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086a4923f03f3a673edd344b0d81835ca69e">CPL_TYPE_DOUBLE</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086aa44c37e26b9040a96e3a49b405946942">CPL_TYPE_FLOAT</a>, and <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086ae333db5ccea0813ccd892525b4ba1345">CPL_TYPE_INT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__mask.html#gae96b3b0d506ef4f97f0ce2d8d0d70d22">cpl_mask_threshold_image_create()</a>.</p>
</div>
</div>
<a class="anchor" id="gae96b3b0d506ef4f97f0ce2d8d0d70d22"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_threshold_image_create </td>
<td>(</td>
<td class="paramtype">const cpl_image * </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lo_cut</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>hi_cut</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Select parts of an image with provided thresholds. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>Image to threshold. </td></tr>
<tr><td class="paramname">lo_cut</td><td>Lower bound for threshold. </td></tr>
<tr><td class="paramname">hi_cut</td><td>Higher bound for threshold. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated mask or NULL on error </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned mask must be deallocated with <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224" title="Delete a cpl_mask. ">cpl_mask_delete()</a> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2" title="Select parts of an image with provided thresholds. ">cpl_mask_threshold_image()</a> </dd></dl>
<p>References <a class="el" href="group__cpl__image.html#gab5a6bc059aa1d38c37ab5852b5170e45">cpl_image_get_size_x()</a>, <a class="el" href="group__cpl__image.html#gaf3495f9be1d6892cfed9c5232ccee350">cpl_image_get_size_y()</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#gab67918578893ea4a0e005cb4397f8754">cpl_mask_new()</a>, and <a class="el" href="group__cpl__mask.html#ga876fa3873a09a7ed4a473432b399c9a2">cpl_mask_threshold_image()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__apertures.html#ga35155a7e7eac69da19b08aa1cb112168">cpl_apertures_extract_sigma()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2a4b0a1ac819f9904541feb96bc7c82d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_turn </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>rot</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rotate a mask by a multiple of 90 degrees clockwise. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Mask to rotate in place </td></tr>
<tr><td class="paramname">rot</td><td>The multiple: -1 is a rotation of 90 deg counterclockwise. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success, otherwise the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga0693c816bb297e093454d3031dcdbc1f" title="Rotate an image by a multiple of 90 degrees clockwise. ">cpl_image_turn()</a></dd></dl>
<p>rot may be any integer value, its modulo 4 determines the rotation:</p><ul>
<li>-3 to turn 270 degrees counterclockwise.</li>
<li>-2 to turn 180 degrees counterclockwise.</li>
<li>-1 to turn 90 degrees counterclockwise.</li>
<li>0 to not turn</li>
<li>+1 to turn 90 degrees clockwise (same as -3)</li>
<li>+2 to turn 180 degrees clockwise (same as -2).</li>
<li>+3 to turn 270 degrees clockwise (same as -1).</li>
</ul>
<p>The definition of the rotation relies on the FITS convention: The lower left corner of the image is at (1,1), x increasing from left to right, y increasing from bottom to top.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if self is NULL </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate()</a>, <a class="el" href="group__cpl__mask.html#ga462a148e501731a123e573e6f818f8c2">cpl_mask_get_data()</a>, and <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#ga0693c816bb297e093454d3031dcdbc1f">cpl_image_turn()</a>.</p>
</div>
</div>
<a class="anchor" id="ga1b3fef7416a8189fb121fdb69a44653b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* cpl_mask_unwrap </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>m</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete a cpl_mask except the data array. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">m</td><td>cpl_mask to delete </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the data array or NULL if the input is NULL. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The data array must be deallocated, otherwise a memory leak occurs. </dd></dl>
<p>References <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>.</p>
</div>
</div>
<a class="anchor" id="ga7f9767654033c50dd87d31cbde060593"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_mask* cpl_mask_wrap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>nx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>ny</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_binary * </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a cpl_mask from existing data. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">nx</td><td>number of element in x direction </td></tr>
<tr><td class="paramname">ny</td><td>number of element in y direction </td></tr>
<tr><td class="paramname">data</td><td>Pointer to array of nx*ny cpl_binary </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated cpl_mask or NULL in case of an error </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned object must be deallocated using <a class="el" href="group__cpl__mask.html#ga1b3fef7416a8189fb121fdb69a44653b" title="Delete a cpl_mask except the data array. ">cpl_mask_unwrap()</a>.</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if nx or ny is negative or zero </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, and <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__image.html#gacabd23385727059b61a8f20181485b05">cpl_image_filter()</a>, <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, <a class="el" href="group__cpl__image.html#ga787eff33b78af1e8d6d79189cdcf418b">cpl_image_or_mask()</a>, <a class="el" href="group__cpl__mask.html#gaca65aba3c896a83a68054403544a4959">cpl_mask_collapse_create()</a>, <a class="el" href="group__cpl__mask.html#ga9eb7b94e28606874356b70be4eedb53d">cpl_mask_duplicate()</a>, <a class="el" href="group__cpl__mask.html#ga8fd7d6feabd3a80f239650fa4eb6db4f">cpl_mask_extract()</a>, and <a class="el" href="group__cpl__mask.html#gab67918578893ea4a0e005cb4397f8754">cpl_mask_new()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa8fcc4a4de703661d38198e74002a777"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_mask_xor </td>
<td>(</td>
<td class="paramtype">cpl_mask * </td>
<td class="paramname"><em>in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_mask * </td>
<td class="paramname"><em>in2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs a logical XOR of one mask onto another. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in1</td><td>first mask, to be modified </td></tr>
<tr><td class="paramname">in2</td><td>second mask </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success, otherwise the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__image.html#ga1a0b22a6882d30ffe5de44afe04a016e" title="The bit-wise xor of two images with integer pixels. ">cpl_image_xor()</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Passing the same mask twice will clear it</dd></dl>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the two masks have different sizes </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
|