Managing visualizers #1569
theparkerlab
started this conversation in
General
Replies: 3 comments 2 replies
-
Hey, Try the Workflow (Copy+Paste me)<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dsp="clr-namespace:Bonsai.Dsp;assembly=Bonsai.Dsp"
xmlns:p1="clr-namespace:Bonsai.Dsp.Design;assembly=Bonsai.Dsp.Design"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:p2="clr-namespace:Bonsai.Design;assembly=Bonsai.Design"
xmlns:cv="clr-namespace:Bonsai.Vision;assembly=Bonsai.Vision"
xmlns:p3="clr-namespace:Bonsai.Vision.Design;assembly=Bonsai.Vision.Design"
xmlns:viz="clr-namespace:Bonsai.Design.Visualizers;assembly=Bonsai.Design.Visualizers"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="dsp:FunctionGenerator">
<dsp:BufferLength>441</dsp:BufferLength>
<dsp:Frequency>150</dsp:Frequency>
<dsp:Waveform>Sine</dsp:Waveform>
<dsp:SampleRate>44100</dsp:SampleRate>
<dsp:Amplitude>1</dsp:Amplitude>
<dsp:Offset>0</dsp:Offset>
<dsp:Phase>0</dsp:Phase>
</Combinator>
</Expression>
<Expression xsi:type="VisualizerMapping">
<VisualizerType xsi:type="TypeMapping" TypeArguments="p1:MatVisualizer" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Range">
<rx:Start>0</rx:Start>
<rx:Count>10</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="VisualizerMapping">
<VisualizerType xsi:type="TypeMapping" TypeArguments="p2:ObjectTextVisualizer" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="cv:CameraCapture">
<cv:Index>0</cv:Index>
<cv:CaptureProperties />
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="cv:Smooth">
<cv:SmoothType>Gaussian</cv:SmoothType>
<cv:Size1>51</cv:Size1>
<cv:Size2>51</cv:Size2>
<cv:Sigma1>111</cv:Sigma1>
<cv:Sigma2>111</cv:Sigma2>
</Combinator>
</Expression>
<Expression xsi:type="VisualizerMapping">
<VisualizerType xsi:type="TypeMapping" TypeArguments="p3:IplImageVisualizer" />
</Expression>
<Expression xsi:type="viz:TableLayoutPanelBuilder">
<viz:ColumnCount>2</viz:ColumnCount>
<viz:RowCount>2</viz:RowCount>
<viz:ColumnStyles />
<viz:RowStyles />
<viz:CellSpans>
<viz:CellSpan ColumnSpan="1" RowSpan="1" />
<viz:CellSpan ColumnSpan="1" RowSpan="1" />
<viz:CellSpan ColumnSpan="2" RowSpan="1" />
</viz:CellSpans>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="7" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="3" To="7" Label="Source2" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="6" To="7" Label="Source3" />
</Edges>
</Workflow>
</WorkflowBuilder>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Thank you both, this is exactly what I was hoping for and a serious game changer! -Phil |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, first off thanks for all of the amazing tools that you all have built with Bonsai! We are using it as the main system for data acquisition in my lab, and overall it has been working great. The one thing that my lab members struggle with regularly is managing visualizers. There are two main issues that pop up the most. First, if you have any sort of grouping (SelectMany, GroupWorkflow, etc.) then if you close the window for that group, any visualizers enabled from nodes within the group disappear. In order to get them back you have to open the grouped workflow again and re-enable the visualizers. Is there any ways to "permanently" enable visualizers so that you can close the grouped workflows and keep the visualizers open? Second, is there anyway to dock the visualizers so that they're not free floating? It's easy for things to get mixed up and lost when you have 10+ visualizers open, and having them all together in one window would make things easier.
Thanks!
Phil
Beta Was this translation helpful? Give feedback.
All reactions