<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="NiReports: https://www.nipreps.org/" />
<title>sub-61_ses-01_task-piper_run-01_bold :: MRIQC's BOLD fMRI report</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>

<script>
var timestamp = Date.now()

function read_form() {
    var ds = "<unset>";
    var sub = "sub-61_ses-01_task-piper_run-01_bold.nii.gz";

    var artifacts = [];
    $('#qcartifacts-group input:checked').each(function() {
        artifacts.push($(this).attr('name'));
    });

    var rating = $('#qcslider').val();
    var payload = {
        'dataset': ds,
        'subject': sub,
        'rating': rating,
        'artifacts': artifacts,
        'time_sec': (Date.now() - timestamp) / 1000,
        'confidence': $('#qcextra-confidence').val(),
        'comments': $('#qcextra-comments').val()
    };

    var file = new Blob([JSON.stringify(payload)], {type: 'text/json'});
    $('#btn-download').attr('href', URL.createObjectURL(file));
    $('#btn-download').attr('download', payload['dataset'] + "_" + payload['subject'] + ".json");
    return payload
};

function toggle_rating() {
    if ($('#qcrating-menu').hasClass('d-none')) {
        $('#qcrating-menu').removeClass('d-none');
        $('#qcrating-toggler').prop('checked', true);
    } else {
        $('#qcrating-menu').addClass('d-none');
        $('#qcrating-toggler').prop('checked', false);
    }
};

$(window).on('load',function(){
    var authorization = $('#btn-post').val()
    if (authorization.includes("secret_token")) {
        $('#btn-post').addClass('d-none');
    };
    timestamp = Date.now();
});

</script>
<style type="text/css">
/* The slider itself */
.slider {
  -webkit-appearance: none;  /* Override default CSS styles */
  appearance: none;
  margin-bottom: 8px;
  margin-left: 10%;
  width: 80%;
  height: 5px; /* Specified height */
  background: #d3d3d3; /* Grey background */
  outline: none; /* Remove outline */
  opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
  -webkit-transition: .2s; /* 0.2 seconds transition on hover */
  transition: opacity .2s;
}

/* Mouse-over effects */
.slider:hover {
  opacity: 1; /* Fully shown on mouse-over */
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border: 0;
  background: url('https://raw.githubusercontent.com/nipreps/nireports/main/assets/slider-handle.png');
  cursor: pointer;
  z-index: 2000 !important;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border: 0;
  background: url('https://raw.githubusercontent.com/nipreps/nireports/main/assets/slider-handle.png');
  cursor: pointer;
  z-index: 2000 !important;
}

</style>
</head>
<body style="font-family: helvetica;">
<nav class="navbar fixed-top navbar-expand-lg bg-light">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav me-auto mb-2 mb-lg-0">
        <li class="nav-item"><a class="nav-link" href="#Basic echo-wise reports">Basic echo-wise reports</a></li>
        <li class="nav-item"><a class="nav-link" href="#Extended echo-wise reports">Extended echo-wise reports</a></li>
        <li class="nav-item"><a class="nav-link" href="#Extended reports shared across echos">Extended reports shared across echos</a></li>
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" id="navbarAbout" role="button" data-bs-toggle="dropdown" aria-expanded="false" href="#About">
            About
            </a>
            <ul class="dropdown-menu">
                <li><a class="dropdown-item" href="#errors">Errors</a></li>
                <li><a class="dropdown-item" href="#meta-about-metadata">Reproducibility and provenance information</a></li>
            </ul>
        </li>
    </ul>
</div>
</div>
<div class="d-flex flex-row-reverse">
<div class="form-check form-switch align-self-center flex-fill me-4">
<input class="form-check-input" type="checkbox" id="qcrating-toggler"></input>
<label class="form-check-label" style="width: 100pt;" for="qcrating-toggler">Rating widget</label>
</div>
</div>
</nav>
<noscript>
    <h1 class="text-danger"> The navigation menu uses Javascript. Without it this report might not work as expected </h1>
</noscript>

    <div id="Basic echo-wise reports" class="mt-5">
    <h1 class="sub-report-title pt-5 ps-4">Basic echo-wise reports</h1>
        <div id="datatype-figures_desc-stdev_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">Standard deviation of signal through time</h3><p class="elem-caption">The voxel-wise standard deviation of the signal (variability along time).</p>                    <div class="reportlet">
<img class="svg-reportlet" src="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-stdev_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-stdev_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-stdev_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-background_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">View of the background of the voxel-wise average of the BOLD timeseries</h3><p class="elem-caption">This panel shows a mosaic enhancing the background around the head. Artifacts usually unveil themselves in the air surrounding the head, where no signal sources are present.</p>                    <div class="reportlet">
<img class="svg-reportlet" src="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-background_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-background_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-background_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-zoomed_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">Voxel-wise average of BOLD time-series, zoomed-in covering just the brain</h3><p class="elem-caption">This panel shows a mosaic of the brain. This mosaic is the most suitable to screen head-motion intensity inhomogeneities, global/local noise, signal leakage (for example, from the eyeballs and across the phase-encoding axis), etc.</p>                    <div class="reportlet">
<img class="svg-reportlet" src="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-zoomed_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-zoomed_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-zoomed_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-carpet_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">Carpetplot and nuisance signals</h3><p class="elem-caption">The so-called &laquo;carpetplot&raquo; may assist in assessing head-motion derived artifacts and respiation effects.</p>                    <div class="reportlet">
<img class="svg-reportlet" src="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-carpet_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-carpet_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-carpet_bold.svg</a></small>

        </div>
    </div>
    <div id="Extended echo-wise reports" class="mt-5">
    <h1 class="sub-report-title pt-5 ps-4">Extended echo-wise reports</h1>
        <div id="datatype-figures_desc-mean_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">Voxel-wise average of BOLD time-series</h3><p class="elem-caption">The average signal calculated across the last axis (time).</p>                    <div class="reportlet">
