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

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

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

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

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-41_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-41/figures/sub-41_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-41/figures/sub-41_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-41/figures/sub-41_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-41/figures/sub-41_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-41/ses-01/func/sub-41_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>8ffb3236816fbbf1ed1d0fe91a8b9c9e</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.16, 0.2375, 0.3175, 0.3975, 0.475, 0.555, 0.635, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.9, 0, 0.08, 0.16, 0.2375, 0.3175, 0.3975, 0.475, 0.555, 0.635, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.9, 0, 0.08, 0.16, 0.2375, 0.3175, 0.3975, 0.475, 0.555, 0.635, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.9]</td></tr>
<tr><td colspan=2>TaskName</td><td>piper</td></tr>
<tr><td>dcmmeta</td><td>affine</td><td>[[-2.0, 0.0, 0.0, 100.09100341796875], [0.0, 2.0, 0.0, -63.729000091552734], [0.0, 0.0, 2.0, -24.912399291992188], [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': ['134947.632500', '134949.632500', '134951.632500', '134953.632500', '134955.632500', '134957.632500', '134959.632500', '135001.632500', '135003.632500', '135005.632500', '135007.632500', '135009.632500', '135011.632500', '135013.632500', '135015.632500', '135017.632500', '135019.632500', '135021.632500', '135023.632500', '135025.632500', '135027.632500', '135029.632500', '135031.632500', '135033.632500', '135035.632500', '135037.632500', '135039.632500', '135041.632500', '135043.632500', '135045.632500', '135047.632500', '135049.632500', '135051.632500', '135053.632500', '135055.632500', '135057.632500', '135059.632500', '135101.632500', '135103.632500', '135105.632500', '135107.632500', '135109.632500', '135111.632500', '135113.632500', '135115.632500', '135117.632500', '135119.632500', '135121.632500', '135123.632500', '135125.632500', '135127.632500', '135129.632500', '135131.632500', '135133.632500', '135135.632500', '135137.632500', '135139.632500', '135141.632500', '135143.632500', '135145.632500', '135147.632500', '135149.632500', '135151.632500', '135153.632500', '135155.632500', '135157.632500', '135159.632500', '135201.632500', '135203.632500', '135205.632500', '135207.632500', '135209.632500', '135211.632500', '135213.632500', '135215.632500', '135217.632500', '135219.632500', '135221.632500', '135223.632500', '135225.632500', '135227.632500', '135229.632500', '135231.632500', '135233.632500', '135235.632500', '135237.632500', '135239.632500', '135241.632500', '135243.632500', '135245.632500', '135247.632500', '135249.632500', '135251.632500', '135253.632500', '135255.632500', '135257.632500', '135259.632500', '135301.632500', '135303.632500', '135305.632500', '135307.632500', '135309.632500', '135311.632500', '135313.632500', '135315.632500', '135317.632500', '135319.632500', '135321.632500', '135323.632500', '135325.632500', '135327.632500', '135329.632500', '135331.632500', '135333.632500', '135335.632500', '135337.632500', '135339.632500', '135341.632500', '135343.632500', '135345.632500', '135347.632500', '135349.632500', '135351.632500', '135353.632500', '135355.632500', '135357.632500', '135359.632500', '135401.632500', '135403.632500', '135405.632500', '135407.632500', '135409.632500', '135411.632500', '135413.632500', '135415.632500', '135417.632500', '135419.632500', '135421.632500', '135423.632500', '135425.632500', '135427.632500', '135429.632500', '135431.632500', '135433.632500', '135435.632500', '135437.632500', '135439.632500', '135441.632500', '135443.632500', '135445.632500'], 'ContentTime': ['134950.632000', '134952.626000', '134954.626000', '134956.626000', '134958.626000', '135000.627000', '135002.627000', '135004.627000', '135006.627000', '135008.627000', '135010.626000', '135012.626000', '135014.626000', '135016.626000', '135018.627000', '135020.627000', '135022.627000', '135024.627000', '135026.626000', '135028.626000', '135030.626000', '135032.626000', '135034.627000', '135036.627000', '135038.627000', '135040.627000', '135042.627000', '135044.626000', '135046.626000', '135048.626000', '135050.646000', '135052.627000', '135054.627000', '135056.627000', '135058.627000', '135100.627000', '135102.626000', '135104.626000', '135106.626000', '135108.626000', '135110.627000', '135112.627000', '135114.627000', '135116.627000', '135118.627000', '135120.626000', '135122.626000', '135124.626000', '135126.626000', '135128.627000', '135130.627000', '135132.627000', '135134.627000', '135136.626000', '135138.626000', '135140.626000', '135142.626000', '135144.627000', '135146.627000', '135148.627000', '135150.627000', '135152.627000', '135154.626000', '135156.626000', '135158.626000', '135200.626000', '135202.627000', '135204.627000', '135206.627000', '135208.627000', '135210.627000', '135212.626000', '135214.626000', '135216.626000', '135218.626000', '135220.627000', '135222.627000', '135224.627000', '135226.627000', '135228.627000', '135230.626000', '135232.626000', '135234.626000', '135236.626000', '135238.627000', '135240.638000', '135242.627000', '135244.627000', '135246.626000', '135248.626000', '135250.626000', '135252.626000', '135254.627000', '135256.627000', '135258.627000', '135300.627000', '135302.627000', '135304.626000', '135306.626000', '135308.646000', '135310.626000', '135312.627000', '135314.627000', '135316.627000', '135318.627000', '135320.627000', '135322.626000', '135324.626000', '135326.626000', '135328.626000', '135330.627000', '135332.627000', '135334.627000', '135336.627000', '135338.627000', '135340.626000', '135342.626000', '135344.626000', '135346.626000', '135348.627000', '135350.627000', '135352.627000', '135354.627000', '135356.626000', '135358.626000', '135400.626000', '135402.626000', '135404.627000', '135406.627000', '135408.627000', '135410.627000', '135412.627000', '135414.626000', '135416.626000', '135418.626000', '135420.626000', '135422.627000', '135424.627000', '135426.627000', '135428.627000', '135430.627000', '135432.626000', '135434.626000', '135436.626000', '135438.626000', '135440.627000', '135442.627000', '135444.627000', '135446.627000', '135448.455000'], 'InstanceCreationTime': ['134950.632000', '134952.626000', '134954.626000', '134956.626000', '134958.626000', '135000.627000', '135002.627000', '135004.627000', '135006.627000', '135008.627000', '135010.626000', '135012.626000', '135014.626000', '135016.626000', '135018.627000', '135020.627000', '135022.627000', '135024.627000', '135026.626000', '135028.626000', '135030.626000', '135032.626000', '135034.627000', '135036.627000', '135038.627000', '135040.627000', '135042.627000', '135044.626000', '135046.626000', '135048.626000', '135050.646000', '135052.627000', '135054.627000', '135056.627000', '135058.627000', '135100.627000', '135102.626000', '135104.626000', '135106.626000', '135108.626000', '135110.627000', '135112.627000', '135114.627000', '135116.627000', '135118.627000', '135120.626000', '135122.626000', '135124.626000', '135126.626000', '135128.627000', '135130.627000', '135132.627000', '135134.627000', '135136.626000', '135138.626000', '135140.626000', '135142.626000', '135144.627000', '135146.627000', '135148.627000', '135150.627000', '135152.627000', '135154.626000', '135156.626000', '135158.626000', '135200.626000', '135202.627000', '135204.627000', '135206.627000', '135208.627000', '135210.627000', '135212.626000', '135214.626000', '135216.626000', '135218.626000', '135220.627000', '135222.627000', '135224.627000', '135226.627000', '135228.627000', '135230.626000', '135232.626000', '135234.626000', '135236.626000', '135238.627000', '135240.638000', '135242.627000', '135244.627000', '135246.626000', '135248.626000', '135250.626000', '135252.626000', '135254.627000', '135256.627000', '135258.627000', '135300.627000', '135302.627000', '135304.626000', '135306.626000', '135308.646000', '135310.626000', '135312.627000', '135314.627000', '135316.627000', '135318.627000', '135320.627000', '135322.626000', '135324.626000', '135326.626000', '135328.626000', '135330.627000', '135332.627000', '135334.627000', '135336.627000', '135338.627000', '135340.626000', '135342.626000', '135344.626000', '135346.626000', '135348.627000', '135350.627000', '135352.627000', '135354.627000', '135356.626000', '135358.626000', '135400.626000', '135402.626000', '135404.627000', '135406.627000', '135408.627000', '135410.627000', '135412.627000', '135414.626000', '135416.626000', '135418.626000', '135420.626000', '135422.627000', '135424.627000', '135426.627000', '135428.627000', '135430.627000', '135432.626000', '135434.626000', '135436.626000', '135438.626000', '135440.627000', '135442.627000', '135444.627000', '135446.627000', '135448.455000'], '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': [21598, 21493, 21246, 21116, 21206, 21475, 21495, 21570, 21516, 21658, 21763, 22039, 21752, 21728, 21991, 21978, 21973, 22029, 22005, 21950, 21796, 21541, 21686, 21788, 21492, 21665, 21725, 21603, 21691, 21669, 22032, 22170, 22058, 21981, 22223, 22279, 21853, 21715, 21623, 22231, 21853, 21695, 21777, 21858, 21611, 21880, 22139, 22118, 22206, 22398, 21865, 21799, 22063, 21934, 22038, 21769, 22125, 21908, 22182, 22055, 21760, 21705, 21903, 21794, 21583, 21555, 21758, 22075, 21327, 21747, 21764, 21333, 21793, 21735, 21508, 21565, 21567, 22039, 22064, 21828, 21859, 21871, 21649, 21499, 21492, 21692, 21536, 21330, 21586, 21412, 21214, 21561, 21354, 21350, 21343, 21648, 21501, 21387, 21531, 21631, 21449, 21730, 21550, 21335, 21343, 21462, 21425, 21556, 21225, 21678, 21521, 21418, 21275, 21502, 21377, 21409, 21365, 21600, 21513, 21339, 21486, 21735, 21419, 21632, 21744, 21706, 21682, 21760, 21645, 21576, 21842, 22451, 21684, 21480, 21612, 21655, 21641, 21575, 21674, 21457, 21333, 21544, 21479, 21603, 21849, 21818, 21710, 21564, 21714, 21745], 'TriggerTime': [11670.0, 13670.0, 15670.0, 17670.0, 19670.0, 21670.0, 23670.0, 25670.0, 27670.0, 29670.0, 31670.0, 33670.0, 35670.0, 37670.0, 39670.0, 41670.0, 43670.0, 45670.0, 47670.0, 49670.0, 51670.0, 53670.0, 55670.0, 57670.0, 59670.0, 61670.0, 63670.0, 65670.0, 67670.0, 69670.0, 71670.0, 73670.0, 75670.0, 77670.0, 79670.0, 81670.0, 83670.0, 85670.0, 87670.0, 89670.0, 91670.0, 93670.0, 95670.0, 97670.0, 99670.0, 101670.0, 103670.0, 105670.0, 107670.0, 109670.0, 111670.0, 113670.0, 115670.0, 117670.0, 119670.0, 121670.0, 123670.0, 125670.0, 127670.0, 129670.0, 131670.0, 133670.0, 135670.0, 137670.0, 139670.0, 141670.0, 143670.0, 145670.0, 147670.0, 149670.0, 151670.0, 153670.0, 155670.0, 157670.0, 159670.0, 161670.0, 163670.0, 165670.0, 167670.0, 169670.0, 171670.0, 173670.0, 175670.0, 177670.0, 179670.0, 181670.0, 183670.0, 185670.0, 187670.0, 189670.0, 191670.0, 193670.0, 195670.0, 197670.0, 199670.0, 201670.0, 203670.0, 205670.0, 207670.0, 209670.0, 211670.0, 213670.0, 215670.0, 217670.0, 219670.0, 221670.0, 223670.0, 225670.0, 227670.0, 229670.0, 231670.0, 233670.0, 235670.0, 237670.0, 239670.0, 241670.0, 243670.0, 245670.0, 247670.0, 249670.0, 251670.0, 253670.0, 255670.0, 257670.0, 259670.0, 261670.0, 263670.0, 265670.0, 267670.0, 269670.0, 271670.0, 273670.0, 275670.0, 277670.0, 279670.0, 281670.0, 283670.0, 285670.0, 287670.0, 289670.0, 291670.0, 293670.0, 295670.0, 297670.0, 299670.0, 301670.0, 303670.0, 305670.0, 307670.0, 309670.0], 'WindowCenter': [7791.0, 7780.0, 7772.0, 7788.0, 7812.0, 7799.0, 7776.0, 7777.0, 7796.0, 7796.0, 7817.0, 7826.0, 7804.0, 7796.0, 7805.0, 7795.0, 7783.0, 7791.0, 7803.0, 7782.0, 7783.0, 7774.0, 7776.0, 7786.0, 7766.0, 7761.0, 7763.0, 7761.0, 7762.0, 7771.0, 7780.0, 7814.0, 7816.0, 7813.0, 7824.0, 7833.0, 7807.0, 7784.0, 7785.0, 7815.0, 7796.0, 7782.0, 7784.0, 7793.0, 7793.0, 7796.0, 7814.0, 7803.0, 7802.0, 7811.0, 7784.0, 7784.0, 7822.0, 7795.0, 7781.0, 7775.0, 7771.0, 7783.0, 7793.0, 7791.0, 7782.0, 7782.0, 7774.0, 7784.0, 7773.0, 7775.0, 7794.0, 7792.0, 7777.0, 7805.0, 7790.0, 7773.0, 7794.0, 7815.0, 7798.0, 7797.0, 7817.0, 7814.0, 7803.0, 7784.0, 7774.0, 7793.0, 7773.0, 7765.0, 7776.0, 7793.0, 7784.0, 7765.0, 7764.0, 7761.0, 7754.0, 7763.0, 7762.0, 7774.0, 7775.0, 7783.0, 7764.0, 7773.0, 7784.0, 7793.0, 7775.0, 7792.0, 7783.0, 7764.0, 7773.0, 7777.0, 7785.0, 7763.0, 7765.0, 7792.0, 7775.0, 7754.0, 7742.0, 7750.0, 7752.0, 7754.0, 7754.0, 7763.0, 7767.0, 7762.0, 7766.0, 7803.0, 7787.0, 7805.0, 7798.0, 7807.0, 7796.0, 7796.0, 7808.0, 7820.0, 7817.0, 7843.0, 7816.0, 7799.0, 7796.0, 7787.0, 7774.0, 7776.0, 7776.0, 7766.0, 7764.0, 7785.0, 7801.0, 7807.0, 7795.0, 7778.0, 7766.0, 7755.0, 7796.0, 7787.0], 'WindowWidth': [16525.0, 16503.0, 16494.0, 16516.0, 16571.0, 16539.0, 16490.0, 16495.0, 16529.0, 16531.0, 16572.0, 16589.0, 16543.0, 16531.0, 16546.0, 16527.0, 16501.0, 16514.0, 16542.0, 16499.0, 16503.0, 16488.0, 16493.0, 16515.0, 16475.0, 16461.0, 16464.0, 16460.0, 16461.0, 16478.0, 16494.0, 16566.0, 16572.0, 16566.0, 16587.0, 16600.0, 16554.0, 16507.0, 16512.0, 16567.0, 16532.0, 16499.0, 16505.0, 16523.0, 16522.0, 16534.0, 16565.0, 16543.0, 16542.0, 16553.0, 16506.0, 16507.0, 16578.0, 16528.0, 16497.0, 16493.0, 16478.0, 16503.0, 16523.0, 16519.0, 16501.0, 16499.0, 16486.0, 16507.0, 16485.0, 16492.0, 16525.0, 16519.0, 16498.0, 16550.0, 16524.0, 16486.0, 16528.0, 16568.0, 16540.0, 16538.0, 16574.0, 16562.0, 16542.0, 16508.0, 16489.0, 16524.0, 16486.0, 16472.0, 16494.0, 16524.0, 16507.0, 16470.0, 16466.0, 16457.0, 16449.0, 16460.0, 16459.0, 16488.0, 16490.0, 16505.0, 16469.0, 16485.0, 16508.0, 16522.0, 16492.0, 16520.0, 16503.0, 16468.0, 16485.0, 16497.0, 16509.0, 16465.0, 16475.0, 16521.0, 16488.0, 16445.0, 16421.0, 16437.0, 16443.0, 16447.0, 16447.0, 16466.0, 16477.0, 16461.0, 16473.0, 16543.0, 16520.0, 16550.0, 16540.0, 16554.0, 16530.0, 16532.0, 16558.0, 16584.0, 16573.0, 16618.0, 16569.0, 16541.0, 16526.0, 16514.0, 16487.0, 16494.0, 16489.0, 16470.0, 16464.0, 16509.0, 16548.0, 16554.0, 16529.0, 16500.0, 16475.0, 16453.0, 16535.0, 16518.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.0011611333333333333</td></tr>
<tr><td colspan=3>aqi</td><td>0.003634858466666667</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>39.5541270981208</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.2753723223489937</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>1.0164592822818797</td></tr>
<tr><td colspan=3>efc</td><td>0.547</td></tr>
<tr><td colspan=3>fber</td><td>611.1188</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.07767162833902054</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>4</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>2.6666666666666665</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>3.8258766666666673</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>3.697735</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>4.32956</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>3.450335</td></tr>
<tr><td colspan=3>gcor</td><td>0.0123266</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>0.006009016651660204</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.07547436654567719</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>1.982085344643632</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>62.7276</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>75.4546</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>513.8256</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>238.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>489936.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>172.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>1885.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>865.2413</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>0.1431</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>2794.0822</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>6280.4837</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>5886.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>201264.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>1605.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>11684.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>2969.5923</td></tr>
<tr><td colspan=3>tsnr</td><td>54.05673758359626</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>