[ome-users] [ome/training-scripts] javascript figure_splitview_layout

William Moore (Staff) W.Moore at dundee.ac.uk
Fri Sep 28 16:00:09 BST 2018


Hi,

 Thanks for the feedback and bug report.
I have a fix proposed which works for me:

figureModel.getSelected().forEach(p => {
    var j = p.toJSON();
    for (var c=0; c<j.channels.length; c++){
        // offset to the right each time we create a new panel
        j.x = j.x + (j.width * 1.05);
        // turn all channels off except for the current index
        j.channels = j.channels.map((ch, i) => {
            var newc = Object.assign({}, ch);
            newc.active = i === c;
            return newc;
        });
        // create new panel from json
        figureModel.panels.create(j);
    };
});

I’ve opened a fix with this code at https://github.com/ome/training-scripts/pull/42. It’s not yet been tested by
the OME team, but let us know if it works for you.

  Many thanks,

  Will.



On 28 Sep 2018, at 13:33, Etienne Schmelzer <e.schmelzer at unibas.ch<mailto:e.schmelzer at unibas.ch>> wrote:

Dear Ome-team,
I recently noted a weird, little bug in omero.figure:
By using your javascript  for generating split figures in omero.figure: https://github.com/ome/training-scripts/blob/master/practical/javascript/figure_splitview_layout.js
A splitfigure is generated, where the images show the exact colours, but the “official” channel settings are set to the last channel settings.
Means, as soon one is changing the intensities of all pictures, they will only show the last channel, in this case red.
You are doing amazing work!! Thank you very much for generating so awesome tools, your support and help!!
All the Best
Etienne

<image001.png>

Etienne Schmelzer | PhD student
University of Basel | Biozentrum | Growth & Development | 200
Klingelbergstr. 50/70 | 4056 Basel | Switzerland
phone +41 61 207 20 77 | mobile +41 77 965 87 60
email e.schmelzer at unibas.ch<mailto:e.schmelzer at unibas.ch> | www.biozentrum.unibas.ch<http://www.biozentrum.unibas.ch/>


From: jean-marie burel <notifications at github.com<mailto:notifications at github.com>>
Reply-To: ome/training-scripts <noreply at github.com<mailto:noreply at github.com>>
Date: Friday, 28 September 2018 at 13:01
To: ome/training-scripts <training-scripts at noreply.github.com<mailto:training-scripts at noreply.github.com>>
Cc: Push <push at noreply.github.com<mailto:push at noreply.github.com>>
Subject: Re: [ome/training-scripts] matlab example (#41)


@jburel<https://github.com/jburel> pushed 1 commit.

  *   b9fbe27<https://github.com/ome/training-scripts/commit/b9fbe27> Add results to CSV

—
You are receiving this because you are subscribed to this thread.
View it on GitHub<https://github.com/ome/training-scripts/pull/41/files/c8c80a2ca66d1872ded3eda3bba4bce37d149494..b9fbe2720903eba5625b69d306f42969e707457a> or mute the thread<https://github.com/notifications/unsubscribe-auth/AmEHE1hO85UYwC6VoVKa0FzeZax0l8Tzks5ufgF7gaJpZM4WlJ-6>.

_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20180928/2d4faf14/attachment.html>


More information about the ome-users mailing list