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

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

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

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

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-32_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-32/figures/sub-32_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-32/figures/sub-32_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-32/figures/sub-32_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-32/figures/sub-32_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-32/ses-01/func/sub-32_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>72de53f48b1db7c9d08fa5c582f479ed</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.87, 0.95, 1.03, 1.1075, 1.1875, 1.2675, 1.345, 1.425, 1.505, 1.5825, 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.87, 0.95, 1.03, 1.1075, 1.1875, 1.2675, 1.345, 1.425, 1.505, 1.5825, 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.87, 0.95, 1.03, 1.1075, 1.1875, 1.2675, 1.345, 1.425, 1.505, 1.5825, 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.97899627685547], [0.0, 0.0, 2.0, -74.0], [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': ['154910.930000', '154912.930000', '154914.930000', '154916.930000', '154918.930000', '154920.930000', '154922.930000', '154924.930000', '154926.930000', '154928.930000', '154930.930000', '154932.930000', '154934.930000', '154936.930000', '154938.930000', '154940.930000', '154942.930000', '154944.930000', '154946.930000', '154948.930000', '154950.930000', '154952.930000', '154954.930000', '154956.930000', '154958.930000', '155000.930000', '155002.930000', '155004.930000', '155006.930000', '155008.930000', '155010.930000', '155012.930000', '155014.930000', '155016.930000', '155018.930000', '155020.930000', '155022.930000', '155024.930000', '155026.930000', '155028.930000', '155030.930000', '155032.930000', '155034.930000', '155036.930000', '155038.930000', '155040.930000', '155042.930000', '155044.930000', '155046.930000', '155048.930000', '155050.930000', '155052.930000', '155054.930000', '155056.930000', '155058.930000', '155100.930000', '155102.930000', '155104.930000', '155106.930000', '155108.930000', '155110.930000', '155112.930000', '155114.930000', '155116.930000', '155118.930000', '155120.930000', '155122.930000', '155124.930000', '155126.930000', '155128.930000', '155130.930000', '155132.930000', '155134.930000', '155136.930000', '155138.930000', '155140.930000', '155142.930000', '155144.930000', '155146.930000', '155148.930000', '155150.930000', '155152.930000', '155154.930000', '155156.930000', '155158.930000', '155200.930000', '155202.930000', '155204.930000', '155206.930000', '155208.930000', '155210.930000', '155212.930000', '155214.930000', '155216.930000', '155218.930000', '155220.930000', '155222.930000', '155224.930000', '155226.930000', '155228.930000', '155230.930000', '155232.930000', '155234.930000', '155236.930000', '155238.930000', '155240.930000', '155242.930000', '155244.930000', '155246.930000', '155248.930000', '155250.930000', '155252.930000', '155254.930000', '155256.930000', '155258.930000', '155300.930000', '155302.930000', '155304.930000', '155306.930000', '155308.930000', '155310.930000', '155312.930000', '155314.930000', '155316.930000', '155318.930000', '155320.930000', '155322.930000', '155324.930000', '155326.930000', '155328.930000', '155330.930000', '155332.930000', '155334.930000', '155336.930000', '155338.930000', '155340.930000', '155342.930000', '155344.930000', '155346.930000', '155348.930000', '155350.930000', '155352.930000', '155354.930000', '155356.930000', '155358.930000', '155400.930000', '155402.930000', '155404.930000', '155406.930000', '155408.930000'], 'ContentTime': ['154913.549000', '154915.544000', '154917.544000', '154919.544000', '154921.543000', '154923.543000', '154925.543000', '154927.543000', '154929.543000', '154931.544000', '154933.544000', '154935.544000', '154937.544000', '154939.543000', '154941.543000', '154943.543000', '154945.543000', '154947.543000', '154949.544000', '154951.544000', '154953.544000', '154955.543000', '154957.543000', '154959.543000', '155001.543000', '155003.543000', '155005.543000', '155007.544000', '155009.544000', '155011.544000', '155013.543000', '155015.543000', '155017.543000', '155019.543000', '155021.543000', '155023.544000', '155025.544000', '155027.544000', '155029.544000', '155031.543000', '155033.543000', '155035.543000', '155037.543000', '155039.543000', '155041.544000', '155043.544000', '155045.544000', '155047.544000', '155049.543000', '155051.543000', '155053.543000', '155055.543000', '155057.543000', '155059.544000', '155101.544000', '155103.544000', '155105.543000', '155107.543000', '155109.543000', '155111.543000', '155113.543000', '155115.543000', '155117.544000', '155119.544000', '155121.544000', '155123.543000', '155125.543000', '155127.543000', '155129.543000', '155131.543000', '155133.544000', '155135.544000', '155137.544000', '155139.544000', '155141.543000', '155143.543000', '155145.543000', '155147.543000', '155149.543000', '155151.544000', '155153.544000', '155155.544000', '155157.544000', '155159.543000', '155201.543000', '155203.543000', '155205.543000', '155207.543000', '155209.544000', '155211.544000', '155213.544000', '155215.543000', '155217.543000', '155219.543000', '155221.543000', '155223.543000', '155225.544000', '155227.544000', '155229.544000', '155231.544000', '155233.543000', '155235.543000', '155237.543000', '155239.543000', '155241.543000', '155243.544000', '155245.544000', '155247.544000', '155249.544000', '155251.543000', '155253.543000', '155255.543000', '155257.543000', '155259.543000', '155301.544000', '155303.544000', '155305.544000', '155307.559000', '155309.543000', '155311.543000', '155313.543000', '155315.543000', '155317.543000', '155319.544000', '155321.544000', '155323.544000', '155325.543000', '155327.543000', '155329.543000', '155331.543000', '155333.543000', '155335.544000', '155337.544000', '155339.544000', '155341.544000', '155343.543000', '155345.543000', '155347.543000', '155349.543000', '155351.543000', '155353.544000', '155355.544000', '155357.544000', '155359.544000', '155401.543000', '155403.543000', '155405.543000', '155407.543000', '155409.543000', '155411.343000'], 'InstanceCreationTime': ['154913.549000', '154915.544000', '154917.544000', '154919.544000', '154921.543000', '154923.543000', '154925.543000', '154927.543000', '154929.543000', '154931.544000', '154933.544000', '154935.544000', '154937.544000', '154939.543000', '154941.543000', '154943.543000', '154945.543000', '154947.543000', '154949.544000', '154951.544000', '154953.544000', '154955.543000', '154957.543000', '154959.543000', '155001.543000', '155003.543000', '155005.543000', '155007.544000', '155009.544000', '155011.544000', '155013.543000', '155015.543000', '155017.543000', '155019.543000', '155021.543000', '155023.544000', '155025.544000', '155027.544000', '155029.544000', '155031.543000', '155033.543000', '155035.543000', '155037.543000', '155039.543000', '155041.544000', '155043.544000', '155045.544000', '155047.544000', '155049.543000', '155051.543000', '155053.543000', '155055.543000', '155057.543000', '155059.544000', '155101.544000', '155103.544000', '155105.543000', '155107.543000', '155109.543000', '155111.543000', '155113.543000', '155115.543000', '155117.544000', '155119.544000', '155121.544000', '155123.543000', '155125.543000', '155127.543000', '155129.543000', '155131.543000', '155133.544000', '155135.544000', '155137.544000', '155139.544000', '155141.543000', '155143.543000', '155145.543000', '155147.543000', '155149.543000', '155151.544000', '155153.544000', '155155.544000', '155157.544000', '155159.543000', '155201.543000', '155203.543000', '155205.543000', '155207.543000', '155209.544000', '155211.544000', '155213.544000', '155215.543000', '155217.543000', '155219.543000', '155221.543000', '155223.543000', '155225.544000', '155227.544000', '155229.544000', '155231.544000', '155233.543000', '155235.543000', '155237.543000', '155239.543000', '155241.543000', '155243.544000', '155245.544000', '155247.544000', '155249.544000', '155251.543000', '155253.543000', '155255.543000', '155257.543000', '155259.543000', '155301.544000', '155303.544000', '155305.544000', '155307.559000', '155309.543000', '155311.543000', '155313.543000', '155315.543000', '155317.543000', '155319.544000', '155321.544000', '155323.544000', '155325.543000', '155327.543000', '155329.543000', '155331.543000', '155333.543000', '155335.544000', '155337.544000', '155339.544000', '155341.544000', '155343.543000', '155345.543000', '155347.543000', '155349.543000', '155351.543000', '155353.544000', '155355.544000', '155357.544000', '155359.544000', '155401.543000', '155403.543000', '155405.543000', '155407.543000', '155409.543000', '155411.343000'], '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': [19254, 19734, 20649, 20191, 21394, 21915, 21043, 20840, 21252, 21020, 20971, 21534, 20217, 20651, 20620, 20732, 20019, 20745, 19724, 20915, 20158, 21333, 20632, 21761, 20857, 20328, 20398, 19535, 19296, 20079, 20841, 21046, 19628, 19572, 18689, 19281, 19019, 19365, 20509, 20876, 20738, 20028, 20125, 21152, 20586, 20680, 20740, 19813, 20217, 19332, 19062, 19556, 20272, 21038, 21201, 20402, 19358, 19003, 17902, 19368, 20187, 18571, 17846, 16914, 17316, 18440, 20008, 20826, 20800, 20383, 20114, 20704, 20610, 19598, 19078, 18569, 20078, 19814, 21437, 21638, 19529, 19171, 19235, 19828, 19625, 19656, 19457, 19569, 19737, 19584, 20359, 20364, 20150, 20020, 19740, 20524, 19153, 20912, 19428, 20991, 19868, 19938, 20561, 19414, 20465, 20026, 20428, 21096, 20079, 19649, 19994, 19593, 18313, 18668, 19242, 19676, 19616, 19930, 19119, 20348, 19494, 19174, 19663, 20001, 19224, 20254, 19832, 20408, 19682, 20832, 20148, 20535, 20317, 19498, 20358, 19810, 20133, 19579, 19205, 19756, 19739, 21235, 19776, 19911, 19233, 19902, 19672, 19718, 20806, 20040], 'TriggerTime': [11707.5, 13707.5, 15707.5, 17707.5, 19707.5, 21707.5, 23707.5, 25707.5, 27707.5, 29707.5, 31707.5, 33707.5, 35707.5, 37707.5, 39707.5, 41707.5, 43707.5, 45707.5, 47707.5, 49707.5, 51707.5, 53707.5, 55707.5, 57707.5, 59707.5, 61707.5, 63707.5, 65707.5, 67707.5, 69707.5, 71707.5, 73707.5, 75707.5, 77707.5, 79707.5, 81707.5, 83707.5, 85707.5, 87707.5, 89707.5, 91707.5, 93707.5, 95707.5, 97707.5, 99707.5, 101708.0, 103708.0, 105708.0, 107708.0, 109708.0, 111708.0, 113708.0, 115708.0, 117708.0, 119708.0, 121708.0, 123708.0, 125708.0, 127708.0, 129708.0, 131708.0, 133708.0, 135708.0, 137708.0, 139708.0, 141708.0, 143708.0, 145708.0, 147708.0, 149708.0, 151708.0, 153708.0, 155708.0, 157708.0, 159708.0, 161708.0, 163708.0, 165708.0, 167708.0, 169708.0, 171708.0, 173708.0, 175708.0, 177708.0, 179708.0, 181708.0, 183708.0, 185708.0, 187708.0, 189708.0, 191708.0, 193708.0, 195708.0, 197708.0, 199708.0, 201708.0, 203708.0, 205708.0, 207708.0, 209708.0, 211708.0, 213708.0, 215708.0, 217708.0, 219708.0, 221708.0, 223708.0, 225708.0, 227708.0, 229708.0, 231708.0, 233708.0, 235708.0, 237708.0, 239708.0, 241708.0, 243708.0, 245708.0, 247708.0, 249708.0, 251708.0, 253708.0, 255708.0, 257708.0, 259708.0, 261708.0, 263708.0, 265708.0, 267708.0, 269708.0, 271708.0, 273708.0, 275708.0, 277708.0, 279708.0, 281708.0, 283708.0, 285708.0, 287708.0, 289708.0, 291708.0, 293708.0, 295708.0, 297708.0, 299708.0, 301708.0, 303708.0, 305708.0, 307708.0, 309708.0], 'WindowCenter': [7104.0, 7140.0, 7165.0, 7192.0, 7206.0, 7215.0, 7231.0, 7188.0, 7221.0, 7219.0, 7200.0, 7198.0, 7151.0, 7145.0, 7180.0, 7159.0, 7194.0, 7166.0, 7184.0, 7166.0, 7193.0, 7184.0, 7193.0, 7182.0, 7190.0, 7158.0, 7157.0, 7141.0, 7113.0, 7160.0, 7167.0, 7179.0, 7145.0, 7121.0, 7095.0, 7092.0, 7126.0, 7108.0, 7167.0, 7154.0, 7167.0, 7160.0, 7149.0, 7188.0, 7148.0, 7177.0, 7144.0, 7150.0, 7127.0, 7123.0, 7134.0, 7120.0, 7152.0, 7166.0, 7177.0, 7137.0, 7125.0, 7071.0, 7027.0, 7081.0, 7075.0, 7040.0, 7009.0, 6959.0, 6995.0, 7041.0, 7118.0, 7136.0, 7139.0, 7111.0, 7227.0, 7164.0, 7151.0, 7114.0, 7102.0, 7103.0, 7161.0, 7206.0, 7227.0, 7228.0, 7155.0, 7158.0, 7189.0, 7172.0, 7187.0, 7160.0, 7185.0, 7161.0, 7194.0, 7165.0, 7211.0, 7188.0, 7203.0, 7167.0, 7192.0, 7198.0, 7164.0, 7207.0, 7161.0, 7205.0, 7170.0, 7168.0, 7177.0, 7140.0, 7186.0, 7168.0, 7199.0, 7195.0, 7169.0, 7162.0, 7148.0, 7149.0, 7092.0, 7110.0, 7139.0, 7181.0, 7164.0, 7171.0, 7154.0, 7166.0, 7136.0, 7137.0, 7157.0, 7178.0, 7175.0, 7199.0, 7182.0, 7208.0, 7182.0, 7219.0, 7190.0, 7177.0, 7187.0, 7150.0, 7194.0, 7169.0, 7189.0, 7184.0, 7153.0, 7182.0, 7191.0, 7227.0, 7158.0, 7166.0, 7139.0, 7179.0, 7159.0, 7169.0, 7183.0, 7167.0], 'WindowWidth': [15085.0, 15148.0, 15186.0, 15249.0, 15263.0, 15283.0, 15320.0, 15238.0, 15304.0, 15298.0, 15264.0, 15256.0, 15174.0, 15154.0, 15223.0, 15184.0, 15256.0, 15193.0, 15238.0, 15192.0, 15254.0, 15220.0, 15252.0, 15215.0, 15245.0, 15183.0, 15181.0, 15156.0, 15108.0, 15189.0, 15195.0, 15218.0, 15170.0, 15120.0, 15078.0, 15065.0, 15134.0, 15089.0, 15197.0, 15169.0, 15197.0, 15187.0, 15171.0, 15237.0, 15164.0, 15216.0, 15149.0, 15171.0, 15124.0, 15130.0, 15149.0, 15117.0, 15177.0, 15193.0, 15214.0, 15144.0, 15131.0, 15027.0, 14951.0, 15036.0, 15020.0, 14968.0, 14911.0, 14823.0, 14895.0, 14971.0, 15106.0, 15135.0, 15142.0, 15105.0, 15385.0, 15207.0, 15179.0, 15116.0, 15098.0, 15103.0, 15203.0, 15295.0, 15319.0, 15323.0, 15200.0, 15208.0, 15266.0, 15228.0, 15263.0, 15202.0, 15255.0, 15207.0, 15268.0, 15216.0, 15295.0, 15249.0, 15285.0, 15211.0, 15265.0, 15270.0, 15218.0, 15282.0, 15207.0, 15274.0, 15217.0, 15212.0, 15226.0, 15168.0, 15245.0, 15214.0, 15273.0, 15260.0, 15217.0, 15209.0, 15180.0, 15179.0, 15083.0, 15115.0, 15164.0, 15245.0, 15215.0, 15223.0, 15196.0, 15203.0, 15152.0, 15157.0, 15194.0, 15232.0, 15238.0, 15273.0, 15247.0, 15287.0, 15247.0, 15310.0, 15258.0, 15229.0, 15246.0, 15182.0, 15256.0, 15219.0, 15254.0, 15253.0, 15195.0, 15246.0, 15262.0, 15319.0, 15196.0, 15206.0, 15162.0, 15235.0, 15197.0, 15213.0, 15232.0, 15209.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.011351933333333331</td></tr>
<tr><td colspan=3>aqi</td><td>0.06564001</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>58.61098787463087</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.0359426207382552</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>0.9752856747651008</td></tr>
<tr><td colspan=3>efc</td><td>0.5543</td></tr>
<tr><td colspan=3>fber</td><td>580.1746</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.5529599261625584</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>118</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>78.66666666666667</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>4.692778333333334</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>4.680595</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>4.879425</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>4.518315</td></tr>
<tr><td colspan=3>gcor</td><td>0.0100905</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>-0.0005123594892211258</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.08180586248636246</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.4707565638649345</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>34.9149</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>76.3046</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>578.2641</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>240.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>517156.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>176.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>2175.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>936.3056</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>-0.0488</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>2335.9835</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>6004.8965</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>5786.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>174044.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2443.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>10145.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>2341.7861</td></tr>
<tr><td colspan=3>tsnr</td><td>19.793283031322062</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>