Skip to content

Commit

Permalink
Added subscribe when to start the experiment when the Space key is pr…
Browse files Browse the repository at this point in the history
…essed.
  • Loading branch information
hugo.marques committed Nov 8, 2024
1 parent 1c6f38c commit a4eded5
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p1="clr-namespace:Bonsai.PointGrey;assembly=Bonsai.PointGrey"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:wie="clr-namespace:Bonsai.Windows.Input;assembly=Bonsai.Windows.Input"
xmlns:cv="clr-namespace:Bonsai.Vision;assembly=Bonsai.Vision"
xmlns:bz="clr-namespace:BonZeb;assembly=BonZeb"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:dsp="clr-namespace:Bonsai.Dsp;assembly=Bonsai.Dsp"
xmlns:p1="clr-namespace:;assembly=Extensions"
xmlns:p2="clr-namespace:;assembly=Extensions"
xmlns:io="clr-namespace:Bonsai.IO;assembly=Bonsai.System"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="cv:FileCapture">
<cv:FileName>C:\Users\HugoMarques\Documents\Code\MyReps\cf.labs\Vasconcelos\MatingIdentification-INDP2024\MatingIdentification\data\Video1.avi</cv:FileName>
<cv:PlaybackRate>8246337208320</cv:PlaybackRate>
<cv:StartPosition>0</cv:StartPosition>
<cv:PositionUnits>Frames</cv:PositionUnits>
<cv:Loop>false</cv:Loop>
<cv:Playing>true</cv:Playing>
<Combinator xsi:type="p1:FlyCapture">
<p1:Index>0</p1:Index>
<p1:ColorProcessing>Default</p1:ColorProcessing>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>Image</Selector>
</Expression>
<Expression xsi:type="rx:BehaviorSubject">
<Name>Frames</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Frames</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="wie:KeyDown">
<wie:Filter>Space</wie:Filter>
<wie:SuppressRepetitions>false</wie:SuppressRepetitions>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:SubscribeWhen" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="cv:Grayscale" />
</Expression>
Expand Down Expand Up @@ -136,8 +152,8 @@
<Property Name="ExpectedConnectedComponents" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:BinaryRegionsTracking">
<p1:ExpectedConnectedComponents>6</p1:ExpectedConnectedComponents>
<Combinator xsi:type="p2:BinaryRegionsTracking">
<p2:ExpectedConnectedComponents>6</p2:ExpectedConnectedComponents>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
Expand Down Expand Up @@ -362,8 +378,8 @@
<Combinator xsi:type="rx:WithLatestFrom" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:MultiVisualizer">
<p1:RadiusSize>30</p1:RadiusSize>
<Combinator xsi:type="p2:MultiVisualizer">
<p2:RadiusSize>30</p2:RadiusSize>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
Expand Down Expand Up @@ -517,42 +533,46 @@
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="1" To="24" Label="Source1" />
<Edge From="1" To="32" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="3" To="5" Label="Source1" />
<Edge From="4" To="5" Label="Source2" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="5" To="23" Label="Source1" />
<Edge From="5" To="28" Label="Source1" />
<Edge From="5" To="30" Label="Source1" />
<Edge From="6" To="7" Label="Source1" />
<Edge From="6" To="29" Label="Source1" />
<Edge From="6" To="37" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
<Edge From="9" To="10" Label="Source1" />
<Edge From="8" To="10" Label="Source1" />
<Edge From="9" To="10" Label="Source2" />
<Edge From="10" To="11" Label="Source1" />
<Edge From="10" To="13" Label="Source1" />
<Edge From="10" To="15" Label="Source1" />
<Edge From="10" To="17" Label="Source1" />
<Edge From="10" To="19" Label="Source1" />
<Edge From="10" To="28" Label="Source1" />
<Edge From="10" To="33" Label="Source1" />
<Edge From="10" To="35" Label="Source1" />
<Edge From="11" To="12" Label="Source1" />
<Edge From="12" To="21" Label="Source1" />
<Edge From="12" To="13" Label="Source1" />
<Edge From="13" To="14" Label="Source1" />
<Edge From="14" To="21" Label="Source2" />
<Edge From="14" To="15" Label="Source1" />
<Edge From="15" To="16" Label="Source1" />
<Edge From="16" To="21" Label="Source3" />
<Edge From="17" To="18" Label="Source1" />
<Edge From="18" To="21" Label="Source4" />
<Edge From="19" To="20" Label="Source1" />
<Edge From="20" To="21" Label="Source5" />
<Edge From="21" To="22" Label="Source1" />
<Edge From="23" To="24" Label="Source2" />
<Edge From="23" To="27" Label="Source1" />
<Edge From="15" To="18" Label="Source1" />
<Edge From="15" To="20" Label="Source1" />
<Edge From="15" To="22" Label="Source1" />
<Edge From="15" To="24" Label="Source1" />
<Edge From="16" To="17" Label="Source1" />
<Edge From="17" To="26" Label="Source1" />
<Edge From="18" To="19" Label="Source1" />
<Edge From="19" To="26" Label="Source2" />
<Edge From="20" To="21" Label="Source1" />
<Edge From="21" To="26" Label="Source3" />
<Edge From="22" To="23" Label="Source1" />
<Edge From="23" To="26" Label="Source4" />
<Edge From="24" To="25" Label="Source1" />
<Edge From="25" To="26" Label="Source1" />
<Edge From="28" To="29" Label="Source1" />
<Edge From="25" To="26" Label="Source5" />
<Edge From="26" To="27" Label="Source1" />
<Edge From="28" To="29" Label="Source2" />
<Edge From="28" To="32" Label="Source1" />
<Edge From="29" To="30" Label="Source1" />
<Edge From="30" To="31" Label="Source1" />
<Edge From="33" To="34" Label="Source1" />
<Edge From="35" To="36" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,76 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<DialogSettings>
<Visible>true</Visible>
<Visible>false</Visible>
<Location>
<X>703</X>
<Y>550</Y>
<X>0</X>
<Y>0</Y>
</Location>
<Size>
<Width>339</Width>
<Height>362</Height>
<Width>0</Width>
<Height>0</Height>
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
<DialogSettings>
<Visible>false</Visible>
<Location>
<X>0</X>
<Y>0</Y>
</Location>
<Size>
<Width>0</Width>
<Height>0</Height>
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
<DialogSettings>
<Visible>false</Visible>
<Location>
<X>0</X>
<Y>0</Y>
</Location>
<Size>
<Width>0</Width>
<Height>0</Height>
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
<DialogSettings>
<Visible>false</Visible>
<Location>
<X>0</X>
<Y>0</Y>
</Location>
<Size>
<Width>0</Width>
<Height>0</Height>
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
<DialogSettings>
<Visible>false</Visible>
<Location>
<X>0</X>
<Y>0</Y>
</Location>
<Size>
<Width>0</Width>
<Height>0</Height>
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
<DialogSettings>
<Visible>false</Visible>
<Location>
<X>0</X>
<Y>0</Y>
</Location>
<Size>
<Width>0</Width>
<Height>0</Height>
</Size>
<WindowState>Normal</WindowState>
<VisualizerTypeName>Bonsai.Vision.Design.FileCaptureVisualizer</VisualizerTypeName>
<VisualizerSettings>
<FileCaptureVisualizer />
</VisualizerSettings>
</DialogSettings>
<DialogSettings>
<Visible>false</Visible>
Expand Down

0 comments on commit a4eded5

Please sign in to comment.