File tree Expand file tree Collapse file tree 4 files changed +39
-5
lines changed Expand file tree Collapse file tree 4 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 1
1
started 7.32 22/1/13
2
2
- added colour temperature to colour and colour to colour temperature
3
3
- removed gtksheet, broken on windows, no future on anywhere
4
+ - added histogram invert
4
5
5
6
started 7.31 3/9/12
6
7
- don't show tooltips for toolkit menu items with submenus (thanks MvGulik)
Original file line number Diff line number Diff line change 4
4
5
5
- os x binary can't save png?
6
6
7
- - test Mono / Monospace thing
7
+ - Matrix / New / Laplacian
8
+
9
+ edit a cell, turns into a plain matrix
10
+
11
+ need to override edit method
8
12
9
13
- didn't we have band_and or equivalent somewhere?
10
14
14
18
15
19
- breadcrumb trail for prog window, so you can get back to where you were?
16
20
17
- - im_invertlut() as a menu item
18
-
19
- handy for inverting the results of cum/norm/etc.
20
-
21
21
- to_image on a hist should tag as image
22
22
23
23
- lambdas don't pattern match?
Original file line number Diff line number Diff line change @@ -135,6 +135,11 @@ Hist_norm_item = class
135
135
action x = map_unary hist_norm x;
136
136
}
137
137
138
+ Hist_inv_item = class
139
+ Menuaction "In_vert" "invert a histogram" {
140
+ action x = map_unary hist_inv x;
141
+ }
142
+
138
143
Hist_match_item = class
139
144
Menuaction "Ma_tch"
140
145
"find LUT which will match first histogram to second" {
Original file line number Diff line number Diff line change @@ -1455,6 +1455,34 @@ hist_norm hist
1455
1455
hist_norm Operator_type.COMPOUND_REWRAP false;
1456
1456
}
1457
1457
1458
+ hist_inv hist
1459
+ = oo_unary_function hist_inv_op hist, is_class hist
1460
+ = inv hist, is_image hist
1461
+ = error (_ "bad arguments to " ++ "hist_inv")
1462
+ {
1463
+ hist_inv_op = Operator "hist_inv"
1464
+ hist_inv Operator_type.COMPOUND_REWRAP false;
1465
+
1466
+ inv im
1467
+ = im_invertlut (to_matrix im''') len
1468
+ {
1469
+ // need a vertical doublemask
1470
+ im'
1471
+ = rot90 im, get_width im > 1 && get_height im == 1
1472
+ = im, get_width im == 1 && get_height im > 1
1473
+ = error (_ "not a hist");
1474
+ len = get_height im';
1475
+
1476
+ // values must be scaled to 0 - 1
1477
+ im'' = im' / (max im');
1478
+
1479
+ // add an index column on the left
1480
+ // again, must be in 0-1
1481
+ y = ((make_xy 1 len)?1) / len;
1482
+ im''' = y ++ im'';
1483
+ }
1484
+ }
1485
+
1458
1486
hist_match in ref
1459
1487
= oo_binary_function hist_match_op in ref, is_class in
1460
1488
= oo_binary'_function hist_match_op in ref, is_class ref
You can’t perform that action at this time.
0 commit comments