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

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

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

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

        </div>
        <div id="datatype-figures_desc-norm_run-01_session-01_subject-54_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-54/figures/sub-54_ses-01_task-piper_run-01_desc-norm_bold.svg" style="">
Problem loading figure sub-54/figures/sub-54_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-54/figures/sub-54_ses-01_task-piper_run-01_desc-norm_bold.svg" target="_blank">sub-54/figures/sub-54_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-54/ses-01/func/sub-54_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>8240384f8a49febbcda84d80b79c8fb2</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.0775, 0.1575, 0.2375, 0.315, 0.395, 0.475, 0.5525, 0.6325, 0.7125, 0.79, 0.87, 0.95, 1.0275, 1.1075, 1.1875, 1.265, 1.345, 1.425, 1.5025, 1.5825, 1.6625, 1.74, 1.82, 1.9, 0, 0.0775, 0.1575, 0.2375, 0.315, 0.395, 0.475, 0.5525, 0.6325, 0.7125, 0.79, 0.87, 0.95, 1.0275, 1.1075, 1.1875, 1.265, 1.345, 1.425, 1.5025, 1.5825, 1.6625, 1.74, 1.82, 1.9, 0, 0.0775, 0.1575, 0.2375, 0.315, 0.395, 0.475, 0.5525, 0.6325, 0.7125, 0.79, 0.87, 0.95, 1.0275, 1.1075, 1.1875, 1.265, 1.345, 1.425, 1.5025, 1.5825, 1.6625, 1.74, 1.82, 1.9]</td></tr>
<tr><td colspan=2>TaskName</td><td>piper</td></tr>
<tr><td>dcmmeta</td><td>affine</td><td>[[-2.0, 0.0, 0.0, 96.0], [0.0, 2.0, 0.0, -81.89299774169922], [0.0, 0.0, 2.0, -49.18159866333008], [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': ['144023.225000', '144025.225000', '144027.225000', '144029.225000', '144031.225000', '144033.225000', '144035.225000', '144037.225000', '144039.225000', '144041.225000', '144043.225000', '144045.225000', '144047.225000', '144049.225000', '144051.225000', '144053.225000', '144055.225000', '144057.225000', '144059.225000', '144101.225000', '144103.225000', '144105.225000', '144107.225000', '144109.225000', '144111.225000', '144113.225000', '144115.225000', '144117.225000', '144119.225000', '144121.225000', '144123.225000', '144125.225000', '144127.225000', '144129.225000', '144131.225000', '144133.225000', '144135.225000', '144137.225000', '144139.225000', '144141.225000', '144143.225000', '144145.225000', '144147.225000', '144149.225000', '144151.225000', '144153.225000', '144155.225000', '144157.225000', '144159.225000', '144201.225000', '144203.225000', '144205.225000', '144207.225000', '144209.225000', '144211.225000', '144213.225000', '144215.225000', '144217.225000', '144219.225000', '144221.225000', '144223.225000', '144225.225000', '144227.225000', '144229.225000', '144231.225000', '144233.225000', '144235.225000', '144237.225000', '144239.225000', '144241.225000', '144243.225000', '144245.225000', '144247.225000', '144249.225000', '144251.225000', '144253.225000', '144255.225000', '144257.225000', '144259.225000', '144301.225000', '144303.225000', '144305.225000', '144307.225000', '144309.225000', '144311.225000', '144313.225000', '144315.225000', '144317.225000', '144319.225000', '144321.225000', '144323.225000', '144325.225000', '144327.225000', '144329.225000', '144331.225000', '144333.225000', '144335.225000', '144337.225000', '144339.225000', '144341.225000', '144343.225000', '144345.225000', '144347.225000', '144349.225000', '144351.225000', '144353.225000', '144355.225000', '144357.225000', '144359.225000', '144401.225000', '144403.225000', '144405.225000', '144407.225000', '144409.225000', '144411.225000', '144413.225000', '144415.225000', '144417.225000', '144419.225000', '144421.225000', '144423.225000', '144425.225000', '144427.225000', '144429.225000', '144431.225000', '144433.225000', '144435.225000', '144437.225000', '144439.225000', '144441.225000', '144443.225000', '144445.225000', '144447.225000', '144449.225000', '144451.225000', '144453.225000', '144455.225000', '144457.225000', '144459.225000', '144501.225000', '144503.225000', '144505.225000', '144507.225000', '144509.225000', '144511.225000', '144513.225000', '144515.225000', '144517.225000', '144519.225000', '144521.225000'], 'ContentTime': ['144026.034000', '144028.029000', '144030.029000', '144032.030000', '144034.030000', '144036.030000', '144038.030000', '144040.030000', '144042.030000', '144044.029000', '144046.029000', '144048.029000', '144050.030000', '144052.030000', '144054.030000', '144056.030000', '144058.030000', '144100.030000', '144102.029000', '144104.029000', '144106.030000', '144108.030000', '144110.030000', '144112.030000', '144114.030000', '144116.030000', '144118.030000', '144120.029000', '144122.029000', '144124.030000', '144126.030000', '144128.030000', '144130.030000', '144132.030000', '144134.030000', '144136.029000', '144138.029000', '144140.029000', '144142.030000', '144144.030000', '144146.030000', '144148.030000', '144150.030000', '144152.030000', '144154.029000', '144156.029000', '144158.029000', '144200.030000', '144202.030000', '144204.030000', '144206.030000', '144208.030000', '144210.030000', '144212.029000', '144214.029000', '144216.030000', '144218.030000', '144220.030000', '144222.030000', '144224.030000', '144226.030000', '144228.030000', '144230.029000', '144232.039000', '144234.030000', '144236.030000', '144238.030000', '144240.030000', '144242.030000', '144244.030000', '144246.029000', '144248.029000', '144250.029000', '144252.030000', '144254.030000', '144256.030000', '144258.030000', '144300.030000', '144302.030000', '144304.029000', '144306.029000', '144308.029000', '144310.030000', '144312.030000', '144314.030000', '144316.030000', '144318.030000', '144320.030000', '144322.029000', '144324.029000', '144326.030000', '144328.030000', '144330.030000', '144332.030000', '144334.030000', '144336.030000', '144338.030000', '144340.029000', '144342.029000', '144344.030000', '144346.030000', '144348.030000', '144350.030000', '144352.030000', '144354.030000', '144356.029000', '144358.029000', '144400.029000', '144402.030000', '144404.030000', '144406.030000', '144408.030000', '144410.030000', '144412.030000', '144414.029000', '144416.029000', '144418.029000', '144420.030000', '144422.030000', '144424.030000', '144426.030000', '144428.030000', '144430.030000', '144432.029000', '144434.029000', '144436.030000', '144438.030000', '144440.030000', '144442.030000', '144444.030000', '144446.030000', '144448.030000', '144450.029000', '144452.029000', '144454.030000', '144456.030000', '144458.030000', '144500.030000', '144502.030000', '144504.030000', '144506.029000', '144508.029000', '144510.029000', '144512.030000', '144514.030000', '144516.030000', '144518.030000', '144520.030000', '144522.030000', '144523.813000'], 'InstanceCreationTime': ['144026.034000', '144028.029000', '144030.029000', '144032.030000', '144034.030000', '144036.030000', '144038.030000', '144040.030000', '144042.030000', '144044.029000', '144046.029000', '144048.029000', '144050.030000', '144052.030000', '144054.030000', '144056.030000', '144058.030000', '144100.030000', '144102.029000', '144104.029000', '144106.030000', '144108.030000', '144110.030000', '144112.030000', '144114.030000', '144116.030000', '144118.030000', '144120.029000', '144122.029000', '144124.030000', '144126.030000', '144128.030000', '144130.030000', '144132.030000', '144134.030000', '144136.029000', '144138.029000', '144140.029000', '144142.030000', '144144.030000', '144146.030000', '144148.030000', '144150.030000', '144152.030000', '144154.029000', '144156.029000', '144158.029000', '144200.030000', '144202.030000', '144204.030000', '144206.030000', '144208.030000', '144210.030000', '144212.029000', '144214.029000', '144216.030000', '144218.030000', '144220.030000', '144222.030000', '144224.030000', '144226.030000', '144228.030000', '144230.029000', '144232.039000', '144234.030000', '144236.030000', '144238.030000', '144240.030000', '144242.030000', '144244.030000', '144246.029000', '144248.029000', '144250.029000', '144252.030000', '144254.030000', '144256.030000', '144258.030000', '144300.030000', '144302.030000', '144304.029000', '144306.029000', '144308.029000', '144310.030000', '144312.030000', '144314.030000', '144316.030000', '144318.030000', '144320.030000', '144322.029000', '144324.029000', '144326.030000', '144328.030000', '144330.030000', '144332.030000', '144334.030000', '144336.030000', '144338.030000', '144340.029000', '144342.029000', '144344.030000', '144346.030000', '144348.030000', '144350.030000', '144352.030000', '144354.030000', '144356.029000', '144358.029000', '144400.029000', '144402.030000', '144404.030000', '144406.030000', '144408.030000', '144410.030000', '144412.030000', '144414.029000', '144416.029000', '144418.029000', '144420.030000', '144422.030000', '144424.030000', '144426.030000', '144428.030000', '144430.030000', '144432.029000', '144434.029000', '144436.030000', '144438.030000', '144440.030000', '144442.030000', '144444.030000', '144446.030000', '144448.030000', '144450.029000', '144452.029000', '144454.030000', '144456.030000', '144458.030000', '144500.030000', '144502.030000', '144504.030000', '144506.029000', '144508.029000', '144510.029000', '144512.030000', '144514.030000', '144516.030000', '144518.030000', '144520.030000', '144522.030000', '144523.813000'], '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': [24136, 23116, 22913, 23346, 23201, 23424, 23128, 23337, 23222, 22872, 23297, 22982, 23188, 22977, 22902, 23234, 23182, 23273, 22888, 23092, 22917, 23069, 23403, 23331, 23106, 22929, 23350, 22922, 23191, 23133, 23368, 23131, 23658, 24472, 24271, 23271, 23248, 23431, 23173, 23334, 23223, 23310, 23347, 23283, 23291, 23189, 23417, 23286, 23187, 23319, 23079, 22917, 23040, 23488, 23165, 23286, 23063, 22939, 23102, 23157, 23274, 23398, 23045, 22500, 22598, 22639, 23077, 22554, 22945, 22571, 22600, 22788, 22475, 22737, 24628, 24236, 23285, 23152, 22517, 22645, 22272, 22563, 22484, 22580, 22878, 22327, 23880, 22823, 22603, 22682, 22662, 22804, 22847, 22725, 22612, 22864, 22481, 22271, 22296, 22395, 22835, 22820, 23948, 23942, 23408, 23077, 23139, 22757, 22830, 22419, 22716, 22443, 22406, 22432, 22485, 22814, 22649, 22611, 22569, 22603, 22588, 22669, 22676, 22597, 22548, 22303, 23816, 23101, 22316, 21648, 21769, 22115, 22564, 22515, 22476, 22400, 22597, 22476, 22521, 22496, 24200, 24356, 23888, 23534, 23335, 22947, 22591, 22531, 22123, 22941], 'TriggerTime': [11705.0, 13705.0, 15705.0, 17705.0, 19705.0, 21705.0, 23705.0, 25705.0, 27705.0, 29705.0, 31705.0, 33705.0, 35705.0, 37705.0, 39705.0, 41705.0, 43705.0, 45705.0, 47705.0, 49705.0, 51705.0, 53705.0, 55705.0, 57705.0, 59705.0, 61705.0, 63705.0, 65705.0, 67705.0, 69705.0, 71705.0, 73705.0, 75705.0, 77705.0, 79705.0, 81705.0, 83705.0, 85705.0, 87705.0, 89705.0, 91705.0, 93705.0, 95705.0, 97705.0, 99705.0, 101705.0, 103705.0, 105705.0, 107705.0, 109705.0, 111705.0, 113705.0, 115705.0, 117705.0, 119705.0, 121705.0, 123705.0, 125705.0, 127705.0, 129705.0, 131705.0, 133705.0, 135705.0, 137705.0, 139705.0, 141705.0, 143705.0, 145705.0, 147705.0, 149705.0, 151705.0, 153705.0, 155705.0, 157705.0, 159705.0, 161705.0, 163705.0, 165705.0, 167705.0, 169705.0, 171705.0, 173705.0, 175705.0, 177705.0, 179705.0, 181705.0, 183705.0, 185705.0, 187705.0, 189705.0, 191705.0, 193705.0, 195705.0, 197705.0, 199705.0, 201705.0, 203705.0, 205705.0, 207705.0, 209705.0, 211705.0, 213705.0, 215705.0, 217705.0, 219705.0, 221705.0, 223705.0, 225705.0, 227705.0, 229705.0, 231705.0, 233705.0, 235705.0, 237705.0, 239705.0, 241705.0, 243705.0, 245705.0, 247705.0, 249705.0, 251705.0, 253705.0, 255705.0, 257705.0, 259705.0, 261705.0, 263705.0, 265705.0, 267705.0, 269705.0, 271705.0, 273705.0, 275705.0, 277705.0, 279705.0, 281705.0, 283705.0, 285705.0, 287705.0, 289705.0, 291705.0, 293705.0, 295705.0, 297705.0, 299705.0, 301705.0, 303705.0, 305705.0, 307705.0, 309705.0], 'WindowCenter': [8023.0, 8059.0, 8046.0, 8033.0, 8003.0, 8013.0, 8004.0, 8023.0, 8021.0, 8014.0, 8023.0, 8026.0, 8045.0, 8027.0, 8045.0, 8035.0, 8007.0, 8012.0, 8014.0, 8025.0, 8015.0, 8015.0, 8002.0, 8042.0, 8025.0, 8016.0, 8013.0, 8035.0, 8045.0, 8046.0, 8045.0, 8016.0, 8074.0, 8144.0, 8127.0, 8018.0, 8047.0, 8037.0, 8037.0, 8017.0, 8026.0, 8018.0, 8018.0, 8025.0, 8036.0, 8037.0, 8048.0, 8048.0, 8071.0, 8068.0, 8070.0, 8041.0, 8018.0, 8036.0, 8029.0, 8037.0, 8007.0, 8016.0, 8027.0, 8017.0, 8044.0, 8077.0, 8040.0, 8014.0, 7987.0, 7989.0, 8005.0, 8031.0, 8041.0, 8010.0, 8020.0, 8000.0, 8003.0, 7997.0, 8102.0, 8064.0, 8039.0, 7998.0, 8002.0, 8019.0, 8043.0, 8053.0, 8032.0, 8032.0, 8020.0, 8034.0, 8076.0, 8052.0, 8033.0, 8000.0, 8009.0, 7999.0, 8029.0, 8030.0, 8070.0, 8042.0, 8013.0, 7990.0, 7982.0, 8010.0, 8012.0, 8032.0, 8043.0, 8067.0, 8069.0, 8040.0, 8027.0, 8020.0, 8021.0, 8013.0, 8031.0, 8032.0, 8022.0, 8023.0, 8022.0, 8032.0, 8012.0, 8019.0, 8018.0, 8032.0, 8021.0, 8048.0, 8052.0, 8042.0, 8044.0, 8032.0, 8077.0, 8050.0, 8022.0, 7976.0, 7965.0, 7991.0, 8003.0, 8025.0, 8004.0, 8023.0, 8011.0, 8012.0, 8014.0, 8035.0, 8095.0, 8085.0, 8076.0, 8047.0, 8060.0, 8052.0, 8035.0, 8027.0, 7994.0, 8030.0], 'WindowWidth': [16996.0, 17075.0, 17043.0, 17016.0, 16955.0, 16979.0, 16961.0, 16998.0, 16994.0, 16981.0, 17000.0, 17008.0, 17046.0, 17011.0, 17045.0, 17023.0, 16968.0, 16976.0, 16981.0, 17006.0, 16983.0, 16985.0, 16953.0, 17034.0, 17002.0, 16985.0, 16978.0, 17026.0, 17046.0, 17047.0, 17043.0, 16988.0, 17112.0, 17250.0, 17209.0, 16990.0, 17051.0, 17029.0, 17029.0, 16988.0, 17004.0, 16992.0, 16992.0, 17005.0, 17026.0, 17029.0, 17054.0, 17053.0, 17104.0, 17096.0, 17098.0, 17041.0, 16992.0, 17028.0, 17014.0, 17026.0, 16969.0, 16985.0, 17009.0, 16990.0, 17045.0, 17107.0, 17035.0, 16987.0, 16927.0, 16934.0, 16965.0, 17023.0, 17042.0, 16975.0, 16998.0, 16956.0, 16969.0, 16962.0, 17152.0, 17078.0, 17032.0, 16951.0, 16966.0, 16999.0, 17049.0, 17072.0, 17027.0, 17027.0, 17001.0, 17033.0, 17109.0, 17066.0, 17028.0, 16956.0, 16977.0, 16959.0, 17020.0, 17021.0, 17101.0, 17046.0, 16988.0, 16939.0, 16926.0, 16982.0, 16987.0, 17025.0, 17042.0, 17090.0, 17097.0, 17036.0, 17011.0, 16999.0, 17005.0, 16989.0, 17024.0, 17029.0, 17008.0, 17012.0, 17007.0, 17026.0, 16986.0, 16997.0, 16993.0, 17027.0, 17006.0, 17057.0, 17069.0, 17048.0, 17056.0, 17027.0, 17115.0, 17062.0, 17007.0, 16917.0, 16894.0, 16944.0, 16969.0, 17016.0, 16970.0, 17007.0, 16983.0, 16985.0, 16994.0, 17037.0, 17149.0, 17123.0, 17106.0, 17049.0, 17081.0, 17069.0, 17034.0, 17022.0, 16950.0, 17020.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.006961866666666667</td></tr>
<tr><td colspan=3>aqi</td><td>0.009509551333333333</td></tr>
<tr><td colspan=3>dummy_trs</td><td>0</td></tr>
<tr><td>dvars</td><td colspan=2>nstd</td><td>49.483273576577176</td></tr>
<tr><td>dvars</td><td colspan=2>std</td><td>1.2889846308053696</td></tr>
<tr><td>dvars</td><td colspan=2>vstd</td><td>1.0502994371140941</td></tr>
<tr><td colspan=3>efc</td><td>0.5323</td></tr>
<tr><td colspan=3>fber</td><td>725.8235</td></tr>
<tr><td>fd</td><td colspan=2>mean</td><td>0.33996074941726545</td></tr>
<tr><td>fd</td><td colspan=2>num</td><td>90</td></tr>
<tr><td>fd</td><td colspan=2>perc</td><td>60.0</td></tr>
<tr><td>fwhm</td><td colspan=2>avg</td><td>3.8936733333333335</td></tr>
<tr><td>fwhm</td><td colspan=2>x</td><td>3.78522</td></tr>
<tr><td>fwhm</td><td colspan=2>y</td><td>4.172095</td></tr>
<tr><td>fwhm</td><td colspan=2>z</td><td>3.723705</td></tr>
<tr><td colspan=3>gcor</td><td>0.00732913</td></tr>
<tr><td>gsr</td><td colspan=2>x</td><td>-0.001967049203813076</td></tr>
<tr><td>gsr</td><td colspan=2>y</td><td>0.05229538306593895</td></tr>
<tr><td>size</td><td colspan=2>t</td><td>150</td></tr>
<tr><td>size</td><td colspan=2>x</td><td>96</td></tr>
<tr><td>size</td><td colspan=2>y</td><td>96</td></tr>
<tr><td>size</td><td colspan=2>z</td><td>75</td></tr>
<tr><td colspan=3>snr</td><td>2.074117672639913</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>98.6492</td></tr>
<tr><td>summary</td><td>bg</td><td>mad</td><td>60.4803</td></tr>
<tr><td>summary</td><td>bg</td><td>mean</td><td>523.5505</td></tr>
<tr><td>summary</td><td>bg</td><td>median</td><td>232.0</td></tr>
<tr><td>summary</td><td>bg</td><td>n</td><td>505071.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p05</td><td>177.0</td></tr>
<tr><td>summary</td><td>bg</td><td>p95</td><td>2028.0</td></tr>
<tr><td>summary</td><td>bg</td><td>stdv</td><td>981.635</td></tr>
<tr><td>summary</td><td>fg</td><td>k</td><td>0.1606</td></tr>
<tr><td>summary</td><td>fg</td><td>mad</td><td>2810.1639</td></tr>
<tr><td>summary</td><td>fg</td><td>mean</td><td>6749.714</td></tr>
<tr><td>summary</td><td>fg</td><td>median</td><td>6243.0</td></tr>
<tr><td>summary</td><td>fg</td><td>n</td><td>186129.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p05</td><td>2361.0</td></tr>
<tr><td>summary</td><td>fg</td><td>p95</td><td>12316.0</td></tr>
<tr><td>summary</td><td>fg</td><td>stdv</td><td>3009.9465</td></tr>
<tr><td colspan=3>tsnr</td><td>39.90689371293411</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>