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

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

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

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

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-33_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-33/figures/sub-33_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-33/figures/sub-33_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-33/figures/sub-33_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-33/figures/sub-33_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-33/ses-01/func/sub-33_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>0235bd2a54c15e35ff6e35a1488d6af1</td></tr>
</table>

      </div>
    </div>
  </div>


  <div class="accordion-item">
    <h2 class="accordion-header" id="about-metadata-1">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#about-metadata-1-collapse" aria-controls="about-metadata-1-collapse">
        Dataset Information
      </button>
    </h2>
    <div id="about-metadata-1-collapse" class="accordion-collapse collapse" aria-labelledby="about-metadata-1-heading" data-bs-parent="#about-metadata-1">
      <div class="accordion-body metadata-table">
      <table id="about-metadata-table-1" class="table table-sm table-striped">
<tr><td colspan=2>ConversionSoftware</td><td>dcm2niix</td></tr>
<tr><td colspan=2>ConversionSoftwareVersion</td><td>v1.0.20170207</td></tr>
<tr><td colspan=2>EchoTime</td><td>0.0302</td></tr>
<tr><td colspan=2>EffectiveEchoSpacing</td><td>0.000640002</td></tr>
<tr><td colspan=2>FlipAngle</td><td>90</td></tr>
<tr><td colspan=2>ImageType</td><td>['ORIGINAL', 'PRIMARY', 'M', 'MB', 'ND', 'MOSAIC']</td></tr>
<tr><td colspan=2>MagneticFieldStrength</td><td>3</td></tr>
<tr><td colspan=2>Manufacturer</td><td>Siemens</td></tr>
<tr><td colspan=2>ManufacturersModelName</td><td>Prisma</td></tr>
<tr><td colspan=2>PhaseEncodingDirection</td><td>j-</td></tr>
<tr><td colspan=2>ProcedureStepDescription</td><td>CAMRIS_CHOP</td></tr>
<tr><td colspan=2>ProtocolName</td><td>BOLD_resting1</td></tr>
<tr><td colspan=2>RepetitionTime</td><td>2</td></tr>
<tr><td colspan=2>SliceTiming</td><td>[0, 0.08, 0.16, 0.2375, 0.3175, 0.3975, 0.475, 0.555, 0.635, 0.7125, 0.7925, 0.8725, 0.95, 1.03, 1.11, 1.1875, 1.2675, 1.3475, 1.425, 1.505, 1.585, 1.6625, 1.7425, 1.8225, 1.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.6625, 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.6625, 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, 93.58999633789062], [0.0, 2.0, 0.0, -75.9280014038086], [0.0, 0.0, 2.0, -28.819299697875977], [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': ['143948.585000', '143950.585000', '143952.585000', '143954.585000', '143956.585000', '143958.585000', '144000.585000', '144002.585000', '144004.585000', '144006.585000', '144008.585000', '144010.585000', '144012.585000', '144014.585000', '144016.585000', '144018.585000', '144020.585000', '144022.585000', '144024.585000', '144026.585000', '144028.585000', '144030.585000', '144032.585000', '144034.585000', '144036.585000', '144038.585000', '144040.585000', '144042.585000', '144044.585000', '144046.585000', '144048.585000', '144050.585000', '144052.585000', '144054.585000', '144056.585000', '144058.585000', '144100.585000', '144102.585000', '144104.585000', '144106.585000', '144108.585000', '144110.585000', '144112.585000', '144114.585000', '144116.585000', '144118.585000', '144120.585000', '144122.585000', '144124.585000', '144126.585000', '144128.585000', '144130.585000', '144132.585000', '144134.585000', '144136.585000', '144138.585000', '144140.585000', '144142.585000', '144144.585000', '144146.585000', '144148.585000', '144150.585000', '144152.585000', '144154.585000', '144156.585000', '144158.585000', '144200.585000', '144202.585000', '144204.585000', '144206.585000', '144208.585000', '144210.585000', '144212.585000', '144214.585000', '144216.585000', '144218.585000', '144220.585000', '144222.585000', '144224.585000', '144226.585000', '144228.585000', '144230.585000', '144232.585000', '144234.585000', '144236.585000', '144238.585000', '144240.585000', '144242.585000', '144244.585000', '144246.585000', '144248.585000', '144250.585000', '144252.585000', '144254.585000', '144256.585000', '144258.585000', '144300.585000', '144302.585000', '144304.585000', '144306.585000', '144308.585000', '144310.585000', '144312.585000', '144314.585000', '144316.585000', '144318.585000', '144320.585000', '144322.585000', '144324.585000', '144326.585000', '144328.585000', '144330.585000', '144332.585000', '144334.585000', '144336.585000', '144338.585000', '144340.585000', '144342.585000', '144344.585000', '144346.585000', '144348.585000', '144350.585000', '144352.585000', '144354.585000', '144356.585000', '144358.585000', '144400.585000', '144402.585000', '144404.585000', '144406.585000', '144408.585000', '144410.585000', '144412.585000', '144414.585000', '144416.585000', '144418.585000', '144420.585000', '144422.585000', '144424.585000', '144426.585000', '144428.585000', '144430.585000', '144432.585000', '144434.585000', '144436.585000', '144438.585000', '144440.585000', '144442.585000', '144444.585000', '144446.585000'], 'ContentTime': ['143951.474000', '143953.448000', '143955.448000', '143957.449000', '143959.449000', '144001.449000', '144003.449000', '144005.449000', '144007.449000', '144009.449000', '144011.448000', '144013.448000', '144015.449000', '144017.449000', '144019.449000', '144021.449000', '144023.449000', '144025.449000', '144027.449000', '144029.448000', '144031.448000', '144033.449000', '144035.449000', '144037.449000', '144039.449000', '144041.449000', '144043.449000', '144045.448000', '144047.448000', '144049.949000', '144051.449000', '144053.449000', '144055.449000', '144057.449000', '144059.449000', '144101.449000', '144103.448000', '144105.448000', '144107.449000', '144109.449000', '144111.449000', '144113.449000', '144115.449000', '144117.449000', '144119.449000', '144121.448000', '144123.448000', '144125.449000', '144127.449000', '144129.449000', '144131.449000', '144133.449000', '144135.449000', '144137.449000', '144139.448000', '144141.448000', '144143.449000', '144145.449000', '144147.449000', '144149.449000', '144151.449000', '144153.449000', '144155.448000', '144157.448000', '144159.449000', '144201.449000', '144203.449000', '144205.449000', '144207.449000', '144209.449000', '144211.449000', '144213.448000', '144215.448000', '144217.449000', '144219.449000', '144221.449000', '144223.449000', '144225.449000', '144227.449000', '144229.449000', '144231.448000', '144233.448000', '144235.449000', '144237.449000', '144239.449000', '144241.449000', '144243.449000', '144245.449000', '144247.449000', '144249.448000', '144251.448000', '144253.449000', '144255.449000', '144257.449000', '144259.449000', '144301.449000', '144303.449000', '144305.448000', '144307.448000', '144309.449000', '144311.449000', '144313.449000', '144315.449000', '144317.449000', '144319.449000', '144321.449000', '144323.448000', '144325.468000', '144327.449000', '144329.449000', '144331.449000', '144333.449000', '144335.449000', '144337.449000', '144339.449000', '144341.448000', '144343.448000', '144345.449000', '144347.449000', '144349.449000', '144351.449000', '144353.449000', '144355.449000', '144357.449000', '144359.448000', '144401.448000', '144403.449000', '144405.449000', '144407.449000', '144409.449000', '144411.449000', '144413.449000', '144415.448000', '144417.448000', '144419.449000', '144421.449000', '144423.449000', '144425.449000', '144427.459000', '144429.449000', '144431.449000', '144433.448000', '144435.448000', '144437.449000', '144439.449000', '144441.449000', '144443.449000', '144445.449000', '144447.449000', '144449.264000'], 'InstanceCreationTime': ['143951.474000', '143953.448000', '143955.448000', '143957.449000', '143959.449000', '144001.449000', '144003.449000', '144005.449000', '144007.449000', '144009.449000', '144011.448000', '144013.448000', '144015.449000', '144017.449000', '144019.449000', '144021.449000', '144023.449000', '144025.449000', '144027.449000', '144029.448000', '144031.448000', '144033.449000', '144035.449000', '144037.449000', '144039.449000', '144041.449000', '144043.449000', '144045.448000', '144047.448000', '144049.949000', '144051.449000', '144053.449000', '144055.449000', '144057.449000', '144059.449000', '144101.449000', '144103.448000', '144105.448000', '144107.449000', '144109.449000', '144111.449000', '144113.449000', '144115.449000', '144117.449000', '144119.449000', '144121.448000', '144123.448000', '144125.449000', '144127.449000', '144129.449000', '144131.449000', '144133.449000', '144135.449000', '144137.449000', '144139.448000', '144141.448000', '144143.449000', '144145.449000', '144147.449000', '144149.449000', '144151.449000', '144153.449000', '144155.448000', '144157.448000', '144159.449000', '144201.449000', '144203.449000', '144205.449000', '144207.449000', '144209.449000', '144211.449000', '144213.448000', '144215.448000', '144217.449000', '144219.449000', '144221.449000', '144223.449000', '144225.449000', '144227.449000', '144229.449000', '144231.448000', '144233.448000', '144235.449000', '144237.449000', '144239.449000', '144241.449000', '144243.449000', '144245.449000', '144247.449000', '144249.448000', '144251.448000', '144253.449000', '144255.449000', '144257.449000', '144259.449000', '144301.449000', '144303.449000', '144305.448000', '144307.448000', '144309.449000', '144311.449000', '144313.449000', '144315.449000', '144317.449000', '144319.449000', '144321.449000', '144323.448000', '144325.468000', '144327.449000', '144329.449000', '144331.449000', '144333.449000', '144335.449000', '144337.449000', '144339.449000', '144341.448000', '144343.448000', '144345.449000', '144347.449000', '144349.449000', '144351.449000', '144353.449000', '144355.449000', '144357.449000', '144359.448000', '144401.448000', '144403.449000', '144405.449000', '144407.449000', '144409.449000', '144411.449000', '144413.449000', '144415.448000', '144417.448000', '144419.449000', '144421.449000', '144423.449000', '144425.449000', '144427.459000', '144429.449000', '144431.449000', '144433.448000', '144435.448000', '144437.449000', '144439.449000', '144441.449000', '144443.449000', '144445.449000', '144447.449000', '144449.264000'], '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': [40183, 38585, 40257, 39250, 39054, 39331, 39834, 39646, 39812, 39844, 39947, 39577, 39728, 39195, 39940, 40062, 40406, 39761, 40064, 39872, 39753, 39977, 40721, 39828, 39333, 39836, 39440, 39293, 39887, 39828, 39701, 39277, 39486, 39541, 39730, 39422, 39296, 40022, 39710, 39857, 39968, 39713, 39793, 40246, 39603, 39686, 39543, 40203, 39883, 39747, 39835, 39790, 39781, 38387, 39508, 39430, 39563, 39481, 39188, 39571, 39378, 39314, 39119, 38881, 39107, 39052, 39950, 39583, 39041, 39129, 39113, 39458, 39612, 39396, 39198, 39204, 39164, 39055, 39154, 39323, 38925, 39399, 39211, 39520, 39492, 39297, 39434, 39241, 39011, 39476, 39438, 39504, 39197, 39311, 39350, 39395, 39250, 39470, 39235, 39125, 39516, 39118, 39565, 39166, 39564, 39207, 39182, 39173, 38925, 38838, 39435, 39144, 39087, 39399, 39337, 39586, 39258, 39278, 38831, 38650, 39142, 39118, 39064, 38971, 38974, 39060, 38581, 39148, 38930, 39091, 38867, 38745, 39457, 39241, 39323, 39382, 39390, 39137, 39405, 39157, 39670, 39282, 39317, 38859, 39217, 39470, 39348, 39394, 39209, 39624], 'TriggerTime': [11715.0, 13715.0, 15715.0, 17715.0, 19715.0, 21715.0, 23715.0, 25715.0, 27715.0, 29715.0, 31715.0, 33715.0, 35715.0, 37715.0, 39715.0, 41715.0, 43715.0, 45715.0, 47715.0, 49715.0, 51715.0, 53715.0, 55715.0, 57715.0, 59715.0, 61715.0, 63715.0, 65715.0, 67715.0, 69715.0, 71715.0, 73715.0, 75715.0, 77715.0, 79715.0, 81715.0, 83715.0, 85715.0, 87715.0, 89715.0, 91715.0, 93715.0, 95715.0, 97715.0, 99715.0, 101715.0, 103715.0, 105715.0, 107715.0, 109715.0, 111715.0, 113715.0, 115715.0, 117715.0, 119715.0, 121715.0, 123715.0, 125715.0, 127715.0, 129715.0, 131715.0, 133715.0, 135715.0, 137715.0, 139715.0, 141715.0, 143715.0, 145715.0, 147715.0, 149715.0, 151715.0, 153715.0, 155715.0, 157715.0, 159715.0, 161715.0, 163715.0, 165715.0, 167715.0, 169715.0, 171715.0, 173715.0, 175715.0, 177715.0, 179715.0, 181715.0, 183715.0, 185715.0, 187715.0, 189715.0, 191715.0, 193715.0, 195715.0, 197715.0, 199715.0, 201715.0, 203715.0, 205715.0, 207715.0, 209715.0, 211715.0, 213715.0, 215715.0, 217715.0, 219715.0, 221715.0, 223715.0, 225715.0, 227715.0, 229715.0, 231715.0, 233715.0, 235715.0, 237715.0, 239715.0, 241715.0, 243715.0, 245715.0, 247715.0, 249715.0, 251715.0, 253715.0, 255715.0, 257715.0, 259715.0, 261715.0, 263715.0, 265715.0, 267715.0, 269715.0, 271715.0, 273715.0, 275715.0, 277715.0, 279715.0, 281715.0, 283715.0, 285715.0, 287715.0, 289715.0, 291715.0, 293715.0, 295715.0, 297715.0, 299715.0, 301715.0, 303715.0, 305715.0, 307715.0, 309715.0], 'WindowCenter': [9480.0, 9435.0, 9460.0, 9457.0, 9425.0, 9465.0, 9471.0, 9466.0, 9496.0, 9516.0, 9509.0, 9500.0, 9507.0, 9506.0, 9502.0, 9493.0, 9492.0, 9467.0, 9455.0, 9470.0, 9473.0, 9474.0, 9479.0, 9468.0, 9475.0, 9484.0, 9475.0, 9461.0, 9464.0, 9470.0, 9475.0, 9477.0, 9504.0, 9496.0, 9490.0, 9487.0, 9494.0, 9486.0, 9475.0, 9481.0, 9507.0, 9498.0, 9485.0, 9512.0, 9519.0, 9497.0, 9495.0, 9516.0, 9520.0, 9513.0, 9520.0, 9512.0, 9487.0, 9437.0, 9457.0, 9438.0, 9464.0, 9462.0, 9473.0, 9487.0, 9482.0, 9483.0, 9496.0, 9498.0, 9474.0, 9485.0, 9496.0, 9477.0, 9467.0, 9474.0, 9476.0, 9476.0, 9474.0, 9479.0, 9490.0, 9480.0, 9481.0, 9506.0, 9492.0, 9465.0, 9456.0, 9480.0, 9472.0, 9476.0, 9477.0, 9482.0, 9491.0, 9498.0, 9492.0, 9494.0, 9498.0, 9484.0, 9482.0, 9477.0, 9478.0, 9478.0, 9473.0, 9487.0, 9490.0, 9469.0, 9472.0, 9467.0, 9482.0, 9477.0, 9494.0, 9490.0, 9492.0, 9499.0, 9510.0, 9487.0, 9500.0, 9487.0, 9462.0, 9484.0, 9501.0, 9493.0, 9467.0, 9488.0, 9482.0, 9464.0, 9478.0, 9495.0, 9478.0, 9485.0, 9503.0, 9500.0, 9502.0, 9513.0, 9499.0, 9464.0, 9471.0, 9497.0, 9497.0, 9463.0, 9451.0, 9451.0, 9469.0, 9490.0, 9484.0, 9472.0, 9487.0, 9489.0, 9490.0, 9483.0, 9483.0, 9467.0, 9474.0, 9483.0, 9487.0, 9492.0], 'WindowWidth': [20129.0, 20036.0, 20087.0, 20081.0, 20005.0, 20096.0, 20107.0, 20102.0, 20170.0, 20213.0, 20200.0, 20181.0, 20198.0, 20203.0, 20190.0, 20163.0, 20163.0, 20108.0, 20078.0, 20110.0, 20117.0, 20118.0, 20124.0, 20107.0, 20122.0, 20142.0, 20123.0, 20095.0, 20099.0, 20117.0, 20123.0, 20134.0, 20194.0, 20177.0, 20164.0, 20156.0, 20167.0, 20148.0, 20120.0, 20135.0, 20192.0, 20171.0, 20146.0, 20203.0, 20220.0, 20172.0, 20169.0, 20215.0, 20226.0, 20209.0, 20227.0, 20206.0, 20149.0, 20045.0, 20076.0, 20037.0, 20091.0, 20094.0, 20122.0, 20149.0, 20141.0, 20144.0, 20173.0, 20179.0, 20123.0, 20147.0, 20166.0, 20130.0, 20109.0, 20125.0, 20126.0, 20126.0, 20117.0, 20133.0, 20160.0, 20135.0, 20143.0, 20197.0, 20166.0, 20104.0, 20084.0, 20137.0, 20119.0, 20123.0, 20130.0, 20142.0, 20165.0, 20178.0, 20168.0, 20163.0, 20174.0, 20149.0, 20144.0, 20130.0, 20127.0, 20127.0, 20121.0, 20152.0, 20157.0, 20115.0, 20119.0, 20111.0, 20145.0, 20137.0, 20168.0, 20158.0, 20167.0, 20182.0, 20206.0, 20155.0, 20183.0, 20149.0, 20094.0, 20141.0, 20179.0, 20164.0, 20106.0, 20152.0, 20140.0, 20102.0, 20131.0, 20169.0, 20133.0, 20149.0, 20187.0, 20185.0, 20192.0, 20213.0, 20178.0, 20100.0, 20120.0, 20180.0, 20175.0, 20099.0, 20067.0, 20067.0, 20110.0, 20160.0, 20147.0, 20119.0, 20146.0, 20153.0, 20161.0, 20147.0, 20143.0, 20110.0, 20125.0, 20147.0, 20147.0, 20162.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.0038015333333333333</td></tr>
<tr><td colspan=3>aqi</td><td>0.009517250933333334</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>38.495706276375834</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.2068877457718121</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>1.0076724041610743</td></tr>
<tr><td colspan=3>efc</td><td>0.5435</td></tr>
<tr><td colspan=3>fber</td><td>626.5964</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.1509534197017225</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>24</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>16.0</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>4.80324</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>4.608265</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>5.2416</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>4.559855</td></tr>
<tr><td colspan=3>gcor</td><td>0.00663348</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>0.004425048362463713</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.10626275092363358</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.7344394226975615</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>54.3624</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>114.8819</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>756.9504</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>284.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>493407.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>187.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>2972.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>1402.579</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>0.428</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>4010.2508</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>7917.9008</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>7102.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>197793.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2550.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>15509.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>4094.6844</td></tr>
<tr><td colspan=3>tsnr</td><td>40.47929135923505</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>