19SCENARIO(
"Masking wedges in an image",
"[improc::imageMasks::maskWedge]" )
21 GIVEN(
"a single wedge" )
23 WHEN(
"geometric center, 0-90 degrees" )
26 im.resize( 1024, 1024 );
29 double xcen = 0.5 * ( im.rows() - 1 );
30 double ycen = 0.5 * ( im.cols() - 1 );
34 REQUIRE( im.sum() == 512 * 512 );
36 WHEN(
"geometric center, 90-180 degrees" )
39 im.resize( 1024, 1024 );
42 double xcen = 0.5 * ( im.rows() - 1 );
43 double ycen = 0.5 * ( im.cols() - 1 );
47 REQUIRE( im.sum() == 512 * 512 );
49 WHEN(
"geometric center, 180-270 degrees" )
52 im.resize( 1024, 1024 );
55 double xcen = 0.5 * ( im.rows() - 1 );
56 double ycen = 0.5 * ( im.cols() - 1 );
60 REQUIRE( im.sum() == 512 * 512 );
62 WHEN(
"geometric center, 270-360 degrees" )
65 im.resize( 1024, 1024 );
68 double xcen = 0.5 * ( im.rows() - 1 );
69 double ycen = 0.5 * ( im.cols() - 1 );
73 REQUIRE( im.sum() == 512 * 512 );
75 WHEN(
"geometric center, 45-135 degrees" )
78 im.resize( 1024, 1024 );
81 double xcen = 0.5 * ( im.rows() - 1 );
82 double ycen = 0.5 * ( im.cols() - 1 );
86 REQUIRE( im.sum() == 512 * 512 );
88 WHEN(
"geometric center, 135-225 degrees" )
91 im.resize( 1024, 1024 );
94 double xcen = 0.5 * ( im.rows() - 1 );
95 double ycen = 0.5 * ( im.cols() - 1 );
99 REQUIRE( im.sum() == 512 * 512 );
101 WHEN(
"geometric center, 225-315 degrees" )
104 im.resize( 1024, 1024 );
107 double xcen = 0.5 * ( im.rows() - 1 );
108 double ycen = 0.5 * ( im.cols() - 1 );
112 REQUIRE( im.sum() == 512 * 512 );
114 WHEN(
"geometric center, 315-45 degrees" )
117 im.resize( 1024, 1024 );
120 double xcen = 0.5 * ( im.rows() - 1 );
121 double ycen = 0.5 * ( im.cols() - 1 );
125 REQUIRE( im.sum() == 512 * 512 );
127 WHEN(
"geometric center, 3 wedges of 120 degrees" )
130 im60.resize( 1024, 1024 );
133 double xcen = 0.5 * ( im60.rows() - 1 );
134 double ycen = 0.5 * ( im60.cols() - 1 );
139 im180.resize( 1024, 1024 );
142 xcen = 0.5 * ( im180.rows() - 1 );
143 ycen = 0.5 * ( im180.cols() - 1 );
148 im300.resize( 1024, 1024 );
151 xcen = 0.5 * ( im300.rows() - 1 );
152 ycen = 0.5 * ( im300.cols() - 1 );
156 REQUIRE( im60.sum() + im180.sum() + im300.sum() == 1024 * 1024 );