<?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-37_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-37_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-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-stdev_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-stdev_bold.svg" target="_blank">sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-stdev_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-background_run-01_session-01_subject-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-background_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-background_bold.svg" target="_blank">sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-background_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-zoomed_run-01_session-01_subject-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-zoomed_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-zoomed_bold.svg" target="_blank">sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-zoomed_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-carpet_run-01_session-01_subject-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-carpet_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-carpet_bold.svg" target="_blank">sub-37/figures/sub-37_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-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-mean_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-mean_bold.svg" target="_blank">sub-37/figures/sub-37_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-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-brainmask_bold.svg" style="width: 100%" />
</div>
<small>Get figure file: <a href="./sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-brainmask_bold.svg" target="_blank">sub-37/figures/sub-37_ses-01_task-piper_run-01_desc-brainmask_bold.svg</a></small>

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-37/figures/sub-37_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-37/figures/sub-37_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-37/figures/sub-37_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-37/ses-01/func/sub-37_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>63825c909d903af9bd23547990bdfff4</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.0775, 0.1575, 0.2375, 0.315, 0.395, 0.475, 0.5525, 0.6325, 0.7125, 0.79, 0.87, 0.95, 1.0275, 1.1075, 1.1875, 1.265, 1.345, 1.425, 1.5025, 1.5825, 1.6625, 1.74, 1.82, 1.9, 0, 0.0775, 0.1575, 0.2375, 0.315, 0.395, 0.475, 0.5525, 0.6325, 0.7125, 0.79, 0.87, 0.95, 1.0275, 1.1075, 1.1875, 1.265, 1.345, 1.425, 1.5025, 1.5825, 1.6625, 1.74, 1.82, 1.9, 0, 0.0775, 0.1575, 0.2375, 0.315, 0.395, 0.475, 0.5525, 0.6325, 0.7125, 0.79, 0.87, 0.95, 1.0275, 1.1075, 1.1875, 1.265, 1.345, 1.425, 1.5025, 1.5825, 1.6625, 1.74, 1.82, 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, -67.29900360107422], [0.0, 0.0, 2.0, -71.13909912109375], [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': ['143938.670000', '143940.670000', '143942.670000', '143944.670000', '143946.670000', '143948.670000', '143950.670000', '143952.670000', '143954.670000', '143956.670000', '143958.670000', '144000.670000', '144002.670000', '144004.670000', '144006.670000', '144008.670000', '144010.670000', '144012.670000', '144014.670000', '144016.670000', '144018.670000', '144020.670000', '144022.670000', '144024.670000', '144026.670000', '144028.670000', '144030.670000', '144032.670000', '144034.670000', '144036.670000', '144038.670000', '144040.670000', '144042.670000', '144044.670000', '144046.670000', '144048.670000', '144050.670000', '144052.670000', '144054.670000', '144056.670000', '144058.670000', '144100.670000', '144102.670000', '144104.670000', '144106.670000', '144108.670000', '144110.670000', '144112.670000', '144114.670000', '144116.670000', '144118.670000', '144120.670000', '144122.670000', '144124.670000', '144126.670000', '144128.670000', '144130.670000', '144132.670000', '144134.670000', '144136.670000', '144138.670000', '144140.670000', '144142.670000', '144144.670000', '144146.670000', '144148.670000', '144150.670000', '144152.670000', '144154.670000', '144156.670000', '144158.670000', '144200.670000', '144202.670000', '144204.670000', '144206.670000', '144208.670000', '144210.670000', '144212.670000', '144214.670000', '144216.670000', '144218.670000', '144220.670000', '144222.670000', '144224.670000', '144226.670000', '144228.670000', '144230.670000', '144232.670000', '144234.670000', '144236.670000', '144238.670000', '144240.670000', '144242.670000', '144244.670000', '144246.670000', '144248.670000', '144250.670000', '144252.670000', '144254.670000', '144256.670000', '144258.670000', '144300.670000', '144302.670000', '144304.670000', '144306.670000', '144308.670000', '144310.670000', '144312.670000', '144314.670000', '144316.670000', '144318.670000', '144320.670000', '144322.670000', '144324.670000', '144326.670000', '144328.670000', '144330.670000', '144332.670000', '144334.670000', '144336.670000', '144338.670000', '144340.670000', '144342.670000', '144344.670000', '144346.670000', '144348.670000', '144350.670000', '144352.670000', '144354.670000', '144356.670000', '144358.670000', '144400.670000', '144402.670000', '144404.670000', '144406.670000', '144408.670000', '144410.670000', '144412.670000', '144414.670000', '144416.670000', '144418.670000', '144420.670000', '144422.670000', '144424.670000', '144426.670000', '144428.670000', '144430.670000', '144432.670000', '144434.670000', '144436.670000'], 'ContentTime': ['143941.674000', '143943.669000', '143945.669000', '143947.668000', '143949.668000', '143951.668000', '143953.668000', '143955.669000', '143957.669000', '143959.669000', '144001.669000', '144003.669000', '144005.668000', '144007.668000', '144009.668000', '144011.668000', '144013.669000', '144015.669000', '144017.669000', '144019.669000', '144021.668000', '144023.668000', '144025.668000', '144027.668000', '144029.668000', '144031.669000', '144033.669000', '144035.669000', '144037.669000', '144039.668000', '144041.668000', '144043.668000', '144045.668000', '144047.669000', '144049.669000', '144051.669000', '144053.669000', '144055.669000', '144057.668000', '144059.668000', '144101.668000', '144103.668000', '144105.669000', '144107.669000', '144109.669000', '144111.669000', '144113.669000', '144115.668000', '144117.668000', '144119.668000', '144121.668000', '144123.669000', '144125.669000', '144127.669000', '144129.669000', '144131.668000', '144133.668000', '144135.668000', '144137.668000', '144139.668000', '144141.669000', '144143.669000', '144145.669000', '144147.681000', '144149.668000', '144151.668000', '144153.668000', '144155.668000', '144157.669000', '144159.669000', '144201.669000', '144203.669000', '144205.669000', '144207.668000', '144209.668000', '144211.668000', '144213.668000', '144215.669000', '144217.669000', '144219.669000', '144221.669000', '144223.669000', '144225.668000', '144227.668000', '144229.668000', '144231.668000', '144233.669000', '144235.669000', '144237.669000', '144239.669000', '144241.668000', '144243.668000', '144245.668000', '144247.668000', '144249.668000', '144251.669000', '144253.669000', '144255.669000', '144257.669000', '144259.668000', '144301.668000', '144303.668000', '144305.668000', '144307.669000', '144309.669000', '144311.669000', '144313.669000', '144315.669000', '144317.668000', '144319.668000', '144321.668000', '144323.668000', '144325.669000', '144327.669000', '144329.669000', '144331.669000', '144333.669000', '144335.668000', '144337.668000', '144339.668000', '144341.668000', '144343.669000', '144345.669000', '144347.669000', '144349.669000', '144351.668000', '144353.668000', '144355.668000', '144357.668000', '144359.668000', '144401.669000', '144403.669000', '144405.669000', '144407.669000', '144409.668000', '144411.668000', '144413.668000', '144415.668000', '144417.669000', '144419.669000', '144421.669000', '144423.669000', '144425.669000', '144427.668000', '144429.668000', '144431.668000', '144433.668000', '144435.669000', '144437.669000', '144439.309000'], 'InstanceCreationTime': ['143941.674000', '143943.669000', '143945.669000', '143947.668000', '143949.668000', '143951.668000', '143953.668000', '143955.669000', '143957.669000', '143959.669000', '144001.669000', '144003.669000', '144005.668000', '144007.668000', '144009.668000', '144011.668000', '144013.669000', '144015.669000', '144017.669000', '144019.669000', '144021.668000', '144023.668000', '144025.668000', '144027.668000', '144029.668000', '144031.669000', '144033.669000', '144035.669000', '144037.669000', '144039.668000', '144041.668000', '144043.668000', '144045.668000', '144047.669000', '144049.669000', '144051.669000', '144053.669000', '144055.669000', '144057.668000', '144059.668000', '144101.668000', '144103.668000', '144105.669000', '144107.669000', '144109.669000', '144111.669000', '144113.669000', '144115.668000', '144117.668000', '144119.668000', '144121.668000', '144123.669000', '144125.669000', '144127.669000', '144129.669000', '144131.668000', '144133.668000', '144135.668000', '144137.668000', '144139.668000', '144141.669000', '144143.669000', '144145.669000', '144147.681000', '144149.668000', '144151.668000', '144153.668000', '144155.668000', '144157.669000', '144159.669000', '144201.669000', '144203.669000', '144205.669000', '144207.668000', '144209.668000', '144211.668000', '144213.668000', '144215.669000', '144217.669000', '144219.669000', '144221.669000', '144223.669000', '144225.668000', '144227.668000', '144229.668000', '144231.668000', '144233.669000', '144235.669000', '144237.669000', '144239.669000', '144241.668000', '144243.668000', '144245.668000', '144247.668000', '144249.668000', '144251.669000', '144253.669000', '144255.669000', '144257.669000', '144259.668000', '144301.668000', '144303.668000', '144305.668000', '144307.669000', '144309.669000', '144311.669000', '144313.669000', '144315.669000', '144317.668000', '144319.668000', '144321.668000', '144323.668000', '144325.669000', '144327.669000', '144329.669000', '144331.669000', '144333.669000', '144335.668000', '144337.668000', '144339.668000', '144341.668000', '144343.669000', '144345.669000', '144347.669000', '144349.669000', '144351.668000', '144353.668000', '144355.668000', '144357.668000', '144359.668000', '144401.669000', '144403.669000', '144405.669000', '144407.669000', '144409.668000', '144411.668000', '144413.668000', '144415.668000', '144417.669000', '144419.669000', '144421.669000', '144423.669000', '144425.669000', '144427.668000', '144429.668000', '144431.668000', '144433.668000', '144435.669000', '144437.669000', '144439.309000'], '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': [23607, 23182, 22850, 22694, 23254, 22625, 22402, 22611, 23168, 22992, 22783, 22895, 22997, 22684, 22969, 22795, 23039, 23089, 22824, 22834, 22944, 22986, 22924, 23295, 23059, 22852, 23068, 23093, 23209, 22800, 22731, 22537, 23011, 22970, 22738, 22738, 22972, 22857, 22721, 23225, 23006, 22944, 22618, 22797, 23027, 22641, 22543, 22723, 22607, 22692, 22793, 22878, 22599, 22697, 22867, 22738, 22807, 22911, 22167, 21833, 22393, 21962, 21636, 21683, 22221, 21852, 21330, 21818, 21797, 21703, 21706, 21704, 21905, 21376, 21522, 21933, 21322, 21650, 21703, 21527, 22447, 22020, 21845, 21685, 21676, 21421, 21440, 21529, 22111, 21834, 21291, 21490, 21695, 21158, 21363, 21922, 21491, 21354, 21689, 21786, 21510, 21572, 21796, 21323, 21669, 21453, 21311, 21629, 21506, 21414, 21306, 21330, 21651, 21504, 21208, 21671, 21478, 21637, 21620, 21789, 21546, 21439, 21500, 21692, 21711, 21770, 21751, 22165, 22063, 21840, 21689, 21497, 21283, 21248, 21320, 21582, 21698, 22026, 21719, 22265, 22251, 22154, 22082, 22369, 21802, 21704, 22147, 22006, 21699, 22268], 'TriggerTime': [11675.0, 13675.0, 15675.0, 17675.0, 19675.0, 21675.0, 23675.0, 25675.0, 27675.0, 29675.0, 31675.0, 33675.0, 35675.0, 37675.0, 39675.0, 41675.0, 43675.0, 45675.0, 47675.0, 49675.0, 51675.0, 53675.0, 55675.0, 57675.0, 59675.0, 61675.0, 63675.0, 65675.0, 67675.0, 69675.0, 71675.0, 73675.0, 75675.0, 77675.0, 79675.0, 81675.0, 83675.0, 85675.0, 87675.0, 89675.0, 91675.0, 93675.0, 95675.0, 97675.0, 99675.0, 101675.0, 103675.0, 105675.0, 107675.0, 109675.0, 111675.0, 113675.0, 115675.0, 117675.0, 119675.0, 121675.0, 123675.0, 125675.0, 127675.0, 129675.0, 131675.0, 133675.0, 135675.0, 137675.0, 139675.0, 141675.0, 143675.0, 145675.0, 147675.0, 149675.0, 151675.0, 153675.0, 155675.0, 157675.0, 159675.0, 161675.0, 163675.0, 165675.0, 167675.0, 169675.0, 171675.0, 173675.0, 175675.0, 177675.0, 179675.0, 181675.0, 183675.0, 185675.0, 187675.0, 189675.0, 191675.0, 193675.0, 195675.0, 197675.0, 199675.0, 201675.0, 203675.0, 205675.0, 207675.0, 209675.0, 211675.0, 213675.0, 215675.0, 217675.0, 219675.0, 221675.0, 223675.0, 225675.0, 227675.0, 229675.0, 231675.0, 233675.0, 235675.0, 237675.0, 239675.0, 241675.0, 243675.0, 245675.0, 247675.0, 249675.0, 251675.0, 253675.0, 255675.0, 257675.0, 259675.0, 261675.0, 263675.0, 265675.0, 267675.0, 269675.0, 271675.0, 273675.0, 275675.0, 277675.0, 279675.0, 281675.0, 283675.0, 285675.0, 287675.0, 289675.0, 291675.0, 293675.0, 295675.0, 297675.0, 299675.0, 301675.0, 303675.0, 305675.0, 307675.0, 309675.0], 'WindowCenter': [7602.0, 7576.0, 7575.0, 7586.0, 7592.0, 7587.0, 7578.0, 7565.0, 7551.0, 7547.0, 7549.0, 7563.0, 7550.0, 7528.0, 7517.0, 7516.0, 7523.0, 7526.0, 7515.0, 7525.0, 7546.0, 7535.0, 7533.0, 7530.0, 7523.0, 7513.0, 7514.0, 7526.0, 7524.0, 7524.0, 7539.0, 7518.0, 7531.0, 7533.0, 7527.0, 7524.0, 7522.0, 7526.0, 7516.0, 7519.0, 7511.0, 7513.0, 7503.0, 7513.0, 7544.0, 7539.0, 7529.0, 7527.0, 7547.0, 7537.0, 7534.0, 7526.0, 7535.0, 7536.0, 7542.0, 7531.0, 7518.0, 7601.0, 7533.0, 7487.0, 7491.0, 7483.0, 7489.0, 7487.0, 7496.0, 7476.0, 7477.0, 7494.0, 7488.0, 7489.0, 7495.0, 7495.0, 7497.0, 7488.0, 7497.0, 7506.0, 7497.0, 7504.0, 7507.0, 7510.0, 7529.0, 7521.0, 7498.0, 7496.0, 7487.0, 7500.0, 7509.0, 7511.0, 7528.0, 7520.0, 7501.0, 7498.0, 7499.0, 7491.0, 7489.0, 7506.0, 7508.0, 7509.0, 7520.0, 7520.0, 7498.0, 7498.0, 7510.0, 7498.0, 7496.0, 7498.0, 7500.0, 7507.0, 7496.0, 7497.0, 7498.0, 7487.0, 7497.0, 7487.0, 7478.0, 7506.0, 7502.0, 7508.0, 7509.0, 7495.0, 7483.0, 7485.0, 7488.0, 7496.0, 7503.0, 7505.0, 7520.0, 7516.0, 7513.0, 7488.0, 7473.0, 7464.0, 7453.0, 7455.0, 7477.0, 7443.0, 7418.0, 7411.0, 7414.0, 7444.0, 7463.0, 7477.0, 7490.0, 7491.0, 7482.0, 7474.0, 7472.0, 7469.0, 7492.0, 7476.0], 'WindowWidth': [16108.0, 16040.0, 16042.0, 16058.0, 16061.0, 16058.0, 16037.0, 16002.0, 15974.0, 15962.0, 15970.0, 15993.0, 15964.0, 15921.0, 15898.0, 15899.0, 15915.0, 15921.0, 15901.0, 15923.0, 15961.0, 15937.0, 15935.0, 15927.0, 15913.0, 15898.0, 15898.0, 15918.0, 15910.0, 15917.0, 15952.0, 15912.0, 15931.0, 15936.0, 15926.0, 15916.0, 15914.0, 15926.0, 15903.0, 15903.0, 15892.0, 15889.0, 15874.0, 15901.0, 15959.0, 15947.0, 15930.0, 15928.0, 15964.0, 15945.0, 15940.0, 15925.0, 15940.0, 15940.0, 15959.0, 15932.0, 15908.0, 16079.0, 15940.0, 15847.0, 15847.0, 15841.0, 15852.0, 15851.0, 15864.0, 15828.0, 15835.0, 15866.0, 15854.0, 15857.0, 15864.0, 15867.0, 15873.0, 15857.0, 15875.0, 15892.0, 15874.0, 15887.0, 15890.0, 15896.0, 15933.0, 15917.0, 15872.0, 15865.0, 15848.0, 15880.0, 15892.0, 15902.0, 15931.0, 15915.0, 15882.0, 15877.0, 15876.0, 15863.0, 15860.0, 15889.0, 15897.0, 15899.0, 15919.0, 15917.0, 15874.0, 15876.0, 15901.0, 15875.0, 15874.0, 15878.0, 15885.0, 15896.0, 15878.0, 15878.0, 15870.0, 15854.0, 15872.0, 15853.0, 15842.0, 15891.0, 15885.0, 15897.0, 15897.0, 15865.0, 15843.0, 15849.0, 15854.0, 15870.0, 15889.0, 15890.0, 15916.0, 15911.0, 15903.0, 15856.0, 15818.0, 15803.0, 15775.0, 15780.0, 15823.0, 15760.0, 15699.0, 15683.0, 15696.0, 15751.0, 15788.0, 15824.0, 15852.0, 15848.0, 15834.0, 15820.0, 15813.0, 15807.0, 15853.0, 15819.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.0051479865771812084</td></tr>
<tr><td colspan=3>aqi</td><td>0.012420552483221476</td></tr>
<tr><td colspan=3>dummy_trs</td><td>1</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>38.56599886337841</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.1578602505405406</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>1.0211234097972977</td></tr>
<tr><td colspan=3>efc</td><td>0.5746</td></tr>
<tr><td colspan=3>fber</td><td>465.3109</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.17435333673940445</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>27</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>18.120805369127517</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>4.002445000000001</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>3.80155</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>4.170955</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>4.03483</td></tr>
<tr><td colspan=3>gcor</td><td>0.00880149</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>0.03774310275912285</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.06569525599479675</td></tr>
<tr><td>size</td><td colspan=2>t</td><td>149</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.295131917854199</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>42.6736</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>112.2101</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>637.5864</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>264.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>490405.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>171.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>2232.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>1188.0349</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>0.4654</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>2309.9739</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>6070.2473</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>5702.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>200795.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2489.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>10576.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>2484.3826</td></tr>
<tr><td colspan=3>tsnr</td><td>39.6856714761816</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>