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

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

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

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

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-46_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-46/figures/sub-46_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-46/figures/sub-46_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-46/figures/sub-46_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-46/figures/sub-46_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-46/ses-01/func/sub-46_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>0cdd7ef9a7133274659a4b51180de593</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.665, 1.7425, 1.8225, 1.9025, 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.665, 1.7425, 1.8225, 1.9025, 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.665, 1.7425, 1.8225, 1.9025]</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.21700286865234], [0.0, 2.0, 0.0, -75.32499694824219], [0.0, 0.0, 2.0, -42.67470169067383], [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': ['143818.270000', '143820.270000', '143822.270000', '143824.270000', '143826.270000', '143828.270000', '143830.270000', '143832.270000', '143834.270000', '143836.270000', '143838.270000', '143840.270000', '143842.270000', '143844.270000', '143846.270000', '143848.270000', '143850.270000', '143852.270000', '143854.270000', '143856.270000', '143858.270000', '143900.270000', '143902.270000', '143904.270000', '143906.270000', '143908.270000', '143910.270000', '143912.270000', '143914.270000', '143916.270000', '143918.270000', '143920.270000', '143922.270000', '143924.270000', '143926.270000', '143928.270000', '143930.270000', '143932.270000', '143934.270000', '143936.270000', '143938.270000', '143940.270000', '143942.270000', '143944.270000', '143946.270000', '143948.270000', '143950.270000', '143952.270000', '143954.270000', '143956.270000', '143958.270000', '144000.270000', '144002.270000', '144004.270000', '144006.270000', '144008.270000', '144010.270000', '144012.270000', '144014.270000', '144016.270000', '144018.270000', '144020.270000', '144022.270000', '144024.270000', '144026.270000', '144028.270000', '144030.270000', '144032.270000', '144034.270000', '144036.270000', '144038.270000', '144040.270000', '144042.270000', '144044.270000', '144046.270000', '144048.270000', '144050.270000', '144052.270000', '144054.270000', '144056.270000', '144058.270000', '144100.270000', '144102.270000', '144104.270000', '144106.270000', '144108.270000', '144110.270000', '144112.270000', '144114.270000', '144116.270000', '144118.270000', '144120.270000', '144122.270000', '144124.270000', '144126.270000', '144128.270000', '144130.270000', '144132.270000', '144134.270000', '144136.270000', '144138.270000', '144140.270000', '144142.270000', '144144.270000', '144146.270000', '144148.270000', '144150.270000', '144152.270000', '144154.270000', '144156.270000', '144158.270000', '144200.270000', '144202.270000', '144204.270000', '144206.270000', '144208.270000', '144210.270000', '144212.270000', '144214.270000', '144216.270000', '144218.270000', '144220.270000', '144222.270000', '144224.270000', '144226.270000', '144228.270000', '144230.270000', '144232.270000', '144234.270000', '144236.270000', '144238.270000', '144240.270000', '144242.270000', '144244.270000', '144246.270000', '144248.270000', '144250.270000', '144252.270000', '144254.270000', '144256.270000', '144258.270000', '144300.270000', '144302.270000', '144304.270000', '144306.270000', '144308.270000', '144310.270000', '144312.270000', '144314.270000', '144316.270000'], 'ContentTime': ['143821.331000', '143822.826000', '143824.827000', '143826.826000', '143828.826000', '143830.826000', '143832.826000', '143834.826000', '143836.826000', '143838.826000', '143840.840000', '143842.826000', '143844.827000', '143846.826000', '143849.326000', '143850.826000', '143852.826000', '143854.827000', '143856.826000', '143858.826000', '143900.826000', '143902.826000', '143904.826000', '143906.846000', '143908.826000', '143911.326000', '143913.326000', '143915.326000', '143917.326000', '143918.826000', '143920.826000', '143922.826000', '143925.326000', '143927.326000', '143928.826000', '143930.826000', '143933.326000', '143935.326000', '143936.826000', '143938.825000', '143940.826000', '143942.826000', '143944.826000', '143946.826000', '143949.326000', '143950.826000', '143952.826000', '143955.326000', '143957.326000', '143958.826000', '144000.826000', '144002.826000', '144004.826000', '144006.826000', '144008.826000', '144010.826000', '144012.826000', '144014.826000', '144016.826000', '144018.826000', '144020.826000', '144023.326000', '144024.826000', '144026.826000', '144029.326000', '144031.325000', '144032.826000', '144034.846000', '144037.326000', '144039.326000', '144041.326000', '144042.826000', '144044.826000', '144046.826000', '144048.825000', '144050.826000', '144052.826000', '144054.826000', '144057.326000', '144058.826000', '144100.826000', '144102.826000', '144104.826000', '144107.326000', '144108.826000', '144110.826000', '144113.326000', '144114.826000', '144116.826000', '144118.826000', '144120.826000', '144122.826000', '144124.826000', '144127.326000', '144128.826000', '144130.826000', '144132.826000', '144135.326000', '144137.326000', '144139.326000', '144140.826000', '144142.826000', '144144.826000', '144146.826000', '144148.826000', '144150.826000', '144152.826000', '144155.326000', '144156.826000', '144158.825000', '144200.826000', '144202.826000', '144205.326000', '144206.826000', '144208.826000', '144211.326000', '144212.826000', '144214.826000', '144216.826000', '144218.826000', '144220.826000', '144222.826000', '144224.826000', '144226.826000', '144228.826000', '144231.326000', '144233.326000', '144234.826000', '144237.326000', '144238.826000', '144240.826000', '144243.326000', '144244.826000', '144246.826000', '144248.826000', '144250.826000', '144252.826000', '144254.826000', '144256.826000', '144258.826000', '144300.826000', '144302.826000', '144305.326000', '144306.826000', '144308.825000', '144310.826000', '144313.326000', '144315.326000', '144316.826000', '144318.826000'], 'InstanceCreationTime': ['143821.331000', '143822.826000', '143824.827000', '143826.826000', '143828.826000', '143830.826000', '143832.826000', '143834.826000', '143836.826000', '143838.826000', '143840.840000', '143842.826000', '143844.827000', '143846.826000', '143849.326000', '143850.826000', '143852.826000', '143854.827000', '143856.826000', '143858.826000', '143900.826000', '143902.826000', '143904.826000', '143906.846000', '143908.826000', '143911.326000', '143913.326000', '143915.326000', '143917.326000', '143918.826000', '143920.826000', '143922.826000', '143925.326000', '143927.326000', '143928.826000', '143930.826000', '143933.326000', '143935.326000', '143936.826000', '143938.825000', '143940.826000', '143942.826000', '143944.826000', '143946.826000', '143949.326000', '143950.826000', '143952.826000', '143955.326000', '143957.326000', '143958.826000', '144000.826000', '144002.826000', '144004.826000', '144006.826000', '144008.826000', '144010.826000', '144012.826000', '144014.826000', '144016.826000', '144018.826000', '144020.826000', '144023.326000', '144024.826000', '144026.826000', '144029.326000', '144031.325000', '144032.826000', '144034.846000', '144037.326000', '144039.326000', '144041.326000', '144042.826000', '144044.826000', '144046.826000', '144048.825000', '144050.826000', '144052.826000', '144054.826000', '144057.326000', '144058.826000', '144100.826000', '144102.826000', '144104.826000', '144107.326000', '144108.826000', '144110.826000', '144113.326000', '144114.826000', '144116.826000', '144118.826000', '144120.826000', '144122.826000', '144124.826000', '144127.326000', '144128.826000', '144130.826000', '144132.826000', '144135.326000', '144137.326000', '144139.326000', '144140.826000', '144142.826000', '144144.826000', '144146.826000', '144148.826000', '144150.826000', '144152.826000', '144155.326000', '144156.826000', '144158.825000', '144200.826000', '144202.826000', '144205.326000', '144206.826000', '144208.826000', '144211.326000', '144212.826000', '144214.826000', '144216.826000', '144218.826000', '144220.826000', '144222.826000', '144224.826000', '144226.826000', '144228.826000', '144231.326000', '144233.326000', '144234.826000', '144237.326000', '144238.826000', '144240.826000', '144243.326000', '144244.826000', '144246.826000', '144248.826000', '144250.826000', '144252.826000', '144254.826000', '144256.826000', '144258.826000', '144300.826000', '144302.826000', '144305.326000', '144306.826000', '144308.825000', '144310.826000', '144313.326000', '144315.326000', '144316.826000', '144318.826000'], 'InstanceNumber': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150], 'LargestImagePixelValue': [32491, 32970, 32603, 32924, 32608, 32468, 32469, 32683, 32535, 32320, 32561, 32426, 32241, 32080, 32648, 32584, 32265, 32453, 32378, 32281, 32144, 32402, 32472, 32501, 32400, 32389, 32304, 32176, 32507, 32414, 32627, 32671, 32580, 32702, 32788, 32779, 32978, 32711, 32611, 32711, 32652, 32486, 32414, 32714, 32738, 33340, 33136, 32809, 33266, 33254, 33194, 33141, 33248, 33163, 33060, 32806, 33374, 33290, 33282, 33461, 33762, 33532, 33606, 33589, 33626, 33528, 33390, 33835, 33439, 33414, 33802, 33438, 33157, 33212, 33506, 33663, 33493, 33258, 33535, 33532, 33510, 33432, 33368, 33087, 33341, 33544, 33715, 33610, 33592, 33515, 33174, 33319, 33285, 33386, 33508, 33593, 33396, 33264, 33756, 33216, 33340, 33426, 33590, 33870, 33572, 33381, 33593, 33680, 33869, 33586, 33654, 33435, 33772, 33759, 33439, 33221, 33205, 33988, 33458, 33881, 33881, 33718, 34037, 33705, 33570, 33497, 33578, 33603, 33816, 33549, 33803, 33662, 33730, 33832, 33918, 33826, 33750, 33785, 33777, 33584, 33851, 33988, 33368, 33561, 33707, 33771, 33282, 33722, 33802, 33900], 'TriggerTime': [11730.0, 13730.0, 15730.0, 17730.0, 19730.0, 21730.0, 23730.0, 25730.0, 27730.0, 29730.0, 31730.0, 33730.0, 35730.0, 37730.0, 39730.0, 41730.0, 43730.0, 45730.0, 47730.0, 49730.0, 51730.0, 53730.0, 55730.0, 57730.0, 59730.0, 61730.0, 63730.0, 65730.0, 67730.0, 69730.0, 71730.0, 73730.0, 75730.0, 77730.0, 79730.0, 81730.0, 83730.0, 85730.0, 87730.0, 89730.0, 91730.0, 93730.0, 95730.0, 97730.0, 99730.0, 101730.0, 103730.0, 105730.0, 107730.0, 109730.0, 111730.0, 113730.0, 115730.0, 117730.0, 119730.0, 121730.0, 123730.0, 125730.0, 127730.0, 129730.0, 131730.0, 133730.0, 135730.0, 137730.0, 139730.0, 141730.0, 143730.0, 145730.0, 147730.0, 149730.0, 151730.0, 153730.0, 155730.0, 157730.0, 159730.0, 161730.0, 163730.0, 165730.0, 167730.0, 169730.0, 171730.0, 173730.0, 175730.0, 177730.0, 179730.0, 181730.0, 183730.0, 185730.0, 187730.0, 189730.0, 191730.0, 193730.0, 195730.0, 197730.0, 199730.0, 201730.0, 203730.0, 205730.0, 207730.0, 209730.0, 211730.0, 213730.0, 215730.0, 217730.0, 219730.0, 221730.0, 223730.0, 225730.0, 227730.0, 229730.0, 231730.0, 233730.0, 235730.0, 237730.0, 239730.0, 241730.0, 243730.0, 245730.0, 247730.0, 249730.0, 251730.0, 253730.0, 255730.0, 257730.0, 259730.0, 261730.0, 263730.0, 265730.0, 267730.0, 269730.0, 271730.0, 273730.0, 275730.0, 277730.0, 279730.0, 281730.0, 283730.0, 285730.0, 287730.0, 289730.0, 291730.0, 293730.0, 295730.0, 297730.0, 299730.0, 301730.0, 303730.0, 305730.0, 307730.0, 309730.0], 'WindowCenter': [9130.0, 9121.0, 9102.0, 9099.0, 9099.0, 9094.0, 9092.0, 9080.0, 9078.0, 9099.0, 9112.0, 9103.0, 9092.0, 9075.0, 9077.0, 9077.0, 9069.0, 9080.0, 9091.0, 9102.0, 9093.0, 9080.0, 9072.0, 9098.0, 9090.0, 9078.0, 9067.0, 9059.0, 9058.0, 9068.0, 9096.0, 9097.0, 9115.0, 9119.0, 9120.0, 9130.0, 9119.0, 9100.0, 9089.0, 9085.0, 9096.0, 9089.0, 9083.0, 9108.0, 9139.0, 9174.0, 9172.0, 9163.0, 9153.0, 9145.0, 9150.0, 9143.0, 9142.0, 9136.0, 9109.0, 9098.0, 9111.0, 9132.0, 9142.0, 9140.0, 9146.0, 9140.0, 9132.0, 9112.0, 9111.0, 9131.0, 9144.0, 9161.0, 9147.0, 9135.0, 9138.0, 9134.0, 9132.0, 9134.0, 9121.0, 9110.0, 9108.0, 9110.0, 9128.0, 9158.0, 9180.0, 9171.0, 9143.0, 9120.0, 9117.0, 9134.0, 9146.0, 9159.0, 9166.0, 9148.0, 9128.0, 9120.0, 9130.0, 9139.0, 9131.0, 9119.0, 9120.0, 9139.0, 9139.0, 9133.0, 9140.0, 9132.0, 9136.0, 9133.0, 9125.0, 9119.0, 9137.0, 9148.0, 9155.0, 9164.0, 9158.0, 9151.0, 9163.0, 9157.0, 9159.0, 9169.0, 9169.0, 9168.0, 9142.0, 9137.0, 9140.0, 9158.0, 9168.0, 9143.0, 9149.0, 9150.0, 9160.0, 9170.0, 9158.0, 9146.0, 9146.0, 9145.0, 9147.0, 9146.0, 9143.0, 9164.0, 9159.0, 9177.0, 9179.0, 9178.0, 9170.0, 9168.0, 9155.0, 9160.0, 9161.0, 9169.0, 9132.0, 9129.0, 9147.0, 9167.0], 'WindowWidth': [19422.0, 19394.0, 19356.0, 19344.0, 19344.0, 19344.0, 19340.0, 19313.0, 19308.0, 19353.0, 19383.0, 19364.0, 19336.0, 19305.0, 19302.0, 19301.0, 19290.0, 19311.0, 19335.0, 19357.0, 19339.0, 19311.0, 19298.0, 19348.0, 19331.0, 19304.0, 19282.0, 19270.0, 19263.0, 19290.0, 19344.0, 19347.0, 19383.0, 19396.0, 19401.0, 19417.0, 19391.0, 19351.0, 19327.0, 19318.0, 19341.0, 19330.0, 19322.0, 19371.0, 19440.0, 19508.0, 19501.0, 19480.0, 19462.0, 19447.0, 19456.0, 19441.0, 19436.0, 19426.0, 19372.0, 19351.0, 19369.0, 19415.0, 19433.0, 19428.0, 19435.0, 19427.0, 19412.0, 19372.0, 19372.0, 19412.0, 19442.0, 19477.0, 19451.0, 19426.0, 19423.0, 19421.0, 19410.0, 19415.0, 19388.0, 19365.0, 19360.0, 19365.0, 19406.0, 19471.0, 19516.0, 19496.0, 19435.0, 19384.0, 19378.0, 19413.0, 19440.0, 19471.0, 19483.0, 19446.0, 19400.0, 19387.0, 19409.0, 19429.0, 19411.0, 19382.0, 19388.0, 19430.0, 19430.0, 19423.0, 19430.0, 19416.0, 19419.0, 19412.0, 19394.0, 19387.0, 19424.0, 19449.0, 19460.0, 19480.0, 19472.0, 19460.0, 19477.0, 19471.0, 19475.0, 19496.0, 19495.0, 19491.0, 19441.0, 19425.0, 19434.0, 19472.0, 19495.0, 19445.0, 19453.0, 19454.0, 19476.0, 19497.0, 19468.0, 19439.0, 19440.0, 19441.0, 19447.0, 19441.0, 19434.0, 19480.0, 19474.0, 19506.0, 19515.0, 19513.0, 19494.0, 19491.0, 19470.0, 19474.0, 19481.0, 19495.0, 19417.0, 19405.0, 19442.0, 19485.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.0008230000000000001</td></tr>
<tr><td colspan=3>aqi</td><td>0.005111000399999999</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>30.595044936040264</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.1311372069127517</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>0.9737337238255036</td></tr>
<tr><td colspan=3>efc</td><td>0.5828</td></tr>
<tr><td colspan=3>fber</td><td>341.9203</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.048306168507159825</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>0</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>0.0</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>4.644758333333333</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>4.540095</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>5.0041</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>4.39008</td></tr>
<tr><td colspan=3>gcor</td><td>0.00948123</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>0.05334801226854324</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.09436226636171341</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.790520436161456</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>56.1716</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>202.2764</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>955.4354</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>355.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>472165.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>195.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>3370.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>1894.391</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>0.4915</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>3461.2333</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>7277.07</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>6557.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>219035.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2486.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>14158.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>3662.0554</td></tr>
<tr><td colspan=3>tsnr</td><td>48.83704134740583</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>