Skip to content

Commit

Permalink
Options in 2D rendering
Browse files Browse the repository at this point in the history
Version: 3.0.1
  • Loading branch information
EmineTopcu committed Aug 30, 2024
1 parent c217412 commit b01e423
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 12 deletions.
61 changes: 53 additions & 8 deletions SiliFish.UI/Controls/Display/TwoDRenderControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 20 additions & 2 deletions SiliFish.UI/Controls/Display/TwoDRenderControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,21 @@ internal void RenderIn2D(bool refresh)
//If the full rendering has never been done, a brand new 2D rendering need to be created rather than refreshing the old one
if (refresh && !cb2DHideNonspiking.Checked && !rendered2DFull)
refresh = false;
List<CellPool> cellPools = model.CellPools;
List<CellPool> activePools = model.CellPools.Where(cp => cp.Cells.Any(c => c.IsActivelySpiking(GlobalSettings.ActivityThresholdSpikeCount))).ToList();
List<CellPool> cellPools;//FUTURE - there can be more options, like sensory, supraspinal, etc
if (cb2DInterneuron.Checked && cb2DMotoneuron.Checked && cb2DMuscleCells.Checked)
{
cellPools = model.CellPools;
}
else
{
cellPools = (cb2DMotoneuron.Checked ? model.MotoNeuronPools : []).Concat(
(cb2DInterneuron.Checked ? model.InterNeuronPools : []).Concat(
cb2DMuscleCells.Checked ? model.MusclePools : []
)
).ToList();
}

List<CellPool> activePools = cellPools.Where(cp => cp.Cells.Any(c => c.IsActivelySpiking(GlobalSettings.ActivityThresholdSpikeCount))).ToList();
List<CellPool> inactivePools = cellPools.Except(activePools).ToList();
string html;
if (cb2DHideNonspiking.CheckState == CheckState.Checked && simulation != null && simulation.SimulationRun)
Expand Down Expand Up @@ -208,5 +221,10 @@ private void cb2DHideNonspiking_CheckStateChanged(object sender, EventArgs e)
{
RenderIn2D(true);
}

private void cb2DCellSelection_CheckedChanged(object sender, EventArgs e)
{
RenderIn2D(true);
}
}
}
Binary file modified SiliFish.UI/Resources/BuildDate.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion SiliFish.UI/SiliFish.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Version>3.0.0</Version>
<Version>3.0.1</Version>
<PackageIcon>fishbone2BlueBG.png</PackageIcon>
<ApplicationIcon>Resources\fishbone2BlueBG.ico</ApplicationIcon>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
Expand Down
2 changes: 1 addition & 1 deletion SiliFish/SiliFish.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net8.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<AssemblyVersion></AssemblyVersion>
<Version>3.0.0</Version>
<Version>3.0.1</Version>
<NoWarn>$(NoWarn);SYSLIB1045</NoWarn>
</PropertyGroup>

Expand Down

0 comments on commit b01e423

Please sign in to comment.