Select a raw image to estimate the Signal-to-Noise Ratio (SNR).
You can then use the estimated SNR values in the Restoration
Settings to deconvolve similar images, acquired under similar
- conditions.
';
+ conditions.
+
+ You have a choice of two SNR estimation algorithms. Please click
+ on the corresponding help button for additional information.
';
if ($type != "") {
$info .= "
-
Here you are asked to define whether you want to use a theoretical
- PSF, or if you instead want to use a measured PSF you distilled
- with the Huygens software.
+
Here you are asked to define the number of channels in your
+ data and whether you want to use a theoretical PSF or a
+ measured PSF you distilled with the Huygens Software.
diff --git a/inc/FileBrowser.inc.php b/inc/FileBrowser.inc.php
index aed773229..d51f48f4d 100644
--- a/inc/FileBrowser.inc.php
+++ b/inc/FileBrowser.inc.php
@@ -71,7 +71,7 @@ function fileButton($type) {
$class = "icon update";
$tip = "Refresh image list";
break;
-
+
case "omeroImport":
$name = "getOmeroData";
$value = "OMERO Data";
@@ -156,7 +156,7 @@ function fileButton($type) {
}
if (isset($_POST['getOmeroData']) || isset($_POST['exportToOmero'])) {
-
+
if (isset($omeroConnection)) {
if ($omeroConnection->loggedIn) {
$omeroTree = $omeroConnection->getLastOmeroTree();
@@ -165,7 +165,7 @@ function fileButton($type) {
}
if (isset($_POST['importFromOmero'])) {
-
+
if (isset($omeroConnection)) {
if ($omeroConnection->loggedIn) {
$omeroTree = $omeroConnection->getLastOmeroTree();
@@ -174,7 +174,7 @@ function fileButton($type) {
}
if (isset($_POST['refreshOmero'])) {
-
+
if (isset($omeroConnection)) {
if ($omeroConnection->loggedIn) {
$omeroTree = $omeroConnection->getUpdatedOmeroTree();
@@ -183,7 +183,7 @@ function fileButton($type) {
}
/************ End of code for the interaction with OMERO. **********/
-
+
// JavaScript
@@ -391,11 +391,6 @@ function imageAction (list) {
$flag = " disabled=\"disabled\"";
}
-// If using IE make sure to enforce IE7 Document Mode
-if ( using_IE( ) ) {
- $meta = "
-
+
-
+
src= width="40"/>
-
+
+ ?>
+
-
diff --git a/inc/Fileserver.inc.php b/inc/Fileserver.inc.php
index 82b6cbef9..7f538b82c 100644
--- a/inc/Fileserver.inc.php
+++ b/inc/Fileserver.inc.php
@@ -1213,16 +1213,96 @@ public function getSubImages($files) {
}
/*!
- \brief Some files like ICS can report their metadata without having to
- open the whole image, which is good e.g. to see the compatibility
- of the selected PSF with the current Parameter Setting.
- This is done by querying HuCore.
- \param $type File type, default is "ics"
- \param $file This can be a file name for the file to be inspected, or
- "all" to inspect all the files of type $type that are in the source
- folder
- \return N-dimensional array of metadata per file
+ \brief Some files like ICS can report their metadata without having to
+ open the whole image, which is good e.g. to see the compatibility
+ of the selected PSF with the current Parameter Setting.
+ This is done by querying HuCore.
+ \param $files Array of file paths (relative to the source folder).
+ \return N-dimensional array of metadata per file
*/
+ public function getMetaDataFromFiles(array $files) {
+
+ $i = 0;
+ $imgList = "";
+
+ foreach ($files as $path) {
+ $imgList .= " -img_$i \"$path\"";
+ $i ++;
+ }
+
+ $opt = "-count $i $imgList -dir \"". $this->sourceFolder() ."\"";
+ $answer = huCoreTools( "getMetaData", $opt);
+ if (! $answer ) return;
+
+ $lines = count($answer);
+
+ $tree = array();
+ $new_files = array();
+ $cur = NULL;
+ $param = NULL;
+
+ for ($i = 0; $i < $lines; $i++ ) {
+ $key = $answer[$i];
+
+ switch ($key) {
+ case "BEGIN IMG":
+ $i ++;
+ $cur = $answer[$i];
+ break;
+ case "ERROR":
+ $i ++;
+ echo($answer[$i]);
+ case "END IMG":
+ $cur = NULL;
+ $param = NULL;
+ $len = 1;
+ break;
+ case "PATH":
+ if ($cur) {
+ $i ++;
+ $tree[$cur]['path'] = $answer[$i];
+ }
+ break;
+ case "LENGTH":
+ if ($cur) {
+ $i ++;
+ $len = $answer[$i];
+ }
+ break;
+ case "DATA":
+ if ($cur) {
+ $i ++;
+ $param= $answer[$i];
+ $tree[$cur]['parameters'][] = $param;
+ }
+ break;
+ case "VALUE":
+ if ($cur && $param) {
+ $i ++;
+ // This is always an array even if $len == 1, because in
+ // other images this could be a multichannel parameter.
+ $tree[$cur][$param][] = $answer[$i];
+ }
+ break;
+
+ }
+ }
+
+ return $tree;
+
+ }
+
+ /*!
+ \brief Some files like ICS can report their metadata without having to
+ open the whole image, which is good e.g. to see the compatibility
+ of the selected PSF with the current Parameter Setting.
+ This is done by querying HuCore.
+ \param $type File type, default is "ics"
+ \param $file This can be a file name for the file to be inspected, or
+ "all" to inspect all the files of type $type that are in the source
+ folder
+ \return N-dimensional array of metadata per file
+ */
public function getMetaData( $type = "ics", $file = "all" ) {
$i = 0;
@@ -1833,8 +1913,7 @@ public function previewPage ($file , $op = "close", $mode = "MIP", $size = 400)
}
echo "\n";
@@ -2076,8 +2155,7 @@ public function compareResult( $file, $size = "400", $op = "close", $mode="MIP"
echo "
\n";
echo "\n";
echo "\n
".
+ "'http://support.svi.nl/wiki/HuygensRemoteManagerHelpCompareResult')\">".
"".
"";
@@ -2316,15 +2394,15 @@ public function folderContains($folder, $string) {
return False;
}
$dir = opendir($folder);
- if ($dir == false) {
+ if ($dir == False) {
// Directory could not be read
return False;
}
$result = False;
- while ($name = readdir($dir)) {
- if (strstr($name, $string)) {
- $result = True;
- }
+ while (False !== ($name = readdir($dir))) {
+ if (strstr($name, $string)) {
+ $result = True;
+ }
}
closedir($dir);
return $result;
@@ -2643,6 +2721,17 @@ public static function findCompanionFile($file) {
}
+ /*!
+ \brief Return all files with extension ".ics" and ".h5" found by recursive scan of the source folder.
+ \return array of file names.
+ */
+ public function getPSFiles() {
+
+ // Get and return the files filtered by extension (ics, h5)
+ return $this->filterFilesFromDirByExtensions(
+ $this->sourceFolder(), "", array(".ics", ".h5"));
+ }
+
/*
PRIVATE FUNCTIONS
*/
@@ -3143,6 +3232,73 @@ private function cleanNonImages($startDir, $prefix, &$valid, &$msg) {
}
}
+ /*!
+ \brief The recursive function that collects the files with given extension
+ from the user's image folder and its subfolders
+ \param $startDir The folder to start from
+ \param $relDir The folder relative to $startDir. This will be created
+ automatically when the function is called recursively.
+ When calling from other functions, $relDir will normally be "".
+ \param $extensions Array of file extensions
+ \return Array of file names with given extension
+*/
+ private function filterFilesFromDirByExtensions($startDir, $relDir, array $extensions)
+ {
+ // Scan directory $startDir
+ $files = array();
+ $dir = dir($startDir);
+ if ($dir === false || $dir === null) {
+ // Directory could not be read
+ return $files;
+ }
+
+ // Now process all files
+ while (false !== ($entry = $dir->read())) {
+
+ // Skip '.' and '..'
+ if ($entry == "." || $entry == "..") {
+ continue;
+ }
+
+ // If subfolder, recurse into it
+ if (is_dir($startDir . "/" . $entry)) {
+ $newStartDir = $startDir . "/" . $entry;
+ if ($relDir=="") {
+ $newRelDir = $entry;
+ } else {
+ $newRelDir = $relDir . "/" . $entry;
+ }
+ $files = array_merge($files,
+ $this->filterFilesFromDirByExtensions($newStartDir, $newRelDir, $extensions));
+ } else {
+
+ // Check whether the extension matches one of the filters
+ $found = false;
+ foreach($extensions as $ext) {
+ if (0 == strcasecmp(substr($entry, -((int)strlen($ext))), $ext)) {
+ $found = true;
+ break;
+ }
+ }
+ if (! $found) {
+ continue;
+ }
+ if ($relDir == "") {
+ $files[] = $entry;
+ } else {
+ $files[] = $relDir . "/" . $entry;
+ }
+
+ }
+
+ }
+
+ // Close the directory and return
+ $dir->close();
+ sort($files);
+ return $files;
+ }
+
/*!
\brief The recursive function that collects the files with given extension
from the user's image folder and its subfolders
@@ -3152,47 +3308,47 @@ private function cleanNonImages($startDir, $prefix, &$valid, &$msg) {
\param $extension File extension
\return Array of file names with given extension
*/
- private function listFilesFrom($startDir, $prefix, $extension) {
- $files = array();
- $dir = dir($startDir);
- if ($dir == false) {
- // Directory could not be read
- return $files;
- }
- while ($entry = $dir->read()) {
- if ($entry != "." && $entry != "..") {
- if (is_dir($startDir . "/" . $entry)) {
- $newDir = $startDir . "/" . $entry;
- if ($prefix=="") {
- $newPrefix = $entry;
- } else {
- $newPrefix = $prefix . "/" . $entry;
- }
- $files = array_merge($files,
- $this->listFilesFrom($newDir, $newPrefix, $extension));
- } else {
- $found = false;
- foreach ($this->imageExtensions as $current) {
- $nc = (int)strlen($current);
- if (strcasecmp(substr($entry, -$nc), $current) == 0) {
- $found = true;
- break;
+ private function listFilesFrom($startDir, $prefix, $extension) {
+ $files = array();
+ $dir = dir($startDir);
+ if ($dir == false) {
+ // Directory could not be read
+ return $files;
+ }
+ while ($entry = $dir->read()) {
+ if ($entry != "." && $entry != "..") {
+ if (is_dir($startDir . "/" . $entry)) {
+ $newDir = $startDir . "/" . $entry;
+ if ($prefix=="") {
+ $newPrefix = $entry;
+ } else {
+ $newPrefix = $prefix . "/" . $entry;
+ }
+ $files = array_merge($files,
+ $this->listFilesFrom($newDir, $newPrefix, $extension));
+ } else {
+ $found = false;
+ foreach ($this->imageExtensions as $current) {
+ $nc = (int)strlen($current);
+ if (strcasecmp(substr($entry, -$nc), $current) == 0) {
+ $found = true;
+ break;
+ }
+ }
+ if ($found === false) {
+ continue;
+ }
+ if ($prefix=="") {
+ $files[] = $entry;
+ } else {
+ $files[] = $prefix . "/" . $entry;
+ }
}
}
- if ($found === false) {
- continue;
- }
- if ($prefix=="") {
- $files[] = $entry;
- } else {
- $files[] = $prefix . "/" . $entry;
- }
- }
- }
+ }
+ $dir->close();
+ return $files;
}
- $dir->close();
- return $files;
- }
/* ------------------------- Colocalization -------------------------- */
diff --git a/inc/Job.inc.php b/inc/Job.inc.php
index 9f2c52dc8..6753d8609 100644
--- a/inc/Job.inc.php
+++ b/inc/Job.inc.php
@@ -790,7 +790,17 @@ private function writeImageParamTable($reportFile) {
$row .= $this->insertCell($value ,$style);
$table .= $this->insertRow($row);
}
-
+
+ /* The PSF mode is an exception and needs no parsing. Add it straight. */
+ $setting = $this->jobDescription->parameterSetting();
+ $PSFmode = $setting->parameter("PointSpreadFunction")->value();
+ $row = $this->insertCell("Point Spread Function", "userdef");
+ $row .= $this->insertCell("All" , "userdef");
+ $row .= $this->insertCell("User defined" , "userdef");
+ $row .= $this->insertCell($PSFmode , "userdef");
+ $table .= $this->insertRow($row);
+
+
$html = $this->insertTable($table);
$html = $title . $text . $html;
$html .= $this->insertSeparator("");
diff --git a/inc/System.inc.php b/inc/System.inc.php
index 6bb9e1a6e..e85cdb123 100644
--- a/inc/System.inc.php
+++ b/inc/System.inc.php
@@ -25,7 +25,7 @@ class System {
const HRM_VERSION_MAJOR = 3;
const HRM_VERSION_MINOR = 2;
- const HRM_VERSION_MAINTENANCE = 1;
+ const HRM_VERSION_MAINTENANCE = 2;
/* !
\var DB_LAST_REVISION
diff --git a/inc/Util.inc.php b/inc/Util.inc.php
index 682d21b40..37ab39a94 100644
--- a/inc/Util.inc.php
+++ b/inc/Util.inc.php
@@ -11,13 +11,13 @@
\return A boolean: true if the value exists in the array, false otherwise.
*/
function isValueInArray($array, $value){
-
+
if(!is_array($array)){
return;
}
$found = FALSE;
-
+
foreach ($array as $arrKey => $arrValue) {
/* A first filter on the length to distinguish '0' and '', which
@@ -29,7 +29,7 @@ function isValueInArray($array, $value){
}
}
}
-
+
return $found;
}
@@ -333,7 +333,7 @@ function report($text, $level) {
}
rename($logpath, $logpath . ".old");
}
-
+
$file = fopen($logpath, 'a');
if ($file === FALSE) {
// Cannot write to the log dir (or the file)
@@ -370,7 +370,7 @@ function notifyRuntimeError($subject, $message) {
\return string containing the name of current page
*/
function getThisPageName() {
- return substr($_SERVER["SCRIPT_NAME"],
+ return substr($_SERVER["SCRIPT_NAME"],
strrpos($_SERVER["SCRIPT_NAME"], "/") + 1);
}
@@ -405,7 +405,7 @@ function let_to_num($v) {
*/
function getMaxSingleUploadSize() {
- $max_upload_size = min(let_to_num(ini_get('post_max_size')),
+ $max_upload_size = min(let_to_num(ini_get('post_max_size')),
let_to_num(ini_get('upload_max_filesize')));
return $max_upload_size;
@@ -463,7 +463,7 @@ function getMaxFileSize() {
(default: true)
\return if reading was not successful, the function returns false. If reading
was successful, the function returns the number of read bytes if
- $retbytes is true, and a boolean otherwise (true if the file was
+ $retbytes is true, and a boolean otherwise (true if the file was
closed successfully, false otherwise).
\see http://nl.php.net/manual/en/function.readfile.php#54295
*/
@@ -494,9 +494,9 @@ function readfile_chunked($filename, $retbytes=true) {
if (!function_exists('printDebug')) {
/* !
- \brief A global debugging function, that will print all its arguments
- whether are strings, arrays or objects. This works if a global
- variable $debug = true, that can be defined in
+ \brief A global debugging function, that will print all its arguments
+ whether are strings, arrays or objects. This works if a global
+ variable $debug = true, that can be defined in
hrm_client_config.inc. Otherwise it does nothing.
*/
function printDebug() {
diff --git a/inc/nav/manual.inc.php b/inc/nav/manual.inc.php
index bc93c2bab..3daaedd31 100644
--- a/inc/nav/manual.inc.php
+++ b/inc/nav/manual.inc.php
@@ -1,5 +1,5 @@
-
+
HRM manual
diff --git a/omero_UI.php b/omero_UI.php
index a79dbec7d..03179881a 100644
--- a/omero_UI.php
+++ b/omero_UI.php
@@ -36,9 +36,16 @@
}
});
- $( "#floatingCredentialsDialog" ).dialog();
-
$( "#floatingCredentialsDialog" ).dialog({
+ show: {
+ effect: "slide",
+ duration: 300
+ },
+ hide: {
+ effect: "fade",
+ duration: 300
+ },
+ modal: true,
buttons: {
"Submit": function() {
omeroLogin();
@@ -132,6 +139,7 @@
$('#omeroTree').tree({
data: data,
+ saveState: true,
selectable: true,
onCanSelectNode: function(node) {
diff --git a/scripts/common.js b/scripts/common.js
index 609e292c4..4482e3c2a 100644
--- a/scripts/common.js
+++ b/scripts/common.js
@@ -598,7 +598,7 @@ function imgPrev(infile, mode, gen, compare, index, dir, referer, data) {
+ tip + '\')" '
+ ' onmouseout="UnTip()" >';
tip = '
3D image XZ preview:'+file;
- html = html + '
Set the number of channels in your images.';
+
+window.helpText[ "PSF" ] =
+ '
Use a theoretical PSF calculated from the acquisition parameters ' +
+ 'or a measured one obtained from distilled bead images in the Huygens ' +
+ 'Professional software.
';
+
+window.helpText[ "default" ] =
+ '
Here you are asked to define the number of channels in your data and ' +
+ 'whether you want to use a theoretical PSF or a measured PSF you distilled ' +
+ 'with the Huygens Software.
';
diff --git a/select_images.php b/select_images.php
index 89332145a..3d8463bd0 100644
--- a/select_images.php
+++ b/select_images.php
@@ -52,11 +52,11 @@
if (isset($_POST['userfiles']) && is_array($_POST['userfiles'])) {
- // Remove spaces added by the HRM file selector. See ' ' below.
+ // Remove spaces added by the HRM file selector. See ' ' below.
$fileNames = array();
foreach ($_POST['userfiles'] as $file) {
$name = htmlentities($file, null, 'utf-8');
- $name = str_replace(" ", " ", $name);
+ $name = str_replace(" ", " ", $name);
$name = html_entity_decode($name);
$fileNames[] = $name;
}
@@ -71,11 +71,11 @@
}
if (isset($_POST['selectedfiles']) && is_array($_POST['selectedfiles'])) {
- // Remove spaces added by the HRM file selector. See ' ' below.
+ // Remove spaces added by the HRM file selector. See ' ' below.
$fileNames = array();
foreach ($_POST['selectedfiles'] as $file) {
$name = htmlentities($file, null, 'utf-8');
- $name = str_replace(" ", " ", $name);
+ $name = str_replace(" ", " ", $name);
$name = html_entity_decode($name);
$fileNames[] = $name;
}
@@ -169,7 +169,7 @@ function filterImages (format,series) {
$generatedScript .= "
if(checkAgainstFormat('$file', selectedFormat)) {
var f = \"$file\";
- f = f.replace(/ /g, ' ');
+ f = f.replace(/ /g, ' ');
var selectItem = document.createElement('option');
$(selectItem).html(f);
$(selectItem).attr('title', '$file');
@@ -184,7 +184,7 @@ function filterImages (format,series) {
// Do not load file series automatically.
if(checkAgainstFormat('$file', selectedFormat)) {
var f = \"$file\";
- f = f.replace(/ /g, ' ');
+ f = f.replace(/ /g, ' ');
var selectItem = document.createElement('option');
$(selectItem).html(f);
$(selectItem).attr('title', '$file');
@@ -197,7 +197,7 @@ function filterImages (format,series) {
$generatedScript .= "
if(checkAgainstFormat('$file', selectedFormat)) {
var f = \"$file\";
- f = f.replace(/ /g, ' ');
+ f = f.replace(/ /g, ' ');
var selectItem = document.createElement('option');
$(selectItem).html(f);
$(selectItem).attr('title', '$file');
@@ -360,7 +360,7 @@ function imageAction (list) {
- Select images
-