<img class="svg-reportlet" src="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-mean_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-mean_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-mean_bold.svg</a></small>

        </div>
    </div>
    <div id="Extended reports shared across echos" class="mt-5">
    <h1 class="sub-report-title pt-5 ps-4">Extended reports shared across echos</h1>
        <div id="datatype-figures_desc-brainmask_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">Brain extraction performance</h3><p class="elem-caption">Brain mask as internally extracted by MRIQC. Defects on the brainmask could indicate problematic aspects of the image quality-wise.</p>                    <div class="reportlet">
<img class="svg-reportlet" src="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-brainmask_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-brainmask_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-brainmask_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-61_suffix-bold_task-piper" class="ps-4 pe-4 mb-2">
<h3 class="run-title mt-3">Spatial normalization of the anatomical image</h3><p class="elem-caption">This panel shows a <em>quick-and-dirty</em> nonlinear registration into the <code>MNI152NLin2009cAsym</code> template accessed with <a href="https://templateflow.org/browse" target="_blank"><em>TemplateFlow</em></a>.</p>                    <div class="reportlet">
<object class="svg-reportlet" type="image/svg+xml" data="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-norm_bold.svg. If the link below works, please try reloading the report in your browser.</object>
</div>
<small>Get figure file: <a href="./sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-61/figures/sub-61_ses-01_task-piper_run-01_desc-norm_bold.svg</a></small>

        </div>
    </div>
    <div id="About" class="mt-5">
    <h1 class="sub-report-title pt-5 ps-4">About</h1>
        <div id="errors" class="ps-4 pe-4 mb-2">
<h2 class="sub-report-group mt-4">Errors</h2>                    <p class="alert alert-success" role="alert">No errors to report!</p>
        </div>
        <div id="meta-about-metadata" class="ps-4 pe-4 mb-2">
<h2 class="sub-report-group mt-4">Reproducibility and provenance information</h2><p class="elem-caption">Thanks for using <em>MRIQC</em>. The following information may assist in
reconstructing the provenance of the corresponding derivatives.
</p>                    <div class="accordion accordion-flush" id="about-metadata">


  <div class="accordion-item">
    <h2 class="accordion-header" id="about-metadata-0">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#about-metadata-0-collapse" aria-controls="about-metadata-0-collapse">
        Provenance Information
      </button>
    </h2>
    <div id="about-metadata-0-collapse" class="accordion-collapse collapse" aria-labelledby="about-metadata-0-heading" data-bs-parent="#about-metadata-0">
      <div class="accordion-body metadata-table">
      <table id="about-metadata-table-0" class="table table-sm table-striped">
<tr><td colspan=2>Execution environment</td><td>singularity</td></tr>
<tr><td colspan=2>Input filename</td><td><BIDS root>/sub-61/ses-01/func/sub-61_ses-01_task-piper_run-01_bold.nii.gz</td></tr>
<tr><td>Versions</td><td>MRIQC</td><td>24.1.0.dev0+gd5b13cb5.d20240826</td></tr>
<tr><td>Versions</td><td>NiPype</td><td>1.8.6</td></tr>
<tr><td>Versions</td><td>TemplateFlow</td><td>24.2.0</td></tr>
<tr><td colspan=2>md5sum</td><td>67b02319a59cc22847f608fae0e7ab92</td></tr>
</table>

      </div>
    </div>
  </div>


  <div class="accordion-item">
    <h2 class="accordion-header" id="about-metadata-1">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#about-metadata-1-collapse" aria-controls="about-metadata-1-collapse">
        Dataset Information
      </button>
    </h2>
    <div id="about-metadata-1-collapse" class="accordion-collapse collapse" aria-labelledby="about-metadata-1-heading" data-bs-parent="#about-metadata-1">
      <div class="accordion-body metadata-table">
      <table id="about-metadata-table-1" class="table table-sm table-striped">
