{% autoescape None %}
{% extends template.html %}
{% block jsinit %}
    var viewer, subjects, datasets, figure, sock, viewopts;
{% end %}
{% block onload %}
        viewopts = {{viewopts}};
        subjects = {{subjects}};
        for (var name in subjects) {
            subjects[name] = new mriview.Surface(subjects[name]);
        }

        figure = new jsplot.W2Figure();
        viewer = figure.add(mriview.Viewer, "main", true);

        dataviews = dataset.fromJSON({{data}});
        viewer.addData(dataviews);
{% end %}
