Skip to content

Commit

Permalink
2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BiologyTools committed Feb 27, 2023
1 parent 28da4a7 commit 4cfff91
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 17 deletions.
10 changes: 6 additions & 4 deletions BioGTK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
<RuntimeIdentifiers>osx-x64;linux-x64;win7-x64;linux-arm64</RuntimeIdentifiers>
<AssemblyVersion>2.2.0</AssemblyVersion>
<FileVersion>2.2.0</FileVersion>
<AssemblyVersion>2.3.0</AssemblyVersion>
<FileVersion>2.3.0</FileVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>BioGTK</PackageId>
<Title>BioGTK</Title>
<PackageProjectUrl>https://github.com/BiologyTools/BioGTK</PackageProjectUrl>
<PackageIcon>banner.jpg</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageVersion>2.2.0</PackageVersion>
<PackageVersion>2.3.0</PackageVersion>
<RepositoryUrl>https://github.com/BiologyTools/BioGTK</RepositoryUrl>
<PackageTags>Biology; GTK; ImageJ; Bio-Formats; Image-Stacks; Microscopy;</PackageTags>
<PackageLicenseExpression> GPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Description>A .NET application &amp; library for editing &amp; annotating various microscopy image formats. Supports all bioformats supported images. Integrates with ImageJ, running ImageJ filters &amp; macro functions. Supports Windows, Linux and Mac.</Description>
<Version>2.2.0</Version>
<Version>2.3.0</Version>
<Platforms>AnyCPU;x64;ARM64</Platforms>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down Expand Up @@ -47,6 +47,7 @@
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<ItemGroup>
<None Remove="bioformats_package.dll" />
<None Remove="Glade\About.glade" />
<None Remove="Glade\ApplyFilter.glade" />
<None Remove="Glade\BioConsole.glade" />
Expand Down Expand Up @@ -75,6 +76,7 @@
</ItemGroup>

<ItemGroup>
<Content Include="bioformats_package.dll" />
<Content Include="Resources\banner.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>True</Pack>
Expand Down
2 changes: 1 addition & 1 deletion Glade/BioConsole.glade
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
</packing>
</child>
<child>
<object class="GtkCheckButton" id="resultBox">
<object class="GtkCheckButton" id="resultsBox">
<property name="label" translatable="yes">Open Result in New Tab</property>
<property name="width-request">100</property>
<property name="visible">True</property>
Expand Down
23 changes: 18 additions & 5 deletions Glade/Console.glade
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<property name="receives-default">True</property>
</object>
<packing>
<property name="x">381</property>
<property name="x">400</property>
<property name="y">7</property>
</packing>
</child>
Expand All @@ -70,7 +70,7 @@
<property name="receives-default">True</property>
</object>
<packing>
<property name="x">278</property>
<property name="x">293</property>
<property name="y">8</property>
</packing>
</child>
Expand Down Expand Up @@ -98,7 +98,7 @@
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="x">110</property>
<property name="x">89</property>
<property name="y">6</property>
</packing>
</child>
Expand All @@ -120,15 +120,28 @@
<child>
<object class="GtkRadioButton" id="tabRadioBut">
<property name="label" translatable="yes">Tab</property>
<property name="width-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">selRadioBut</property>
</object>
<packing>
<property name="x">110</property>
<property name="x">81</property>
<property name="y">29</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="resultsBox">
<property name="label" translatable="yes">Open Result in New Tab</property>
<property name="width-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="x">134</property>
<property name="y">29</property>
</packing>
</child>
Expand Down
1 change: 1 addition & 0 deletions Glade/Console.glade~
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">selRadioBut</property>
</object>
<packing>
<property name="x">110</property>
Expand Down
9 changes: 8 additions & 1 deletion Source/BioConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class BioConsole : Window
public static bool onTab = false;
public static bool useBioformats = false;
public static bool headless = false;
public static bool resultInNewTab = false;
int line = 0;
#pragma warning disable 649
[Builder.Object]
Expand Down Expand Up @@ -67,12 +68,18 @@ protected void SetupHandlers()
imagejBut.Clicked += ImagejBut_Clicked;
headlessBox.Clicked += HeadlessBox_Clicked;
bioformatsBox.Clicked += BioformatsBox_Clicked;
resultsBox.Clicked += ResultsBox_Clicked;
selRadioBut.Clicked += SelRadioBox_Clicked;
tabRadioBut.Clicked += TabRadioBox_Clicked;
this.KeyPressEvent += Console_KeyPressEvent;
this.DeleteEvent += BioConsole_DeleteEvent;
}

private void ResultsBox_Clicked(object sender, EventArgs e)
{
throw new NotImplementedException();
}

private void BioConsole_DeleteEvent(object o, DeleteEventArgs args)
{
Hide();
Expand Down Expand Up @@ -126,7 +133,7 @@ private void ImagejBut_Clicked(object sender, EventArgs e)
{
if (ImageView.SelectedImage == null)
return;
ImageJ.RunOnImage(textBox.Buffer.Text, headless, onTab, useBioformats);
ImageJ.RunOnImage(textBox.Buffer.Text, headless, onTab, useBioformats, resultsBox.Active);
consoleBox.Buffer.Text += textBox.Buffer.Text + Environment.NewLine;
textBox.Buffer.Text = "";
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public object PerformFunction(bool imagej)
}
if (FuncType == Function.FunctionType.ImageJ)
{
ImageJ.RunOnImage(script, false, BioConsole.onTab, BioConsole.useBioformats);
ImageJ.RunOnImage(script, false, BioConsole.onTab, BioConsole.useBioformats, BioConsole.resultInNewTab);
}
return null;
}
Expand Down
10 changes: 5 additions & 5 deletions Source/ImageJ.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static void RunString(string con, string param, bool headless)
/// image is opened using the default imagej open command.
///
/// @return The image is being returned as a new tab.
public static void RunOnImage(string con, bool headless, bool onTab, bool bioformats)
public static void RunOnImage(string con, bool headless, bool onTab, bool bioformats, bool resultInNewTab)
{
if (ImageJPath == "")
{
Expand Down Expand Up @@ -140,13 +140,13 @@ public static void RunOnImage(string con, bool headless, bool onTab, bool biofor
//If not in images we add it to a new tab.
if (Images.GetImage(ffile) == null)
{
BioImage.OpenFile(ffile, false);
BioImage.OpenFile(ffile, resultInNewTab);
}
else
{
BioImage b = BioImage.OpenFile(ffile, false);
ImageView.SelectedImage.Buffers = b.Buffers;
Image
//BioImage b = BioImage.OpenFile(ffile, false);
Images.UpdateImage(ffile,BioImage.OpenFile(ffile));
Images.GetImage(ffile).Update();
}
App.viewer.UpdateImage();
App.viewer.UpdateView();
Expand Down
Binary file added bioformats_package.dll
Binary file not shown.

0 comments on commit 4cfff91

Please sign in to comment.