Skip to content

Commit

Permalink
4.2.0 ImageJ.NET Implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
BiologyTools committed Aug 1, 2024
1 parent 5a371b1 commit df7a8dc
Show file tree
Hide file tree
Showing 9 changed files with 2,007 additions and 1,621 deletions.
14 changes: 0 additions & 14 deletions BioCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BioCoreApp", "..\BioCoreApp
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "BioCoreSetup", "..\BioCoreSetup\BioCoreSetup\BioCoreSetup.vdproj", "{9F71BCBA-FB42-48F3-8CE2-B492365008A6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BioLib", "..\BioLib\BioLib.csproj", "{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -57,18 +55,6 @@ Global
{9F71BCBA-FB42-48F3-8CE2-B492365008A6}.Release|x64.Build.0 = Release
{9F71BCBA-FB42-48F3-8CE2-B492365008A6}.Release|x86.ActiveCfg = Release
{9F71BCBA-FB42-48F3-8CE2-B492365008A6}.Release|x86.Build.0 = Release
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Debug|x64.ActiveCfg = Debug|x64
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Debug|x64.Build.0 = Debug|x64
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Debug|x86.ActiveCfg = Debug|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Debug|x86.Build.0 = Debug|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Release|Any CPU.Build.0 = Release|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Release|x64.ActiveCfg = Release|x64
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Release|x64.Build.0 = Release|x64
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Release|x86.ActiveCfg = Release|Any CPU
{C7A4FE0F-B632-48C8-AFD4-573973CC7E92}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 1 addition & 3 deletions BioCore/BioCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BioLib" Version="2.5.0" />
<PackageReference Include="FlaUI.Core" Version="4.0.0" />
<PackageReference Include="FlaUI.UIA3" Version="4.0.0" />
<PackageReference Include="H.InputSimulator" Version="1.4.2" />
Expand Down Expand Up @@ -121,9 +122,6 @@
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\BioLib\BioLib.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="AForge.Bitmap">
<Alias>Bitmap</Alias>
Expand Down
6 changes: 3 additions & 3 deletions BioCore/Source/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static void Initialize(bool requireImageJ = false)
{
BioImage.Initialize();
Microscope.Initialize();
ImageJ.Initialize();
Fiji.Initialize(requireImageJ);
tabsView = new TabsView();
viewer = new ImageView();
stackTools = new StackTools();
Expand Down Expand Up @@ -384,8 +384,8 @@ private static void ItemClicked(object sender, EventArgs e)
}
else if (ts.Text.EndsWith(".ijm"))
{
string s = File.ReadAllText(Path.GetDirectoryName(ImageJ.ImageJPath) + "/macros/" + ts.Text);
ImageJ.RunOnImage(s, BioConsole.headless, BioConsole.onTab, BioConsole.useBioformats, BioConsole.newTab);
string s = File.ReadAllText(Path.GetDirectoryName(Fiji.ImageJPath) + "/macros/" + ts.Text);
Fiji.RunOnImage(s, BioConsole.headless, BioConsole.onTab, BioConsole.useBioformats, BioConsole.newTab);
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions BioCore/Source/BioConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private void imagejBut_Click(object sender, EventArgs e)
{
if (ImageView.SelectedImage == null)
return;
ImageJ.RunOnImage(textBox.Text, headlessBox.Checked, tabRadioBut.Checked, biofBox.Checked, newTabBox.Checked);
Fiji.RunOnImage(textBox.Text, headlessBox.Checked, tabRadioBut.Checked, biofBox.Checked, newTabBox.Checked);
consoleBox.Text += textBox.Text + Environment.NewLine;
textBox.Text = "";
string filename = "";
Expand Down Expand Up @@ -169,12 +169,12 @@ private void textBox_TextChanged(object sender, EventArgs e)
preds.Clear();
i = 0;
ind = -1;
foreach (var cs in ImageJ.Macro.Commands)
foreach (var cs in Fiji.Macro.Commands)
{
if (cs.Value.Name.StartsWith(pred))
preds.Add(cs.Value.Name);
}
foreach (var cs in ImageJ.Macro.Functions)
foreach (var cs in Fiji.Macro.Functions)
{
if (cs.Value[0].Name.StartsWith(pred))
preds.Add(cs.Value[0].Name);
Expand Down
12 changes: 6 additions & 6 deletions BioCore/Source/ColorTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ public ColorS Color
colors = value;
}
}
/*

/// It updates the GUI
public void UpdateGUI()
{
color = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
colorPanel.BackColor = System.Drawing.Color.FromArgb(color.R / ushort.MaxValue,color.G / ushort.MaxValue,color.B / ushort.MaxValue);
colors = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
colorPanel.BackColor = System.Drawing.Color.FromArgb(colors.R / ushort.MaxValue,colors.G / ushort.MaxValue,colors.B / ushort.MaxValue);
if (rBar.Value != redBox.Value)
redBox.Value = rBar.Value;
if (gBar.Value != greenBox.Value)
greenBox.Value = gBar.Value;
if (bBar.Value != blueBox.Value)
blueBox.Value = bBar.Value;
}
*/

/* A constructor. */
public ColorTool()
{
Expand All @@ -50,8 +50,8 @@ public ColorTool()
public ColorTool(ColorS col, int bitPerPixel)
{
InitializeComponent();
this.bitsPerPixel = bitPerPixel;
if(bitsPerPixel == 8)
this.bitsPerPx = bitPerPixel;
if(bitsPerPx == 8)
{
rBar.Maximum = 255;
gBar.Maximum = 255;
Expand Down
Loading

0 comments on commit df7a8dc

Please sign in to comment.