STEAM
Statistical Template Estimation for Abnormality Mapping
Download Example STEAM Templates
This STEAM preterm infant DTI template collection is provided under the
Creative Commons
Attribution-NonCommercial-ShareAlike license. It is provided "as is" without
any implied warranties for any particular purpose. In no event shall the authors of this
site be liable for any damage or tort arising from the use of these template, even if we
are advised of the possibility of such damage.
If you used these STEAM templates in a publication, we ask that you cite the appropriate
source (i.e. this website) as follows:
B. G. Booth, S. P. Miller, C. J. Brown, K. J. Poskitt, V. Chau, R. E. Grunau, A. R. Synnes, and G. Hamarneh.
"STEAM - Statistical Template Estimation for Abnormality Mapping: a Personalized DTI Analysis Technique with Applications to the Screening of Preterm Infants",
NeuroImage, Volume 125, pp. 705-723, 2016.
To download the STEAM templates, please select the statistical templates from the full collection below. The
selected templates will be collected in a zip file and an email with a link to the zip file will
sent soon after. Each image in the STEAM template collection is provided in compressed nifti format.
Full tensor images are provided in upper triangular order ([dxx dxy dxz dyy dyz dzz]).
var zipName = " . $ipAddress . ";";
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Fill boolean array
foreach ($formVals as $key => $value) {
if (isset($_POST[$key]) && $_POST[$key] == "1") {
$formVals[$key] = true;
} else {
$formVals[$key] = false;
}
}
// Do sanity checks
$saneInput = false;
for ($IT = 0; $IT < 14; $IT++) {
for ($AT = 1; $AT < 5; $AT++) {
if ($formVals[$imgTypes[$IT] . "_" . $AT]) {
$saneInput = true;
break;
}
}
}
if ($saneInput == false) {
echo "";
}
if ($saneInput) {
$saneInput = false;
if ($formVals["Mean"] || $formVals["Var"] || $formVals["PVal"]) {
$saneInput = true;
} else {
echo "";
}
}
if ($saneInput) {
$saneInput = false;
for ($ST = 0; $ST < 9; $ST++) {
if ($formVals["s" . $ST]) {
$saneInput = true;
break;
}
}
if ($saneInput == false) {
echo "";
}
}
// check the email
if (empty($_POST["email"])) {
if ($saneInput) {
$saneInput = false;
echo "";
}
} else {
$formEmail = filter_var($_POST["email"], FILTER_SANITIZE_EMAIL);
// check if e-mail address is well-formed
if (!filter_var($formEmail, FILTER_VALIDATE_EMAIL)) {
if ($saneInput) {
$saneInput = false;
echo "";
}
}
}
if (!empty($_POST["comments"])) {
$formComments = test_input($_POST["comments"]);
}
if (!empty($_POST["name"])) {
$formName = test_input($_POST["name"]);
}
if (!empty($_POST["position"])) {
$formPosition = test_input($_POST["position"]);
}
if (!empty($_POST["affiliation"])) {
$formAffiliation = test_input($_POST["affiliation"]);
}
// Check to make sure that the zip process hasn't started already
if ($saneInput) {
if (file_exists(sprintf("/cs/ghassan1/steam/tmp/%s.lock", $ipAddress))) {
$saneInput = false;
echo "";
}
}
// Check if the user wants to overwrite existing zip file
if (!(isset($_POST["overwrite"]) && $_POST["overwrite"] == "1")) {
$saneInput = false;
}
if ($saneInput) {
// Start zip process
$templateArg = "";
foreach ($formVals as $key => $value) {
if ($value) {
if (strlen($templateArg) == 0) {
$templateArg = $key;
} else {
$templateArg = $templateArg . ":" . $key;
}
}
}
$command = sprintf("../makeZip.sh -t %s -n %s -c %s -p %s -a %s -e %s -i %s >& /dev/null &",
escapeshellarg($templateArg), escapeshellarg($formName), escapeshellarg($formComments),
escapeshellarg($formPosition), escapeshellarg($formAffiliation), escapeshellarg($formEmail),
escapeshellarg($ipAddress));
exec('/bin/tcsh -c "exec nohup ' . $command . '"', $tmpOut, $rVal);
//exec("ls ../", $tmpOut, $rVal);
//print_r($tmpOut);
$overwriteZip = false;
echo "";
// display alert dialog acknowledging they succcessfully submitted their request.
echo "";
}
}
function get_client_ip() {
$ipaddress = '';
if ($_SERVER['HTTP_CLIENT_IP'])
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if($_SERVER['HTTP_X_FORWARDED_FOR'])
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if($_SERVER['HTTP_X_FORWARDED'])
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
else if($_SERVER['HTTP_FORWARDED_FOR'])
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
else if($_SERVER['HTTP_FORWARDED'])
$ipaddress = $_SERVER['HTTP_FORWARDED'];
else if($_SERVER['REMOTE_ADDR'])
$ipaddress = $_SERVER['REMOTE_ADDR'];
else
return sprintf("%u", time());
return sprintf("%u", ip2long($ipaddress));
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
$data = str_replace("$", "", $data); // These two characters will be problems for the
$data = str_replace("`", "", $data); // bash script. Remove them.
return $data;
}
?>
© SFU Medical Image Analysis Lab, 2014