<tr><td colspan=2>ConversionSoftware</td><td>dcm2niix</td></tr>
<tr><td colspan=2>ConversionSoftwareVersion</td><td>v1.0.20170207</td></tr>
<tr><td colspan=2>EchoTime</td><td>0.0302</td></tr>
<tr><td colspan=2>EffectiveEchoSpacing</td><td>0.000640002</td></tr>
<tr><td colspan=2>FlipAngle</td><td>90</td></tr>
<tr><td colspan=2>ImageType</td><td>['ORIGINAL', 'PRIMARY', 'M', 'MB', 'ND', 'MOSAIC']</td></tr>
<tr><td colspan=2>MagneticFieldStrength</td><td>3</td></tr>
<tr><td colspan=2>Manufacturer</td><td>Siemens</td></tr>
<tr><td colspan=2>ManufacturersModelName</td><td>Prisma</td></tr>
<tr><td colspan=2>PhaseEncodingDirection</td><td>j-</td></tr>
<tr><td colspan=2>ProcedureStepDescription</td><td>CAMRIS_CHOP</td></tr>
<tr><td colspan=2>ProtocolName</td><td>BOLD_resting1</td></tr>
<tr><td colspan=2>RepetitionTime</td><td>2</td></tr>
<tr><td colspan=2>SliceTiming</td><td>[0, 0.08, 0.1575, 0.2375, 0.3175, 0.395, 0.475, 0.555, 0.6325, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.9, 0, 0.08, 0.1575, 0.2375, 0.3175, 0.395, 0.475, 0.555, 0.6325, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.9, 0, 0.08, 0.1575, 0.2375, 0.3175, 0.395, 0.475, 0.555, 0.6325, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.9]</td></tr>
<tr><td colspan=2>TaskName</td><td>piper</td></tr>
<tr><td>dcmmeta</td><td>affine</td><td>[[-2.0, 0.0, 0.0, 96.0], [0.0, 2.0, 0.0, -86.16899871826172], [0.0, 0.0, 2.0, -41.46989822387695], [0.0, 0.0, 0.0, 1.0]]</td></tr>
<tr><td>dcmmeta</td><td>reorient_transform</td><td>[[0.0, -1.0, 0.0, 95.0], [1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]</td></tr>
<tr><td>dcmmeta</td><td>shape</td><td>[96, 96, 75, 150]</td></tr>
<tr><td>dcmmeta</td><td>slice_dim</td><td>2</td></tr>
<tr><td>dcmmeta</td><td>version</td><td>0.6</td></tr>
<tr><td colspan=2>time</td><td>{'samples': {'AcquisitionNumber': [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], 'AcquisitionTime': ['135525.495000', '135527.495000', '135529.495000', '135531.495000', '135533.495000', '135535.495000', '135537.495000', '135539.495000', '135541.495000', '135543.495000', '135545.495000', '135547.495000', '135549.495000', '135551.495000', '135553.495000', '135555.495000', '135557.495000', '135559.495000', '135601.495000', '135603.495000', '135605.495000', '135607.495000', '135609.495000', '135611.495000', '135613.495000', '135615.495000', '135617.495000', '135619.495000', '135621.495000', '135623.495000', '135625.495000', '135627.495000', '135629.495000', '135631.495000', '135633.495000', '135635.495000', '135637.495000', '135639.495000', '135641.495000', '135643.495000', '135645.495000', '135647.495000', '135649.495000', '135651.495000', '135653.495000', '135655.495000', '135657.495000', '135659.495000', '135701.495000', '135703.495000', '135705.495000', '135707.495000', '135709.495000', '135711.495000', '135713.495000', '135715.495000', '135717.495000', '135719.495000', '135721.495000', '135723.495000', '135725.495000', '135727.495000', '135729.495000', '135731.495000', '135733.495000', '135735.495000', '135737.495000', '135739.495000', '135741.495000', '135743.495000', '135745.495000', '135747.495000', '135749.495000', '135751.495000', '135753.495000', '135755.495000', '135757.495000', '135759.495000', '135801.495000', '135803.495000', '135805.495000', '135807.495000', '135809.495000', '135811.495000', '135813.495000', '135815.495000', '135817.495000', '135819.495000', '135821.495000', '135823.495000', '135825.495000', '135827.495000', '135829.495000', '135831.495000', '135833.495000', '135835.495000', '135837.495000', '135839.495000', '135841.495000', '135843.495000', '135845.495000', '135847.495000', '135849.495000', '135851.495000', '135853.495000', '135855.495000', '135857.495000', '135859.495000', '135901.495000', '135903.495000', '135905.495000', '135907.495000', '135909.495000', '135911.495000', '135913.495000', '135915.495000', '135917.495000', '135919.495000', '135921.495000', '135923.495000', '135925.495000', '135927.495000', '135929.495000', '135931.495000', '135933.495000', '135935.495000', '135937.495000', '135939.495000', '135941.495000', '135943.495000', '135945.495000', '135947.495000', '135949.495000', '135951.495000', '135953.495000', '135955.495000', '135957.495000', '135959.495000', '140001.495000', '140003.495000', '140005.495000', '140007.495000', '140009.495000', '140011.495000', '140013.495000', '140015.495000', '140017.495000', '140019.495000', '140021.495000', '140023.495000'], 'ContentTime': ['135527.861000', '135529.856000', '135531.856000', '135533.856000', '135535.856000', '135537.856000', '135539.856000', '135541.855000', '135543.856000', '135545.856000', '135547.856000', '135549.856000', '135551.856000', '135553.856000', '135555.856000', '135557.855000', '135559.855000', '135601.856000', '135603.856000', '135605.856000', '135607.856000', '135610.356000', '135611.856000', '135613.856000', '135615.855000', '135617.855000', '135619.856000', '135621.856000', '135623.856000', '135625.856000', '135627.856000', '135629.856000', '135631.856000', '135633.855000', '135635.856000', '135637.856000', '135639.856000', '135641.856000', '135643.856000', '135645.856000', '135647.856000', '135649.856000', '135651.855000', '135653.856000', '135655.856000', '135657.856000', '135659.856000', '135701.856000', '135703.856000', '135705.856000', '135707.855000', '135709.855000', '135711.856000', '135713.856000', '135715.856000', '135717.856000', '135719.856000', '135721.856000', '135723.856000', '135725.855000', '135727.855000', '135729.856000', '135731.856000', '135733.856000', '135735.856000', '135737.856000', '135739.856000', '135741.856000', '135743.855000', '135745.856000', '135747.856000', '135749.856000', '135751.856000', '135753.856000', '135755.856000', '135757.856000', '135759.856000', '135801.855000', '135803.856000', '135805.856000', '135807.856000', '135809.856000', '135811.856000', '135813.856000', '135815.856000', '135817.855000', '135819.855000', '135821.856000', '135823.856000', '135825.856000', '135827.856000', '135829.856000', '135831.856000', '135833.856000', '135835.855000', '135837.855000', '135839.856000', '135841.856000', '135843.856000', '135845.856000', '135847.856000', '135849.856000', '135851.856000', '135853.855000', '135855.856000', '135857.856000', '135859.856000', '135901.856000', '135903.856000', '135905.856000', '135907.856000', '135909.856000', '135911.855000', '135913.856000', '135915.856000', '135917.856000', '135919.856000', '135921.872000', '135923.856000', '135925.856000', '135927.855000', '135929.855000', '135931.856000', '135933.856000', '135935.856000', '135937.856000', '135939.856000', '135941.856000', '135943.856000', '135945.855000', '135947.855000', '135949.856000', '135951.856000', '135953.856000', '135955.856000', '135957.856000', '135959.856000', '140001.856000', '140003.855000', '140005.856000', '140007.856000', '140009.856000', '140011.856000', '140013.856000', '140015.856000', '140017.856000', '140019.856000', '140021.855000', '140023.856000', '140025.826000'], 'InstanceCreationTime': ['135527.861000', '135529.856000', '135531.856000', '135533.856000', '135535.856000', '135537.856000', '135539.856000', '135541.855000', '135543.856000', '135545.856000', '135547.856000', '135549.856000', '135551.856000', '135553.856000', '135555.856000', '135557.855000', '135559.855000', '135601.856000', '135603.856000', '135605.856000', '135607.856000', '135610.356000', '135611.856000', '135613.856000', '135615.855000', '135617.855000', '135619.856000', '135621.856000', '135623.856000', '135625.856000', '135627.856000', '135629.856000', '135631.856000', '135633.855000', '135635.856000', '135637.856000', '135639.856000', '135641.856000', '135643.856000', '135645.856000', '135647.856000', '135649.856000', '135651.855000', '135653.856000', '135655.856000', '135657.856000', '135659.856000', '135701.856000', '135703.856000', '135705.856000', '135707.855000', '135709.855000', '135711.856000', '135713.856000', '135715.856000', '135717.856000', '135719.856000', '135721.856000', '135723.856000', '135725.855000', '135727.855000', '135729.856000', '135731.856000', '135733.856000', '135735.856000', '135737.856000', '135739.856000', '135741.856000', '135743.855000', '135745.856000', '135747.856000', '135749.856000', '135751.856000', '135753.856000', '135755.856000', '135757.856000', '135759.856000', '135801.855000', '135803.856000', '135805.856000', '135807.856000', '135809.856000', '135811.856000', '135813.856000', '135815.856000', '135817.855000', '135819.855000', '135821.856000', '135823.856000', '135825.856000', '135827.856000', '135829.856000', '135831.856000', '135833.856000', '135835.855000', '135837.855000', '135839.856000', '135841.856000', '135843.856000', '135845.856000', '135847.856000', '135849.856000', '135851.856000', '135853.855000', '135855.856000', '135857.856000', '135859.856000', '135901.856000', '135903.856000', '135905.856000', '135907.856000', '135909.856000', '135911.855000', '135913.856000', '135915.856000', '135917.856000', '135919.856000', '135921.872000', '135923.856000', '135925.856000', '135927.855000', '135929.855000', '135931.856000', '135933.856000', '135935.856000', '135937.856000', '135939.856000', '135941.856000', '135943.856000', '135945.855000', '135947.855000', '135949.856000', '135951.856000', '135953.856000', '135955.856000', '135957.856000', '135959.856000', '140001.856000', '140003.855000', '140005.856000', '140007.856000', '140009.856000', '140011.856000', '140013.856000', '140015.856000', '140017.856000', '140019.856000', '140021.855000', '140023.856000', '140025.826000'], 'InstanceNumber': [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], 'LargestImagePixelValue': [21617, 20942, 21275, 21296, 22136, 20450, 21364, 20917, 20281, 20195, 20291, 19889, 20416, 19972, 21736, 21798, 20884, 19761, 20791, 20291, 21703, 20747, 21088, 20518, 20999, 21349, 18707, 20998, 20838, 20079, 19823, 19761, 20599, 20378, 21329, 20806, 20842, 21133, 20722, 20856, 20007, 19516, 20052, 19747, 19990, 20735, 19781, 21603, 21456, 20739, 20651, 20693, 21344, 20859, 21225, 20553, 20776, 21197, 20328, 21298, 21053, 21480, 21094, 21302, 21342, 21696, 21806, 21851, 21509, 21512, 21331, 21516, 21221, 21351, 21271, 21600, 21460, 21211, 21235, 21579, 21478, 21303, 20829, 21288, 21310, 21416, 21144, 21313, 21350, 20915, 21186, 20890, 21499, 21385, 21391, 21492, 21232, 21316, 20981, 21393, 21225, 21436, 21172, 21210, 21447, 21523, 21298, 21292, 21460, 21161, 21552, 21117, 21295, 20998, 21188, 21071, 20942, 21352, 21178, 21201, 21445, 21084, 21174, 21198, 20915, 21084, 20771, 21210, 20744, 21224, 20656, 20996, 21102, 21195, 21307, 20981, 21011, 21082, 21353, 20748, 21230, 21246, 21332, 20582, 20957, 21298, 20813, 20909, 20673, 20639], 'TriggerTime': [11652.5, 13652.5, 15652.5, 17652.5, 19652.5, 21652.5, 23652.5, 25652.5, 27652.5, 29652.5, 31652.5, 33652.5, 35652.5, 37652.5, 39652.5, 41652.5, 43652.5, 45652.5, 47652.5, 49652.5, 51652.5, 53652.5, 55652.5, 57652.5, 59652.5, 61652.5, 63652.5, 65652.5, 67652.5, 69652.5, 71652.5, 73652.5, 75652.5, 77652.5, 79652.5, 81652.5, 83652.5, 85652.5, 87652.5, 89652.5, 91652.5, 93652.5, 95652.5, 97652.5, 99652.5, 101653.0, 103653.0, 105653.0, 107653.0, 109653.0, 111653.0, 113653.0, 115653.0, 117653.0, 119653.0, 121653.0, 123653.0, 125653.0, 127653.0, 129653.0, 131653.0, 133653.0, 135653.0, 137653.0, 139653.0, 141653.0, 143653.0, 145653.0, 147653.0, 149653.0, 151653.0, 153653.0, 155653.0, 157653.0, 159653.0, 161653.0, 163653.0, 165653.0, 167653.0, 169653.0, 171653.0, 173653.0, 175653.0, 177653.0, 179653.0, 181653.0, 183653.0, 185653.0, 187653.0, 189653.0, 191653.0, 193653.0, 195653.0, 197653.0, 199653.0, 201653.0, 203653.0, 205653.0, 207653.0, 209653.0, 211653.0, 213653.0, 215653.0, 217653.0, 219653.0, 221653.0, 223653.0, 225653.0, 227653.0, 229653.0, 231653.0, 233653.0, 235653.0, 237653.0, 239653.0, 241653.0, 243653.0, 245653.0, 247653.0, 249653.0, 251653.0, 253653.0, 255653.0, 257653.0, 259653.0, 261653.0, 263653.0, 265653.0, 267653.0, 269653.0, 271653.0, 273653.0, 275653.0, 277653.0, 279653.0, 281653.0, 283653.0, 285653.0, 287653.0, 289653.0, 291653.0, 293653.0, 295653.0, 297653.0, 299653.0, 301653.0, 303653.0, 305653.0, 307653.0, 309653.0], 'WindowCenter': [7831.0, 7772.0, 7782.0, 7789.0, 7744.0, 7577.0, 7682.0, 7741.0, 7710.0, 7695.0, 7671.0, 7718.0, 7672.0, 7308.0, 7809.0, 7784.0, 7635.0, 7530.0, 7728.0, 7587.0, 7702.0, 7673.0, 7695.0, 7688.0, 7734.0, 7738.0, 7057.0, 7902.0, 7785.0, 7723.0, 7688.0, 7717.0, 7758.0, 7777.0, 7796.0, 7692.0, 7739.0, 7745.0, 7683.0, 7621.0, 7524.0, 7554.0, 7696.0, 7642.0, 7619.0, 7290.0, 7511.0, 7845.0, 7820.0, 7782.0, 7773.0, 7795.0, 7796.0, 7787.0, 7819.0, 7760.0, 7771.0, 7801.0, 7806.0, 7866.0, 7856.0, 7878.0, 7847.0, 7836.0, 7859.0, 7874.0, 7879.0, 7856.0, 7856.0, 7864.0, 7867.0, 7879.0, 7860.0, 7901.0, 7881.0, 7898.0, 7877.0, 7860.0, 7871.0, 7857.0, 7866.0, 7856.0, 7838.0, 7880.0, 7870.0, 7889.0, 7839.0, 7868.0, 7856.0, 7851.0, 7859.0, 7831.0, 7868.0, 7857.0, 7887.0, 7888.0, 7871.0, 7877.0, 7839.0, 7877.0, 7859.0, 7878.0, 7859.0, 7869.0, 7888.0, 7888.0, 7889.0, 7899.0, 7891.0, 7842.0, 7850.0, 7830.0, 7848.0, 7838.0, 7829.0, 7848.0, 7830.0, 7858.0, 7859.0, 7860.0, 7871.0, 7860.0, 7880.0, 7851.0, 7862.0, 7859.0, 7841.0, 7872.0, 7852.0, 7881.0, 7843.0, 7872.0, 7851.0, 7873.0, 7850.0, 7850.0, 7863.0, 7863.0, 7881.0, 7843.0, 7894.0, 7865.0, 7883.0, 7823.0, 7864.0, 7858.0, 7852.0, 7831.0, 7800.0, 7831.0], 'WindowWidth': [16573.0, 16462.0, 16481.0, 16492.0, 16395.0, 16053.0, 16276.0, 16391.0, 16328.0, 16315.0, 16264.0, 16365.0, 16258.0, 15549.0, 16533.0, 16473.0, 16178.0, 15981.0, 16384.0, 16091.0, 16312.0, 16259.0, 16303.0, 16296.0, 16379.0, 16384.0, 15021.0, 16742.0, 16493.0, 16367.0, 16294.0, 16359.0, 16439.0, 16476.0, 16510.0, 16300.0, 16403.0, 16402.0, 16281.0, 16152.0, 15972.0, 16033.0, 16311.0, 16201.0, 16155.0, 15508.0, 15947.0, 16610.0, 16555.0, 16482.0, 16466.0, 16514.0, 16514.0, 16496.0, 16559.0, 16445.0, 16458.0, 16522.0, 16539.0, 16655.0, 16633.0, 16679.0, 16619.0, 16597.0, 16644.0, 16670.0, 16683.0, 16634.0, 16635.0, 16649.0, 16658.0, 16684.0, 16649.0, 16731.0, 16691.0, 16721.0, 16677.0, 16648.0, 16669.0, 16636.0, 16652.0, 16632.0, 16601.0, 16686.0, 16669.0, 16705.0, 16608.0, 16663.0, 16635.0, 16632.0, 16644.0, 16593.0, 16662.0, 16638.0, 16697.0, 16701.0, 16673.0, 16679.0, 16607.0, 16677.0, 16646.0, 16680.0, 16646.0, 16663.0, 16700.0, 16702.0, 16704.0, 16724.0, 16708.0, 16616.0, 16627.0, 16588.0, 16620.0, 16600.0, 16584.0, 16619.0, 16586.0, 16640.0, 16641.0, 16646.0, 16668.0, 16645.0, 16686.0, 16627.0, 16649.0, 16637.0, 16609.0, 16671.0, 16631.0, 16688.0, 16613.0, 16671.0, 16627.0, 16673.0, 16622.0, 16627.0, 16654.0, 16655.0, 16687.0, 16616.0, 16715.0, 16661.0, 16692.0, 16575.0, 16656.0, 16636.0, 16629.0, 16583.0, 16524.0, 16589.0]}, 'slices': {}}</td></tr>
</table>

      </div>
    </div>
  </div>


  <div class="accordion-item">
    <h2 class="accordion-header" id="about-metadata-2">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#about-metadata-2-collapse" aria-controls="about-metadata-2-collapse">
        Extracted Image quality metrics (IQMs)
      </button>
    </h2>
    <div id="about-metadata-2-collapse" class="accordion-collapse collapse" aria-labelledby="about-metadata-2-heading" data-bs-parent="#about-metadata-2">
      <div class="accordion-body metadata-table">
      <table id="about-metadata-table-2" class="table table-sm table-striped">
<tr><td colspan=3>aor</td><td>0.0762264</td></tr>
<tr><td colspan=3>aqi</td><td>0.0554478662</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>83.92904151053693</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.5833110893288584</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>1.5843178243624179</td></tr>
<tr><td colspan=3>efc</td><td>0.5247</td></tr>
<tr><td colspan=3>fber</td><td>806.5202</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.7713734941957044</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>128</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>85.33333333333333</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>4.030268333333333</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>3.680795</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>4.080955</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>4.329055</td></tr>
<tr><td colspan=3>gcor</td><td>0.0564774</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>-0.001773371361196041</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.049110762774944305</td></tr>
<tr><td>size</td><td colspan=2>t</td><td>150</td></tr>
<tr><td>size</td><td colspan=2>x</td><td>96</td></tr>
<tr><td>size</td><td colspan=2>y</td><td>96</td></tr>
<tr><td>size</td><td colspan=2>z</td><td>75</td></tr>
<tr><td colspan=3>snr</td><td>2.3833810715487678</td></tr>
<tr><td>spacing</td><td colspan=2>tr</td><td>2.0</td></tr>
<tr><td>spacing</td><td colspan=2>x</td><td>2.0</td></tr>
<tr><td>spacing</td><td colspan=2>y</td><td>2.0</td></tr>
<tr><td>spacing</td><td colspan=2>z</td><td>2.0</td></tr>
<tr><td>summary</td><td>bg</td><td>k</td><td>54.8612</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>66.381</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>481.4762</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>226.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>519677.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>172.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>1825.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>770.8464</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>0.232</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>2552.9817</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>6800.5614</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>6423.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>171523.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2949.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>11749.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>2694.9032</td></tr>
<tr><td colspan=3>tsnr</td><td>16.765899172401987</td></tr>
</table>

      </div>
    </div>
  </div>

</div>
        </div>
    </div>

<div id="qcrating-menu" class="card position-fixed d-none" style="width: 30%; top: 100px; left: 65%; max-height: 85%; overflow-y: auto;">
<div class="card-header m-0">
    Rating widget
    <button type="button" class="btn-close position-absolute top-0 end-0" aria-label="Close" id="close-qcrating-menu" onclick="toggle_rating()" style="margin: 10px 10px 0 0"></button>
</div>
<div class="card-body">
<div class="accordion">
  <div class="accordion-item">
    <h2 class="accordion-header" id="qcslider-head">
      <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#qcslider-collapse" aria-expanded="true" aria-controls="qcslider-collapse">Overall Quality Rating</button>
    </h2>
    <div id="qcslider-collapse" class="accordion-collapse collapse show" aria-labelledby="qcslider-head">
      <div class="accordion-body">
        <input type="range" min="1.0" max="4.0" step="0.05" value="2.5" id="qcslider" class="slider">
        <ul class="list-group list-group-horizontal slider-labels" style="width: 100%">
            <li class="list-group-item list-group-item-danger small" style="font-size: 0.7em; width: 25%; text-align:center">Exclude</li>
            <li class="list-group-item list-group-item-warning small" style="font-size: 0.7em; width: 25%; text-align:center">Poor</li>
            <li class="list-group-item list-group-item-primary small" style="font-size: 0.7em; width: 25%; text-align:center">Acceptable</li>
            <li class="list-group-item list-group-item-success small" style="font-size: 0.7em; width: 25%; text-align:center">Excellent</li>
        </ul>
      </div>
    </div>
  </div>

  <div class="accordion-item">
    <h2 class="accordion-header" id="qcartifacts-head">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#qcartifacts-collapse" aria-expanded="false" aria-controls="qcartifacts-collapse">
        Record specific artifacts
      </button>
    </h2>
    <div id="qcartifacts-collapse" class="accordion-collapse collapse" aria-labelledby="qcartifacts-head">
      <div class="accordion-body">
        <fieldset id="qcartifacts-group" class="form-group">
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="head-motion" id="qcartifacts-item-0" />
                <label class="form-check-label" for="qcartifacts-item-0">Head motion artifacts</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="eye-spillover" id="qcartifacts-item-1" />
                <label class="form-check-label" for="qcartifacts-item-1">Eye spillover through <abbr title="phase-encoding">PE</abbr> axis</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="noneye-spillover" id="qcartifacts-item-2" />
                <label class="form-check-label" for="qcartifacts-item-2">Non-eye spillover through <abbr title="phase-encoding">PE</abbr> axis</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="coil-failure" id="qcartifacts-item-3" />
                <label class="form-check-label" for="qcartifacts-item-3">Coil failure</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="noise-global" id="qcartifacts-item-4" />
                <label class="form-check-label" for="qcartifacts-item-4">Global noise</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="noise-local" id="qcartifacts-item-5" />
                <label class="form-check-label" for="qcartifacts-item-5">Local noise</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="em-perturbation" id="qcartifacts-item-6" />
                <label class="form-check-label" for="qcartifacts-item-6"><abbr title="electromagnetic">EM</abbr> interference/perturbation</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="wrap-around" id="qcartifacts-item-7" />
                <label class="form-check-label" for="qcartifacts-item-7">Problematic <abbr title="field-of-view">FoV</abbr> prescription / wrap-around</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="ghost-aliasing" id="qcartifacts-item-8" />
                <label class="form-check-label" for="qcartifacts-item-8">Aliasing ghosts</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="ghost-other" id="qcartifacts-item-9" />
                <label class="form-check-label" for="qcartifacts-item-9">Other ghosts (for example, <abbr title="radiofrequency">RF</abbr> spoiling)</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="inu" id="qcartifacts-item-10" />
                <label class="form-check-label" for="qcartifacts-item-10">Intensity non-uniformity (B<sub>1</sub> bias)</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="field-variation" id="qcartifacts-item-11" />
                <label class="form-check-label" for="qcartifacts-item-11">Temporal B<sub>1</sub> field non-uniformity variation</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="processing" id="qcartifacts-item-12" />
                <label class="form-check-label" for="qcartifacts-item-12">Processing such as denoising, defacing or resamplings happened</label>
            </div>
            <div class="form-check form-switch small">
                <input class="form-check-input" type="checkbox" name="uncategorized" id="qcartifacts-item-13" />
                <label class="form-check-label" for="qcartifacts-item-13">Other uncategorized artifact(s)</label>
            </div>
        </fieldset>
      </div> <!-- accordion-body -->
    </div> <!-- accordion-collapse -->
  </div> <!-- accordion-item -->
  <div class="accordion-item">
    <h2 class="accordion-header" id="qcextra-head">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#qcextra-collapse" aria-expanded="false" aria-controls="qcextra-collapse">
        Extra details
      </button>
    </h2>
    <div id="qcextra-collapse" class="accordion-collapse collapse" aria-labelledby="qcextra-head">
      <div class="accordion-body">
        <div class="input-group">
          <span class="input-group-text">Comments</span>
          <textarea class="form-control" aria-label="Comments" id="qcextra-comments"></textarea>
        </div>

        <p style="margin-top: 20px; font-weight: bold">Rater confidence</p>
        <input type="range" min="0.0" max="4.0" step="0.05" value="3.5" id="qcextra-confidence" class="slider" style="margin-left: 22%;width: 56%;">
        <ul class="list-group list-group-horizontal slider-labels" style="width: 100%">
            <li class="list-group-item list-group-item-warning small" style="width: 50%; text-align:center">Doubtful</li>
            <li class="list-group-item list-group-item-success bg-success text-white small" style="width: 50%; text-align:center">Confident</li>
        </ul>
       </div> <!-- accordion-body -->
    </div> <!-- accordion-collapse -->
  </div> <!-- accordion-item -->
</div>
<div style="margin-top: 10px">
<a class="btn btn-primary disabled" id="btn-download" href="">Download</a>
<button class="btn btn-primary" id="btn-post" value="8sSYVI0XjFqacEMZ8wF4" disabled>Share publicly</button>
</div>
<script type="text/javascript">
var MINIMUM_RATING_TIME = 10
$('#qcslider').on('input', function() {

    if ( (Date.now() - timestamp) / 1000 > MINIMUM_RATING_TIME) {
        $('#btn-download').removeClass('disabled');
        $('#btn-download').removeAttr('aria-disabled');
        $('#btn-post').removeAttr('disabled');
    };

    $('#qcslider-collapse .list-group-item').removeClass(function(index, classname) {
        return (classname.match(/(^|\s)bg-\S+/g) || []).join(' ');
    });
    $('#qcslider-collapse .list-group-item').removeClass(function(index, classname) {
        return (classname.match(/(^|\s)text-\S+/g) || []).join(' ');
    });

    if ( $(this).val() < 1.5 ) {
        $('#qcslider-collapse .list-group-item-danger').addClass('bg-danger text-white');
    } else if ( $(this).val() > 3.5 ) {
        $('#qcslider-collapse .list-group-item-success').addClass('bg-success text-white');
    } else if ( $(this).val() < 2.5 ) {
        $('#qcslider-collapse .list-group-item-warning').addClass('bg-warning text-dark');
    } else {
        $('#qcslider-collapse .list-group-item-primary').addClass('bg-primary text-white');
    };

    var payload = read_form();
});

$('#qcextra-confidence').on('input', function() {
    if ( (Date.now() - timestamp) / 1000 > MINIMUM_RATING_TIME) {
        $('#btn-download').removeClass('disabled');
        $('#btn-download').removeAttr('aria-disabled');
        $('#btn-post').removeAttr('disabled');
    };

    $('#qcextra-collapse .list-group-item').removeClass(function(index, classname) {
        return (classname.match(/(^|\s)bg-\S+/g) || []).join(' ');
    });
    $('#qcextra-collapse .list-group-item').removeClass(function(index, classname) {
        return (classname.match(/(^|\s)text-\S+/g) || []).join(' ');
    });

    if ( $(this).val() < 2.0 ) {
        $('#qcextra-collapse .list-group-item-warning').addClass('bg-warning text-dark');
    } else {
        $('#qcextra-collapse .list-group-item-success').addClass('bg-success text-white');
    };

    var payload = read_form();
});


$('#qcextra-comments').bind('input propertychange', function() {
    if ( (Date.now() - timestamp) / 1000 > MINIMUM_RATING_TIME) {
        $('#btn-download').removeClass('disabled');
        $('#btn-download').removeAttr('aria-disabled');
        $('#btn-post').removeAttr('disabled');
    };
});

$( '#btn-post' ).click( function() {
    var payload = read_form();
    var md5sum = "unspecified";
    var params = {
        'rating': payload['rating'],
        'md5sum': md5sum,
        'name': "",
        'comment': JSON.stringify(payload['artifacts'])
    };

    // disable development releases
    var authorization = $(this).val();
    var ratingReq = new XMLHttpRequest();
    ratingReq.open("POST", "https://mriqc.nimh.nih.gov:443/api/v1/rating");
    ratingReq.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
    ratingReq.setRequestHeader("Authorization", authorization);
    ratingReq.onload = function () {
        status = ratingReq.status;
        $('#btn-post').removeClass('btn-primary');
        $('#btn-post').attr('disabled', true);
        $('#btn-post').attr('aria-disabled', true);
        $('#btn-post').prop('disabled');
        $('#btn-post').addClass('disabled');
        $('#btn-post').removeClass('active');
        if (status === "201") {
            $('#btn-post').addClass('btn-success');
            $('#btn-post').html('Posted!');
        } else {
            $('#btn-post').addClass('btn-danger');
            $('#btn-post').html('Failed');
        };
    };
    ratingReq.send(JSON.stringify(params));
});

$( 'body' ).on( 'click', '#qcartifacts-group input', function(e) {
    if ( (Date.now() - timestamp) / 1000 > MINIMUM_RATING_TIME) {
        $('#btn-download').removeClass('disabled');
        $('#btn-download').removeAttr('aria-disabled');
        $('#btn-post').removeAttr('disabled');
    };
    
    var payload = read_form();
});

$( 'body' ).on( 'click', '#qcrating-toggler', function(e) {
    toggle_rating();
});
</script>
</div>

<script type="text/javascript">
function toggle(id) {
    var element = document.getElementById(id);
    if(element.style.display == 'block')
        element.style.display = 'none';
    else
        element.style.display = 'block';
}
</script>
</body>
</html><script>{let postHeight = () => {window.parent.postMessage({frameHeight: document.documentElement.offsetHeight || document.documentElement.scrollHeight}, '*')}; window.addEventListener('load', postHeight); window.addEventListener('message', (event) => {if (event.source === window.parent && event.data.requestOffsetHeight) postHeight()});}</script>