On Aug 9, 2018, at 03:29, Zvi Baratz <z.baratz@gmail.com> wrote:
Alright, I built BokehJS locally according to the instructions here and I have a conda env with all the requirements, however when I try to serve the app from that env and use any tools over the image I immediately get the terminal message:
2018-08-09 13:22:14,070 WebSocket connection closed: code=None, reason=None
Maybe it's better I wait for the next published dev-build. Also, do you have a rough estimation of when these fixes might be merged to the official distribution?
Thank you very much,
Zvi
On Wednesday, August 8, 2018 at 10:17:28 PM UTC+3, Bryan Van de ven wrote:
Hi,
You would also have to build BokehJS locally to make use of this from a source checkout, which is a bit of a chore. However, if you don't want to wait until the next release to try things out, we also publish periodic "dev builds" that can be installed via conda or pip:
<no title> — Bokeh 3.3.2 Documentation
we will try to make a new on in the next few days that includes this recent work. Just be advised that the BokehJS resources for dev builds are *NOT* guaranteed to be available forever. i.e. you should not use dev builds for anything published permanently or "for production". They are for testing/evaluation purposes only.
Thanks,
Bryan
> On Aug 8, 2018, at 01:40, Zvi Baratz <z.ba...@gmail.com> wrote:
>
> Hi Philipp,
>
> Awesome! Thank you very much.
> Does that mean I should wait for the next release? Or do I clone the bokeh repo locally and add it to my path..? I'm sorry if it's a silly question, still just getting my bearings 
>
> On Tuesday, August 7, 2018 at 3:47:44 PM UTC+3, Philipp Rudiger wrote:
> Hi Zvi,
>
> This is, I believe a bug, in the way the data is synced on bokeh server. I've opened a PR completely overhauling how the syncing of data is handled for the drawing tools (see https://github.com/bokeh/bokeh/pull/8137\), which should fix your issue. I'll be working on a number of integration tests and hoping to have it be ready to merge later today.
>
> Philipp
>
> On Tuesday, August 7, 2018 at 10:54:04 AM UTC+1, Zvi Baratz wrote:
> Hi Bryan,
>
> Thank you for your reply!
> I am running it as a Bokeh server application. I've uploaded the code to GitHub, it is meant to be used as a GUI application for a flow image correlation spectroscopy (FLICS) analysis which uses two-photon excitation microscopy to learn about blood flow in the brain. The application is meant to be used locally in any lab that has appropriate data (images) and would like to mark regions of interest and run the analysis (in the future perhaps also display a summary of the results). For that, I need to be able to extract the data within a chosen ROI and pass it as input for the analysis, and therefore I'm relying heavily on BoxEditTool. The relevant file is, of course, app/main.py, but please feel free to share any thoughts you may have on the layout of the project so far.
>
> Thanks again! Bokeh is awesome!
> Zvi
>
>
> On Monday, August 6, 2018 at 7:20:14 PM UTC+3, Bryan Van de ven wrote:
> Hi,
>
> Are you running this as a Boeh server application? Getting the coordinates back to python code will only work in the context of a Bokeh server application.
>
> Bryan
>
> > On Aug 5, 2018, at 01:09, Zvi Baratz <z.ba...@gmail.com> wrote:
> >
> > Hi all,
> >
> > I'm trying to work with the BoxEditTool to draw regions of interest (ROIs) on an image. For some reason, it seems the source I set for the Rect glyph instance is not updated after I make the drawings.
> > Code sample:
> >
> > source = ColumnDataSource(data=dict(image=[image]))
> >
> > # Create plot
> > plot = bp.figure(
> >
> > # Plot image
> > plot.image(
> > image='image',
> > x=0,
> > y=0,
> > dw=image.shape[1],
> > dh=image.shape[0],
> > source=source,
> > palette='Spectral11',
> > name='image_plot',
> > )
> >
> > # Add tools
> > hover = HoverTool(tooltips=[('x', '$x'), ('y', '$y'), ('value', '@image')])
> >
> > roi_source = ColumnDataSource(data=dict(
> > x=,
> > y=,
> > width=,
> > height=,
> > ))
> >
> > r1 = plot.rect(
> > x='x',
> > y='y',
> > width='width',
> > height='height',
> > source=sources_dict['roi'],
> > fill_alpha=0.5,
> > fill_color='#DAF7A6',
> > dilate=True,
> > name='rois',
> > )
> >
> > plot.add_tools(
> > hover,
> > BoxSelectTool(),
> > BoxEditTool(renderers=[r1]),
> > LassoSelectTool(),
> > PolySelectTool(),
> > )
> >
> > When I create ROIs and print out the roi_source's data dictionary it returns empty as it was instantiated. I suspect I'm missing something and perhaps defining the source wrong, but I can't seem to find any way to make it return the coordinates and I've started giving up on trying to find an example online.
> >
> > Any thoughts would be appreciated!
> > Thanks and all the best,
> > Zvi
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/71216d5a-f8f3-4dd2-84e1-0e8da9eff185%40continuum.io\.
> > For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/b2098d5d-725f-414a-9709-c8b9e3b3d26d%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5a9f2b52-aa4d-4781-a293-31fc4b1c8b97%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.