-
Notifications
You must be signed in to change notification settings - Fork 9
/
task_parameter.php
1104 lines (877 loc) · 39.7 KB
/
task_parameter.php
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
<?php
// This file is part of the Huygens Remote Manager
// Copyright and license notice: see license.txt
use hrm\DatabaseConnection;
use hrm\Nav;
use hrm\param\DeconvolutionAlgorithm;
use hrm\setting\TaskSetting;
use hrm\Util;
require_once dirname(__FILE__) . '/inc/bootstrap.php';
/* *****************************************************************************
*
* START SESSION, CHECK LOGIN STATE, INITIALIZE WHAT NEEDED
*
**************************************************************************** */
session_start();
if (!isset($_SESSION['user']) || !$_SESSION['user']->isLoggedIn()) {
header("Location: " . "login.php");
exit();
}
if (!isset($_SESSION['task_setting'])) {
$_SESSION['task_setting'] = new TaskSetting();
}
if ($_SESSION['user']->isAdmin()) {
$db = DatabaseConnection::get();
$maxChanCnt = $db->getMaxChanCnt();
$_SESSION['task_setting']->setNumberOfChannels($maxChanCnt);
} else {
$_SESSION['task_setting']->setNumberOfChannels($_SESSION['setting']->numberOfChannels());
}
$message = "";
/* *****************************************************************************
*
* MANAGE THE DECONVOLUTION ALGORITHM
*
**************************************************************************** */
/** @var DeconvolutionAlgorithm $deconAlgorithmParam */
$chanCnt = $_SESSION['task_setting']->numberOfChannels();
$deconAlgorithmParam = $_SESSION['task_setting']->parameter("DeconvolutionAlgorithm");
$deconAlgorithm = $deconAlgorithmParam->value();
for ($i = 0; $i < $chanCnt; $i++) {
$deconAlgorithmKey = "DeconvolutionAlgorithm{$i}";
if (isset($_POST[$deconAlgorithmKey])) {
$deconAlgorithm[$i] = $_POST[$deconAlgorithmKey];
}
}
$deconAlgorithmParam->setValue($deconAlgorithm);
$_SESSION['task_setting']->set($deconAlgorithmParam);
/* *****************************************************************************
*
* PROCESS THE POSTED PARAMETERS
*
**************************************************************************** */
if ($_SESSION['task_setting']->checkPostedTaskParameters($_POST)) {
if ($_SESSION['user']->isAdmin()
|| $_SESSION['task_setting']->isEligibleForCAC()
|| $_SESSION['task_setting']->isEligibleForTStabilization($_SESSION['setting'])) {
header("Location: " . "post_processing.php");
exit();
} else {
header("Location: " . "select_hpc.php");
exit();
}
} else {
$message = $_SESSION['task_setting']->message();
}
/* *****************************************************************************
*
* CREATE THE PAGE
*
**************************************************************************** */
//$noRange = False;
// Javascript includes
$script = array("settings.js", "quickhelp/help.js",
"quickhelp/taskParameterHelp.js");
include("header.inc.php");
?>
<!--
Tooltips
-->
<span class="toolTip" id="ttSpanCancel">
Abort editing and go back to the Restoration parameters
selection page. All changes will be lost!
</span>
<span class="toolTip" id="ttSpanForward">
Continue to next page.
</span>
<span class="toolTip" id="ttEstimateSnr">
Use a sample raw image to find a SNR estimate for each channel.
</span>
<span class="toolTip" id="ttEstimateSnrBeta">
Give the new SNR estimator (beta) a try!
</span>
<span class="toolTip" id="ttEstimateSnrBetaFeedback">
Please help us improve the new SNR estimator by providing your
observations and remarks!
</span>
<div id="nav">
<div id="navleft">
<ul>
<?php
echo(Nav::linkWikiPage('HuygensRemoteManagerHelpRestorationParameters'));
?>
<li> [ <?php echo $_SESSION['task_setting']->name(); ?> ]</li>
</ul>
</div>
<div id="navright">
<ul>
<?php
echo(Nav::textUser($_SESSION['user']->name()));
?>
</ul>
</div>
<div class="clear"></div>
</div>
<div id="content">
<h3>Restoration - Deconvolution</h3>
<form method="post" action="" id="select">
<h4>How should your images be restored?</h4>
<!-- deconvolution algorithm -->
<?php
/***************************************************************************
*
* DeconvolutionAlgorithm
***************************************************************************/
/** @var DeconvolutionAlgorithm $deconAlgorithmParam */
?>
<fieldset class="setting provided"
onmouseover="changeQuickHelp( 'method' );">
<legend>
<a href="javascript:openWindow(
'https://svi.nl/RestorationMethod')">
<img src="images/help.png" alt="?"/></a>
Deconvolution Algorithm
</legend>
<div class="DeconvolutionAlgorithmValues">
<table class="DeconvolutionAlgorithmValues">
<?php
$possibleValues = $deconAlgorithmParam->possibleValues();
/* Make sure CMLE is first in the list. */
for ($i = 0; $i < count($possibleValues); $i++) {
$arrValue = $possibleValues[0];
if (strstr($arrValue, "gmle") || strstr($arrValue, "qmle")) {
array_push($possibleValues, $arrValue);
}
}
/* Loop on rows. */
for ($chan = 0; $chan < $chanCnt; $chan++) {
?>
<tr>
<td>Ch<?php echo $chan; ?>:</td>
<td>
<select
name="DeconvolutionAlgorithm<?php echo $chan; ?>"
title="Deconvolution algorithm for channel <?php echo $chan; ?>"
onchange="updateDeconEntryProperties()">
<?php
/* Loop for select options. */
foreach ($possibleValues as $possibleValue) {
$translatedValue =
$deconAlgorithmParam->translatedValueFor($possibleValue);
if ($possibleValue == $deconAlgorithm[$chan]) {
$selected = " selected=\"selected\"";
} else {
$selected = "";
}
?>
<option
value=<?php echo $possibleValue;
echo $selected; ?>>
<?php echo $translatedValue; ?>
</option>
<?php
} /* End of loop for select options. */
?>
</select>
</td>
</tr>
<?php
} /* End of loop on rows. */
?>
</table> <!-- DeconvolutionAlgorithmValues -->
</div> <!-- DeconvolutionAlgorithmValues -->
</fieldset>
<!-- signal/noise ratio -->
<fieldset class="setting provided"
onmouseover="changeQuickHelp( 'snr' );">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/SignalToNoiseRatio')">
<img src="images/help.png" alt="?"/></a>
Signal/Noise Ratio
</legend>
<div id="snr"
onmouseover="changeQuickHelp( 'snr' );">
<!-- start the SNR table-->
<table><tr>
<?php
/* SIGNAL-TO-NOISE RATIO */
$signalNoiseRatioParam =
$_SESSION['task_setting']->parameter("SignalNoiseRatio");
$signalNoiseRatioValue = $signalNoiseRatioParam->value();
/* Loop over the channels. */
for ($ch = 0; $ch < $chanCnt; $ch++) {
$visibility = " style=\"display: none\"";
if ($deconAlgorithm[$ch] == "cmle") {
$visibility = " style=\"display: block\"";
}
// All SNR divs need to be initialized with the value from the saved parameter.
$value = $signalNoiseRatioValue[$ch];
?>
<!-- A new table cell for the SNR of this channel-->
<td>
<div id="cmle-snr-<?php echo $ch;?>"
class="multichannel"<?php echo $visibility ?>>
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="SignalNoiseRatioCMLE<?php echo $ch; ?>"
name="SignalNoiseRatioCMLE<?php echo $ch; ?>"
title="Signal-to-noise ratio (CMLE)"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"
onchange="copySnrToOtherAlgorithms(<?php echo $ch; ?>,this)"/>
</span>
</span>
</div><!-- cmle-snr-channelNumber-->
<?php
$visibility = " style=\"display: none\"";
if ($deconAlgorithm[$ch] == "gmle") {
$visibility = " style=\"display: block\"";
}
// All SNR divs need to be initialized with the value from the saved parameter.
$value = $signalNoiseRatioValue[$ch];
?>
<div id="gmle-snr-<?php echo $ch;?>"
class="multichannel"<?php echo $visibility ?>>
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="SignalNoiseRatioGMLE<?php echo $ch; ?>"
name="SignalNoiseRatioGMLE<?php echo $ch; ?>"
title="Signal-to-noise ratio (GMLE)"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"
onchange="copySnrToOtherAlgorithms(<?php echo $ch; ?>,this)"/>
</span>
</span>
</div><!-- gmle-snr-channelNumber-->
<?php
$visibility = " style=\"display: none\"";
if ($deconAlgorithm[$ch] == "qmle") {
$visibility = " style=\"display: block\"";
}
// All SNR divs need to be initialized with the value from the saved parameter.
$value = $signalNoiseRatioValue[$ch];
?>
<div id="qmle-snr-<?php echo $ch;?>"
class="multichannel"<?php echo $visibility ?>>
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="SignalNoiseRatioQMLE<?php echo $ch; ?>"
name="SignalNoiseRatioQMLE<?php echo $ch; ?>"
title="Signal-to-noise ratio (QMLE)"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"
onchange="copySnrToOtherAlgorithms(<?php echo $ch; ?>,this)"/>
</span>
</span>
</div><!-- qmle-snr-channelNumber-->
<?php
$visibility = " style=\"display: none\"";
if ($deconAlgorithm[$ch] == "skip") {
$visibility = " style=\"display: block\"";
}
// All SNR divs need to be initialized with the value from the saved parameter.
$value = $signalNoiseRatioValue[$ch];
?>
<div id="skip-snr-<?php echo $ch;?>"
class="multichannel"<?php echo $visibility ?>>
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="SignalNoiseRatioSKIP<?php echo $ch; ?>"
name="SignalNoiseRatioSKIP<?php echo $ch; ?>"
title="Signal-to-noise ratio (SKIP)"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"
onchange="copySnrToOtherAlgorithms(<?php echo $ch; ?>,this)"/>
</span>
</span>
</div><!-- skip-snr-channelNumber-->
<!-- Close the table cell for the SNR of this channel-->
</td>
<?php
/* Start a new table row after a number of entries. */
if ($chanCnt == 4) {
if ($ch == 2) {
echo "</tr><tr>";
}
} else {
if ($ch == 2) {
echo "</tr><tr>";
}
}
}
?>
<!-- Close the last row and table-->
</tr></table>
<p><a href="#"
onmouseover="TagToTip('ttEstimateSnr' )"
onmouseout="UnTip()"
onclick="storeValuesAndRedirect(
'estimate_snr_from_image.php');">
<img src="images/calc_small.png" alt=""/>
Estimate SNR from image</a>
</p>
</div> <!-- snr div -->
</fieldset> <!-- signal/noise ratio fieldset-->
<!-- acuity mode -->
<fieldset class="setting provided"
onmouseover="changeQuickHelp('acuity');">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/acuity')">
<img src="images/help.png" alt="?"/></a>
Acuity Mode
</legend>
<div id="acuity mode">
<tr>
<td>Acuity mode:</td>
<td>
<select id="AcuityMode"
title="Acuity mode"
name="AcuityMode"
class="selection"
onchange="switchAcuityMode(this)">
<?php
/*
ACUITY MODE
*/
$parameterAcuityMode =
$_SESSION['task_setting']->parameter("AcuityMode");
$possibleValues = $parameterAcuityMode->possibleValues();
$selectedMode = $parameterAcuityMode->value();
foreach ($possibleValues as $possibleValue) {
$translatedValue =
$parameterAcuityMode->translatedValueFor($possibleValue);
if ($possibleValue == $selectedMode) {
$selected = " selected=\"selected\"";
} else {
$selected = "";
}
?>
<option <?php echo $selected; ?>
value="<?php echo $possibleValue?>">
<?php echo $translatedValue ?>
</option>
<?php
} /* End of loop for select options. */
?>
</select>
</td>
</tr>
<!-- start the acuity table-->
<table><tr>
<?php
/* ACUITY */
$visibility = " style=\"display: none\"";
if ($selectedMode == "on") {
$visibility = " style=\"display: block\"";
}
$acuityParam = $_SESSION['task_setting']->parameter("Acuity");
$acuityValue = $acuityParam->value();
/* Loop over the channels. */
for ($ch = 0; $ch < $chanCnt; $ch++) {
// All acuity divs need to be initialized with the value from the saved parameter.
$value = $acuityValue[$ch];
?>
<td>
<div id="acuity-<?php echo $ch;?>"
class="multichannel"<?php echo $visibility ?>>
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="Acuity<?php echo $ch; ?>"
name="Acuity<?php echo $ch; ?>"
title="Acuity"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"/>
</span>
</span>
</div><!-- acuity-channelNumber-->
</td>
<?php
/* Start a new table row after a number of entries. */
if ($ch == 2) echo "</tr><tr>";
}
?>
<!-- Close the last row and table-->
</tr></table>
</div> <!-- acuity mode div -->
</fieldset> <!-- acuity mode fieldset-->
<div id="Autocrop">
<fieldset class="setting provided"
onmouseover="changeQuickHelp('autocrop');">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/HelpCropper')">
<img src="images/help.png" alt="?"/>
</a>
Cropping Mode
</legend>
<select id="Autocrop"
title="Autocrop"
name="Autocrop"
class="selection">
<?php
/*
AUTOCROP
*/
$parameterAutocrop =
$_SESSION['task_setting']->parameter("Autocrop");
$possibleValues = $parameterAutocrop->possibleValues();
$selectedMode = $parameterAutocrop->value();
foreach ($possibleValues as $possibleValue) {
$translation =
$parameterAutocrop->translatedValueFor($possibleValue);
if ($possibleValue == $selectedMode) {
$option = "selected=\"selected\"";
} else {
$option = "";
}
?>
<option <?php echo $option ?>
value="<?php echo $possibleValue ?>">
<?php echo $translation ?>
</option>
<?php
}
?>
</select>
</div> <!-- Autocrop -->
<div id="BleachingMode">
<fieldset class="setting provided"
onmouseover="changeQuickHelp('bleaching');">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/HelpBleaching')">
<img src="images/help.png" alt="?"/>
</a>
Bleaching Correction
</legend>
<select id="BleachingMode"
title="Bleaching Mode"
name="BleachingMode"
class="selection">
<?php
/*
BLEACHINIG MODE
*/
$parameterBlMode =
$_SESSION['task_setting']->parameter("BleachingMode");
$possibleValues = $parameterBlMode->possibleValues();
$selectedMode = $parameterBlMode->value();
foreach ($possibleValues as $possibleValue) {
$translation =
$parameterBlMode->translatedValueFor($possibleValue);
if ($possibleValue == $selectedMode) {
$option = "selected=\"selected\"";
} else {
$option = "";
}
?>
<option <?php echo $option ?>
value="<?php echo $possibleValue ?>">
<?php echo $translation ?>
</option>
<?php
}
?>
</select>
</div> <!-- BleachingMode -->
<div id="ArrayDetectorReductionMode">
<?php
if ($_SESSION['user']->isAdmin()
|| $_SESSION['task_setting']->isEligibleForArrayReduction($_SESSION['setting'])) {
?>
<fieldset class="setting provided"
onmouseover="changeQuickHelp('arrayDetectorReductionMode');">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/ArrayDetector')">
<img src="images/help.png" alt="?"/>
</a>
Array Detector Reduction Mode
</legend>
<select id="ArrayDetectorReductionMode"
title="ArrayDetectorReductionMode"
name="ArrayDetectorReductionMode"
class="ArrayDetectorReductionMode">
<?php
/*
ARRAY DETECTOR REDUCTION MODE
*/
$parameterReductionMode =
$_SESSION['task_setting']->parameter("ArrayDetectorReductionMode");
$possibleValues = $parameterReductionMode->possibleValues();
$selectedMode = $parameterReductionMode->value();
foreach ($possibleValues as $possibleValue) {
$translation =
$parameterReductionMode->translatedValueFor($possibleValue);
if ($possibleValue == $selectedMode) {
$option = "selected=\"selected\"";
} else {
$option = "";
}
?>
<option <?php echo $option ?>
value="<?php echo $possibleValue ?>">
<?php echo $translation ?>
</option>
<?php
}
?>
</select>
<?php
} else {
$_SESSION['task_setting']->parameter("ArrayDetectorReductionMode")->setValue('all');
?>
<input name="ArrayDetectorReductionMode" type="hidden" value="all">
<?php
}
?>
</div> <!-- ArrayDetectorReductionMode -->
<!-- background mode -->
<fieldset class="setting provided"
onmouseover="changeQuickHelp('background');">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/BackgroundMode')">
<img src="images/help.png" alt="?"/></a>
Background Mode
</legend>
<div id="background">
<?php
/*
BACKGROUND OFFSET
*/
$backgroundOffsetPercentParam =
$_SESSION['task_setting']->parameter("BackgroundOffsetPercent");
$backgroundOffset = $backgroundOffsetPercentParam->internalValue();
$flag = "";
if ($backgroundOffset[0] == "" || $backgroundOffset[0] == "auto") {
$flag = " checked=\"checked\"";
}
?>
<p>
<input type="radio"
title="Background estimation mode (auto)"
id="BackgroundEstimationModeAuto"
name="BackgroundEstimationMode"
value="auto"<?php echo $flag ?> />
automatic background estimation
</p>
<?php
$flag = "";
if ($backgroundOffset[0] == "object") $flag = " checked=\"checked\"";
?>
<p>
<input type="radio"
title="Background estimation mode (object)"
id="BackgroundEstimationModeObject"
name="BackgroundEstimationMode"
value="object"<?php echo $flag ?> />
in/near object
</p>
<?php
$flag = "";
if ($backgroundOffset[0] != "" && $backgroundOffset[0] != "auto" &&
$backgroundOffset[0] != "object"
) {
$flag = " checked=\"checked\"";
}
?>
<input type="radio"
title="Background estimation mode (absolute value)"
id="BackgroundEstimationModeAbsValue"
name="BackgroundEstimationMode"
value="manual"<?php echo $flag ?> />
remove constant absolute value:
<div class="multichannel">
<?php
for ($i = 0; $i < $chanCnt; $i++) {
$val = "";
if ($backgroundOffset[0] != "auto" && $backgroundOffset[0] != "object") {
$val = $backgroundOffset[$i];
}
/* Add a line break after a number of entries. */
if ($chanCnt == 4) {
if ($i == 2) {
echo "<br />";
}
} else {
if ($i == 3) {
echo "<br />";
}
}
?>
<span class="nowrap">
Ch<?php echo $i ?>:
<span class="multichannel">
<input
id="BackgroundOffsetPercent<?php echo $i ?>"
name="BackgroundOffsetPercent<?php echo $i ?>"
title="Background offset"
type="text"
size="8"
value="<?php echo $val ?>"
class="multichannelinput"
onclick="document.forms[0].BackgroundEstimationModeAbsValue.checked=true"/>
</span>
</span>
<?php
}
/*!
\todo The visibility toggle should be restored but only the
quality change should be hidden for qmle, not the whole stopping
criteria div!
Also restore the changeVisibility("cmle-it") call in
scripts/settings.js.
*/
//$visibility = " style=\"display: none\"";
//if ($selectedMode == "cmle" || $selectedMode =="gmle") {
$visibility = " style=\"display: block\"";
//}
?>
</div>
</div>
</fieldset>
<div id="cmle-it" <?php echo $visibility ?>>
<!-- stopping criteria -->
<fieldset class="setting provided"
onmouseover="changeQuickHelp('stopcrit');">
<legend>
Stopping Criteria
</legend>
<div id="criteria">
<p>
<a href="javascript:openWindow(
'http://www.svi.nl/MaxNumOfIterations')">
<img src="images/help.png" alt="?"/></a>
Number of iterations:
</p>
<table><tr>
<?php
$parameter = $_SESSION['task_setting']->parameter("NumberOfIterations");
$itValues = $parameter->value();
/* Loop over the channels. */
for ($ch = 0; $ch < $chanCnt; $ch++) {
$value = $itValues[$ch];
?>
<td>
<div id="NumberOfIterations-<?php echo $ch;?>"
class="multichannel">
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="it<?php echo $ch; ?>"
name="it<?php echo $ch; ?>"
title="Quality change"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"/>
</span>
</span>
</div> <!-- QualityChangeStoppingCriterion -->
</td>
<?php
/* Start a new table row after a number of entries. */
if ($ch == 2) echo "</tr><tr>";
}
?>
<!-- Close the last row and table-->
</tr></table>
<p><a href="javascript:openWindow(
'http://www.svi.nl/QualityCriterion')">
<img src="images/help.png" alt="?"/></a>
Quality change:
</p>
<table><tr>
<?php
$parameter = $_SESSION['task_setting']->parameter("QualityChangeStoppingCriterion");
$qValues = $parameter->value();
/* Loop over the channels. */
for ($ch = 0; $ch < $chanCnt; $ch++) {
$value = $qValues[$ch];
?>
<td>
<div id="QualityChangeStoppingCriterion-<?php echo $ch;?>"
class="multichannel">
<span class="nowrap">Ch<?php echo $ch; ?>:
<span class="multichannel">
<input
id="q<?php echo $ch; ?>"
name="q<?php echo $ch; ?>"
title="Quality change"
type="text"
size="8"
value="<?php echo $value; ?>"
class="multichannelinput"/>
</span>
</span>
</div> <!-- QualityChangeStoppingCriterion -->
</td>
<?php
/* Start a new table row after a number of entries. */
if ($ch == 2) echo "</tr><tr>";
}
?>
<!-- Close the last row and table-->
</tr></table>
</fieldset>
</div>
<div id="ZStabilization">
<?php
if ($_SESSION['user']->isAdmin()
|| $_SESSION['task_setting']->isEligibleForZStabilization($_SESSION['setting'])) {
?>
<fieldset class="setting provided"
onmouseover="changeQuickHelp('zstabilization');">
<legend>
<a href="javascript:openWindow(
'http://www.svi.nl/ObjectStabilizer')">
<img src="images/help.png" alt="?"/>
</a>
Stabilize data sets in the Z direction?
</legend>
<p>STED images often need to be stabilized in the Z direction
before
they
are deconvolved. Please note that skipping this step might
affect
the
quality of the deconvolution.</p>
<select id="ZStabilization"
title="Z stabilization"
name="ZStabilization"
class="selection">
<?php
/*
STABILIZATION
*/
$parameterStabilization =
$_SESSION['task_setting']->parameter("ZStabilization");
$possibleValues = $parameterStabilization->possibleValues();
$selectedMode = $parameterStabilization->value();
foreach ($possibleValues as $possibleValue) {
$translation =
$parameterStabilization->translatedValueFor($possibleValue);
if ($possibleValue == $selectedMode) {
$option = "selected=\"selected\"";
} else {
$option = "";
}
?>
<option <?php echo $option ?>
value="<?php echo $possibleValue ?>">
<?php echo $translation ?>
</option>
<?php
}
?>
</select>
<?php
} else {
$_SESSION['task_setting']->parameter("ZStabilization")->setValue('0');
?>