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

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

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

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

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-42_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-42/figures/sub-42_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-42/figures/sub-42_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-42/figures/sub-42_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-42/figures/sub-42_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-42/ses-01/func/sub-42_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>c2a224903755ce85aa4a1fb22ed5afd8</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, 99.01200103759766], [0.0, 2.0, 0.0, -76.52999877929688], [0.0, 0.0, 2.0, -49.90359878540039], [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': ['134741.135000', '134743.135000', '134745.135000', '134747.135000', '134749.135000', '134751.135000', '134753.135000', '134755.135000', '134757.135000', '134759.135000', '134801.135000', '134803.135000', '134805.135000', '134807.135000', '134809.135000', '134811.135000', '134813.135000', '134815.135000', '134817.135000', '134819.135000', '134821.135000', '134823.135000', '134825.135000', '134827.135000', '134829.135000', '134831.135000', '134833.135000', '134835.135000', '134837.135000', '134839.135000', '134841.135000', '134843.135000', '134845.135000', '134847.135000', '134849.135000', '134851.135000', '134853.135000', '134855.135000', '134857.135000', '134859.135000', '134901.135000', '134903.135000', '134905.135000', '134907.135000', '134909.135000', '134911.135000', '134913.135000', '134915.135000', '134917.135000', '134919.135000', '134921.135000', '134923.135000', '134925.135000', '134927.135000', '134929.135000', '134931.135000', '134933.135000', '134935.135000', '134937.135000', '134939.135000', '134941.135000', '134943.135000', '134945.135000', '134947.135000', '134949.135000', '134951.135000', '134953.135000', '134955.135000', '134957.135000', '134959.135000', '135001.135000', '135003.135000', '135005.135000', '135007.135000', '135009.135000', '135011.135000', '135013.135000', '135015.135000', '135017.135000', '135019.135000', '135021.135000', '135023.135000', '135025.135000', '135027.135000', '135029.135000', '135031.135000', '135033.135000', '135035.135000', '135037.135000', '135039.135000', '135041.135000', '135043.135000', '135045.135000', '135047.135000', '135049.135000', '135051.135000', '135053.135000', '135055.135000', '135057.135000', '135059.135000', '135101.135000', '135103.135000', '135105.135000', '135107.135000', '135109.135000', '135111.135000', '135113.135000', '135115.135000', '135117.135000', '135119.135000', '135121.135000', '135123.135000', '135125.135000', '135127.135000', '135129.135000', '135131.135000', '135133.135000', '135135.135000', '135137.135000', '135139.135000', '135141.135000', '135143.135000', '135145.135000', '135147.135000', '135149.135000', '135151.135000', '135153.135000', '135155.135000', '135157.135000', '135159.135000', '135201.135000', '135203.135000', '135205.135000', '135207.135000', '135209.135000', '135211.135000', '135213.135000', '135215.135000', '135217.135000', '135219.135000', '135221.135000', '135223.135000', '135225.135000', '135227.135000', '135229.135000', '135231.135000', '135233.135000', '135235.135000', '135237.135000', '135239.135000'], 'ContentTime': ['134743.603000', '134745.597000', '134747.597000', '134749.597000', '134751.597000', '134753.598000', '134755.598000', '134757.598000', '134759.598000', '134801.597000', '134803.597000', '134805.597000', '134807.597000', '134809.597000', '134811.598000', '134813.598000', '134815.598000', '134817.598000', '134819.597000', '134821.597000', '134823.597000', '134825.597000', '134827.597000', '134829.598000', '134831.598000', '134833.598000', '134835.598000', '134837.597000', '134839.597000', '134841.597000', '134843.597000', '134845.597000', '134847.598000', '134849.598000', '134851.598000', '134853.598000', '134855.597000', '134857.597000', '134859.597000', '134901.597000', '134903.598000', '134905.598000', '134907.598000', '134909.598000', '134911.597000', '134913.597000', '134915.597000', '134917.597000', '134919.597000', '134921.598000', '134923.598000', '134925.598000', '134927.598000', '134929.605000', '134931.597000', '134933.597000', '134935.597000', '134937.597000', '134939.598000', '134941.598000', '134943.598000', '134945.598000', '134947.597000', '134949.597000', '134951.597000', '134953.597000', '134955.597000', '134957.598000', '134959.598000', '135001.598000', '135003.598000', '135005.597000', '135007.597000', '135009.597000', '135011.597000', '135013.598000', '135015.598000', '135017.598000', '135019.598000', '135021.597000', '135023.597000', '135025.597000', '135027.597000', '135029.597000', '135031.598000', '135033.598000', '135035.598000', '135037.598000', '135039.597000', '135041.597000', '135043.597000', '135045.597000', '135047.597000', '135049.598000', '135051.598000', '135053.598000', '135055.598000', '135057.597000', '135059.597000', '135101.597000', '135103.597000', '135105.598000', '135107.598000', '135109.598000', '135111.598000', '135113.598000', '135115.597000', '135117.597000', '135119.597000', '135121.597000', '135123.598000', '135125.598000', '135127.598000', '135129.598000', '135131.597000', '135133.597000', '135135.597000', '135137.597000', '135139.597000', '135141.598000', '135143.598000', '135145.598000', '135147.598000', '135149.597000', '135151.597000', '135153.597000', '135155.597000', '135157.597000', '135159.598000', '135201.598000', '135203.598000', '135205.598000', '135207.597000', '135209.597000', '135211.597000', '135213.597000', '135215.598000', '135217.598000', '135219.598000', '135221.598000', '135223.598000', '135225.597000', '135227.597000', '135229.597000', '135231.597000', '135233.598000', '135235.598000', '135237.598000', '135239.598000', '135241.226000'], 'InstanceCreationTime': ['134743.603000', '134745.597000', '134747.597000', '134749.597000', '134751.597000', '134753.598000', '134755.598000', '134757.598000', '134759.598000', '134801.597000', '134803.597000', '134805.597000', '134807.597000', '134809.597000', '134811.598000', '134813.598000', '134815.598000', '134817.598000', '134819.597000', '134821.597000', '134823.597000', '134825.597000', '134827.597000', '134829.598000', '134831.598000', '134833.598000', '134835.598000', '134837.597000', '134839.597000', '134841.597000', '134843.597000', '134845.597000', '134847.598000', '134849.598000', '134851.598000', '134853.598000', '134855.597000', '134857.597000', '134859.597000', '134901.597000', '134903.598000', '134905.598000', '134907.598000', '134909.598000', '134911.597000', '134913.597000', '134915.597000', '134917.597000', '134919.597000', '134921.598000', '134923.598000', '134925.598000', '134927.598000', '134929.605000', '134931.597000', '134933.597000', '134935.597000', '134937.597000', '134939.598000', '134941.598000', '134943.598000', '134945.598000', '134947.597000', '134949.597000', '134951.597000', '134953.597000', '134955.597000', '134957.598000', '134959.598000', '135001.598000', '135003.598000', '135005.597000', '135007.597000', '135009.597000', '135011.597000', '135013.598000', '135015.598000', '135017.598000', '135019.598000', '135021.597000', '135023.597000', '135025.597000', '135027.597000', '135029.597000', '135031.598000', '135033.598000', '135035.598000', '135037.598000', '135039.597000', '135041.597000', '135043.597000', '135045.597000', '135047.597000', '135049.598000', '135051.598000', '135053.598000', '135055.598000', '135057.597000', '135059.597000', '135101.597000', '135103.597000', '135105.598000', '135107.598000', '135109.598000', '135111.598000', '135113.598000', '135115.597000', '135117.597000', '135119.597000', '135121.597000', '135123.598000', '135125.598000', '135127.598000', '135129.598000', '135131.597000', '135133.597000', '135135.597000', '135137.597000', '135139.597000', '135141.598000', '135143.598000', '135145.598000', '135147.598000', '135149.597000', '135151.597000', '135153.597000', '135155.597000', '135157.597000', '135159.598000', '135201.598000', '135203.598000', '135205.598000', '135207.597000', '135209.597000', '135211.597000', '135213.597000', '135215.598000', '135217.598000', '135219.598000', '135221.598000', '135223.598000', '135225.597000', '135227.597000', '135229.597000', '135231.597000', '135233.598000', '135235.598000', '135237.598000', '135239.598000', '135241.226000'], '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': [25253, 24600, 25002, 24575, 25001, 25121, 25185, 25083, 24768, 24497, 24895, 24560, 24572, 24522, 24792, 24676, 24926, 24958, 24789, 24260, 24862, 24737, 24702, 24549, 24963, 24905, 24982, 25075, 24810, 24990, 24810, 24637, 24988, 24857, 25099, 25074, 25222, 25063, 24764, 25008, 25183, 25214, 24904, 24910, 25190, 25205, 25485, 25169, 25127, 24938, 25153, 25302, 25046, 25165, 25282, 25686, 25127, 25110, 25383, 25199, 25302, 25067, 25643, 25321, 25374, 25526, 25023, 24908, 25507, 25380, 24944, 24938, 25094, 25224, 25272, 25350, 25065, 25207, 25557, 25324, 24909, 25544, 25326, 25074, 25048, 25472, 25592, 25634, 25185, 25007, 25229, 25357, 25764, 25398, 25020, 25164, 25303, 25314, 25592, 25131, 25433, 25843, 25516, 25751, 25440, 25266, 25713, 24888, 25165, 25565, 25349, 26088, 25210, 25170, 25781, 25738, 25381, 25618, 26154, 25686, 25472, 25980, 26035, 25611, 25292, 25759, 25901, 26026, 25702, 25670, 25367, 25974, 26405, 25453, 25681, 25964, 26034, 25918, 25903, 25452, 25686, 25391, 25680, 25506, 25829, 26207, 26090, 25746, 25686, 25550], 'TriggerTime': [11650.0, 13650.0, 15650.0, 17650.0, 19650.0, 21650.0, 23650.0, 25650.0, 27650.0, 29650.0, 31650.0, 33650.0, 35650.0, 37650.0, 39650.0, 41650.0, 43650.0, 45650.0, 47650.0, 49650.0, 51650.0, 53650.0, 55650.0, 57650.0, 59650.0, 61650.0, 63650.0, 65650.0, 67650.0, 69650.0, 71650.0, 73650.0, 75650.0, 77650.0, 79650.0, 81650.0, 83650.0, 85650.0, 87650.0, 89650.0, 91650.0, 93650.0, 95650.0, 97650.0, 99650.0, 101650.0, 103650.0, 105650.0, 107650.0, 109650.0, 111650.0, 113650.0, 115650.0, 117650.0, 119650.0, 121650.0, 123650.0, 125650.0, 127650.0, 129650.0, 131650.0, 133650.0, 135650.0, 137650.0, 139650.0, 141650.0, 143650.0, 145650.0, 147650.0, 149650.0, 151650.0, 153650.0, 155650.0, 157650.0, 159650.0, 161650.0, 163650.0, 165650.0, 167650.0, 169650.0, 171650.0, 173650.0, 175650.0, 177650.0, 179650.0, 181650.0, 183650.0, 185650.0, 187650.0, 189650.0, 191650.0, 193650.0, 195650.0, 197650.0, 199650.0, 201650.0, 203650.0, 205650.0, 207650.0, 209650.0, 211650.0, 213650.0, 215650.0, 217650.0, 219650.0, 221650.0, 223650.0, 225650.0, 227650.0, 229650.0, 231650.0, 233650.0, 235650.0, 237650.0, 239650.0, 241650.0, 243650.0, 245650.0, 247650.0, 249650.0, 251650.0, 253650.0, 255650.0, 257650.0, 259650.0, 261650.0, 263650.0, 265650.0, 267650.0, 269650.0, 271650.0, 273650.0, 275650.0, 277650.0, 279650.0, 281650.0, 283650.0, 285650.0, 287650.0, 289650.0, 291650.0, 293650.0, 295650.0, 297650.0, 299650.0, 301650.0, 303650.0, 305650.0, 307650.0, 309650.0], 'WindowCenter': [8928.0, 8883.0, 8926.0, 8895.0, 8888.0, 8898.0, 8901.0, 8884.0, 8864.0, 8862.0, 8921.0, 8869.0, 8878.0, 8846.0, 8862.0, 8865.0, 8868.0, 8892.0, 8856.0, 8851.0, 8880.0, 8868.0, 8856.0, 8905.0, 8903.0, 8891.0, 8904.0, 8896.0, 8891.0, 8906.0, 8917.0, 8912.0, 8933.0, 8924.0, 8915.0, 8915.0, 8915.0, 8913.0, 8907.0, 8922.0, 8899.0, 8942.0, 8939.0, 8918.0, 8910.0, 8906.0, 8937.0, 8917.0, 8922.0, 8924.0, 8917.0, 8939.0, 8916.0, 8915.0, 8901.0, 8928.0, 8915.0, 8922.0, 8912.0, 8900.0, 8910.0, 8896.0, 8897.0, 8902.0, 8901.0, 8928.0, 8908.0, 8904.0, 8925.0, 8913.0, 8905.0, 8914.0, 8911.0, 8888.0, 8897.0, 8939.0, 8883.0, 8875.0, 8926.0, 8920.0, 8892.0, 8910.0, 8878.0, 8860.0, 8909.0, 8923.0, 8902.0, 8934.0, 8900.0, 8931.0, 8898.0, 8875.0, 8910.0, 8900.0, 8875.0, 8883.0, 8894.0, 8922.0, 8897.0, 8898.0, 8907.0, 8928.0, 8905.0, 8926.0, 8896.0, 8906.0, 8887.0, 8862.0, 8889.0, 8913.0, 8886.0, 8927.0, 8892.0, 8891.0, 8919.0, 8914.0, 8903.0, 8905.0, 8916.0, 8894.0, 8882.0, 8927.0, 8920.0, 8908.0, 8894.0, 8925.0, 8908.0, 8918.0, 8907.0, 8896.0, 8868.0, 8919.0, 8942.0, 8903.0, 8896.0, 8909.0, 8930.0, 8890.0, 8918.0, 8903.0, 8922.0, 8868.0, 8906.0, 8898.0, 8914.0, 8869.0, 8887.0, 8896.0, 8888.0, 8894.0], 'WindowWidth': [18948.0, 18860.0, 18943.0, 18885.0, 18861.0, 18882.0, 18890.0, 18857.0, 18815.0, 18813.0, 18931.0, 18827.0, 18846.0, 18778.0, 18817.0, 18821.0, 18826.0, 18873.0, 18806.0, 18793.0, 18844.0, 18826.0, 18802.0, 18906.0, 18898.0, 18874.0, 18900.0, 18886.0, 18872.0, 18909.0, 18932.0, 18924.0, 18963.0, 18947.0, 18925.0, 18926.0, 18919.0, 18918.0, 18915.0, 18933.0, 18885.0, 18979.0, 18981.0, 18928.0, 18909.0, 18897.0, 18964.0, 18927.0, 18936.0, 18944.0, 18922.0, 18971.0, 18927.0, 18921.0, 18888.0, 18945.0, 18920.0, 18933.0, 18916.0, 18884.0, 18904.0, 18878.0, 18871.0, 18889.0, 18887.0, 18942.0, 18906.0, 18897.0, 18929.0, 18911.0, 18898.0, 18917.0, 18909.0, 18851.0, 18874.0, 18962.0, 18847.0, 18829.0, 18937.0, 18926.0, 18864.0, 18893.0, 18832.0, 18801.0, 18906.0, 18925.0, 18880.0, 18950.0, 18882.0, 18949.0, 18875.0, 18826.0, 18892.0, 18881.0, 18829.0, 18838.0, 18871.0, 18929.0, 18874.0, 18877.0, 18898.0, 18934.0, 18886.0, 18933.0, 18869.0, 18892.0, 18852.0, 18807.0, 18855.0, 18902.0, 18847.0, 18926.0, 18868.0, 18865.0, 18912.0, 18909.0, 18891.0, 18887.0, 18903.0, 18860.0, 18837.0, 18927.0, 18917.0, 18895.0, 18870.0, 18932.0, 18885.0, 18907.0, 18891.0, 18864.0, 18813.0, 18912.0, 18955.0, 18880.0, 18865.0, 18892.0, 18933.0, 18852.0, 18911.0, 18884.0, 18919.0, 18812.0, 18894.0, 18872.0, 18904.0, 18802.0, 18841.0, 18869.0, 18852.0, 18863.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.0029322</td></tr>
<tr><td colspan=3>aqi</td><td>0.0070416926</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>39.28460462932888</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.247452686308724</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>1.0146423668456372</td></tr>
<tr><td colspan=3>efc</td><td>0.5791</td></tr>
<tr><td colspan=3>fber</td><td>373.587</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.09907993503043785</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>4.619218333333333</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>4.35963</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>5.0829</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>4.415125</td></tr>
<tr><td colspan=3>gcor</td><td>0.0092314</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>-0.01346523966640234</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.1261245608329773</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.8796873801393446</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>43.9567</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>193.1732</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>900.5841</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>349.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>484025.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>198.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>3275.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>1576.1211</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>-0.0483</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>3560.8051</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>7381.7964</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>6747.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>207175.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2507.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>14003.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>3589.418</td></tr>
<tr><td colspan=3>tsnr</td><td>46.441534515470266</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>