Skip to content

Commit

Permalink
4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BiologyTools committed Aug 1, 2024
1 parent 405d16e commit 45bad40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 2 additions & 4 deletions BioCore/Source/Fiji.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,10 @@ public static string ImageJMacroPath
private static Random rng = new Random();
public static void RunImageJ(string file, string param)
{
Console.WriteLine("RunImageJ(" + file + "," + param);
ImagePlus ip = ImageJ.GetImagePlus(ImageView.SelectedImage);
Console.WriteLine("ImageJ.GetImagePlus(" + ImageView.SelectedImage.ToString() + ")");
WindowManager.setTempCurrentImage(ip);
Console.WriteLine("WindowManager.setTempCurrentImage(" +ip.ToString() + ")");
IJ.runMacroFile(file, param);
ImageView.SelectedImage = ImageJ.GetBioImage(ip, ImageView.SelectedImage.Volume, ImageView.SelectedImage.PhysicalSizeX, ImageView.SelectedImage.PhysicalSizeY, ImageView.SelectedImage.PhysicalSizeZ);

}
/// It runs a macro in ImageJ
///
Expand Down Expand Up @@ -223,6 +219,7 @@ public static void RunString(string con, string param, bool headless)
IJ.runMacro(con, param);
ImageView.SelectedImage = ImageJ.GetBioImage(ip, ImageView.SelectedImage.Volume,ImageView.SelectedImage.PhysicalSizeX, ImageView.SelectedImage.PhysicalSizeY, ImageView.SelectedImage.PhysicalSizeZ);
}
BioLib.Recorder.Record(BioLib.Recorder.GetCurrentMethodInfo(), false, con, param, headless);
}
/// It runs a macro on the current image, saves the result as a new image, and then opens the
/// new image in a new tab
Expand Down Expand Up @@ -323,6 +320,7 @@ public static void RunOnImage(string con, int index, bool headless, bool onTab,
Console.WriteLine(e.Message.ToString());
}
}
BioLib.Recorder.Record(BioLib.Recorder.GetCurrentMethodInfo(), false, con, index, headless, onTab, bioformats, resultInNewTab);
}
public static void RunOnImage(string s)
{
Expand Down
16 changes: 10 additions & 6 deletions BioCore/Source/Recorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ private void clearBut_Click(object sender, EventArgs e)
log = "";
}

/// It takes the text in the textbox, splits it into an array of strings, then creates a new array of
/// strings that is one element shorter than the original array, and then copies the original array into
/// the new array, and then sets the textbox's text to the new array
///
/// @param sender The object that raised the event.
/// @param EventArgs The EventArgs class is the base class for classes containing event data.
/// It takes the text in the textbox, splits it into an array of strings, then creates a new array of
/// strings that is one element shorter than the original array, and then copies the original array into
/// the new array, and then sets the textbox's text to the new array
///
/// @param sender The object that raised the event.
/// @param EventArgs The EventArgs class is the base class for classes containing event data.
private void delLineBut_Click(object sender, EventArgs e)
{
string[] sts = textBox.Lines;
Expand Down Expand Up @@ -76,6 +76,10 @@ private void topMostBox_CheckedChanged(object sender, EventArgs e)
/// @param EventArgs The EventArgs class is the base class for classes containing event data.
private void Recorder_Activated(object sender, EventArgs e)
{
foreach (string s in BioLib.Recorder.Lines)
{
log += s + Environment.NewLine;
}
textBox.Text = log;
}

Expand Down

0 comments on commit 45bad40

Please sign in to comment.