From 5a371b1094d5fa0f29f57800ca89befa07c5dda7 Mon Sep 17 00:00:00 2001 From: Erik Repo Date: Tue, 30 Jul 2024 17:45:45 +0300 Subject: [PATCH] 4.2.0 --- BioCore.sln | 22 +++++++++--- BioCore/BioCore.csproj | 4 ++- BioCore/Source/ColorTool.cs | 11 +++--- BioCore/Source/ImageJ.cs | 18 ++++------ BioCore/Source/ImageView.cs | 55 ++++++++++++++++------------- BioCore/Source/TabsView.cs | 20 +++++++---- BioCore/Source/TabsView.designer.cs | 51 +++++++++++++++----------- 7 files changed, 109 insertions(+), 72 deletions(-) diff --git a/BioCore.sln b/BioCore.sln index d1930d8..604e07f 100644 --- a/BioCore.sln +++ b/BioCore.sln @@ -9,6 +9,8 @@ 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 @@ -19,8 +21,8 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|Any CPU.ActiveCfg = Debug|x64 - {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|Any CPU.Build.0 = Debug|x64 + {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|Any CPU.Build.0 = Debug|Any CPU {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|x64.ActiveCfg = Debug|x64 {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|x64.Build.0 = Debug|x64 {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Debug|x86.ActiveCfg = Debug|x86 @@ -31,8 +33,8 @@ Global {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Release|x64.Build.0 = Release|x64 {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Release|x86.ActiveCfg = Release|x86 {9A5177C9-401B-44C3-8F2E-D4327A25DDCC}.Release|x86.Build.0 = Release|x86 - {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|Any CPU.ActiveCfg = Debug|x64 - {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|Any CPU.Build.0 = Debug|x64 + {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|x64.ActiveCfg = Debug|Any CPU {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|x64.Build.0 = Debug|Any CPU {633C711A-2C74-4DEE-9DA1-E2E2D7132E1B}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -55,6 +57,18 @@ 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 diff --git a/BioCore/BioCore.csproj b/BioCore/BioCore.csproj index 00f3c7d..ed95f5a 100644 --- a/BioCore/BioCore.csproj +++ b/BioCore/BioCore.csproj @@ -63,7 +63,6 @@ - @@ -122,6 +121,9 @@ \ + + + Bitmap diff --git a/BioCore/Source/ColorTool.cs b/BioCore/Source/ColorTool.cs index 473a6f4..ea219c1 100644 --- a/BioCore/Source/ColorTool.cs +++ b/BioCore/Source/ColorTool.cs @@ -12,21 +12,21 @@ namespace BioCore { public partial class ColorTool : Form { - private ColorS color = new ColorS(65535, 65535, 65535); - private int bitsPerPixel = 16; + private ColorS colors = new ColorS(65535, 65535, 65535); + private int bitsPerPx = 16; /* A property. */ public ColorS Color { get { - return color; + return colors; } set { - color = value; + colors = value; } } - +/* /// It updates the GUI public void UpdateGUI() { @@ -39,6 +39,7 @@ public void UpdateGUI() if (bBar.Value != blueBox.Value) blueBox.Value = bBar.Value; } + */ /* A constructor. */ public ColorTool() { diff --git a/BioCore/Source/ImageJ.cs b/BioCore/Source/ImageJ.cs index b242e55..986e085 100644 --- a/BioCore/Source/ImageJ.cs +++ b/BioCore/Source/ImageJ.cs @@ -7,8 +7,7 @@ using System.IO; using CSScripting; using AForge; -using Color = AForge.Color; -using RectangleD = AForge.RectangleD; +using BioLib; namespace BioCore { public class ImageJ @@ -99,7 +98,7 @@ internal static void Initialize() } public static List Macros = new List(); public static List processes = new List(); - public static string ImageJPath = Settings.GetSettings("ImageJPath"); + public static string ImageJPath = Properties.Settings.Default.ImageJPath; private static Random rng = new Random(); static bool init = false; public static bool Initialized { get { return init; } private set { } } @@ -274,10 +273,7 @@ public static bool SetImageJPath() return true; } else - { - ImageJPath = Properties.Settings.Default.ImageJPath; return true; - } } /* It reads a binary file and returns a ROI object */ @@ -726,14 +722,14 @@ void getStrokeWidthAndColor(ROI roi, int hdr2Offset, bool scaleStrokeWidth) if (strokeColor != 0) { byte[] bts = BitConverter.GetBytes(strokeColor); - Color c = Color.FromArgb(bts[0], bts[1], bts[2], bts[3]); + AForge.Color c = AForge.Color.FromArgb(bts[0], bts[1], bts[2], bts[3]); roi.strokeColor = c; } int fillColor = getInt(FILL_COLOR); if (fillColor != 0) { byte[] bts = BitConverter.GetBytes(strokeColor); - Color c = Color.FromArgb(bts[0], bts[1], bts[2], bts[3]); + AForge.Color c = AForge.Color.FromArgb(bts[0], bts[1], bts[2], bts[3]); roi.fillColor = c; } } @@ -1411,10 +1407,10 @@ void saveStrokeWidthAndColor(ROI roi) //BasicStroke stroke = roi.getStroke(); //if (stroke != null) putShort(RoiDecoder.STROKE_WIDTH, (int)roi.strokeWidth); - Color strokeColor = roi.strokeColor; + AForge.Color strokeColor = roi.strokeColor; int intColor = (strokeColor.R << 16) | (strokeColor.G << 8) | (strokeColor.B); putInt(RoiDecoder.STROKE_COLOR, 0); - Color fillColor = roi.fillColor; + AForge.Color fillColor = roi.fillColor; int intFillColor = (fillColor.R << 16) | (fillColor.G << 8) | (fillColor.B); putInt(RoiDecoder.FILL_COLOR, 0); } @@ -1553,7 +1549,7 @@ void putHeader2(ROI roi, int hdr2Offset) putInt(hdr2Offset + RoiDecoder.Z_POSITION, roi.coord.Z + 1); putInt(hdr2Offset + RoiDecoder.T_POSITION, roi.coord.T + 1); //Overlay proto = roi.getPrototypeOverlay(); - Color overlayLabelColor = roi.strokeColor; //proto.getLabelColor(); + AForge.Color overlayLabelColor = roi.strokeColor; //proto.getLabelColor(); int intColor = (overlayLabelColor.R << 16) | (overlayLabelColor.G << 8) | (overlayLabelColor.B); //if (overlayLabelColor != null) putInt(hdr2Offset + RoiDecoder.OVERLAY_LABEL_COLOR, 0); diff --git a/BioCore/Source/ImageView.cs b/BioCore/Source/ImageView.cs index 11ea428..fa4db33 100644 --- a/BioCore/Source/ImageView.cs +++ b/BioCore/Source/ImageView.cs @@ -313,34 +313,42 @@ public void AddImage(BioImage im) /// private void InitPreview() { - if (SelectedImage.Resolutions.Count == 1) + if (!SelectedImage.isPyramidal) return; overview = new Rectangle(0, 0, 120, 120); - Resolution res; - if (!MacroResolution.HasValue) - res = SelectedImage.Resolutions.Last(); - else - res = SelectedImage.Resolutions[MacroResolution.Value]; - int aspx = res.SizeX / 10; - int aspy = res.SizeY / 10; - overview = new Rectangle(0, 0, aspx, aspy); - Bitmap bm; - ResizeNearestNeighbor re = new ResizeNearestNeighbor(overview.Width, overview.Height); - byte[] bts; - Bitmap bf; - if (_openSlideBase != null) - { - bts = _openSlideBase.GetSlice(new OpenSlideGTK.SliceInfo(0, 0, res.SizeX, res.SizeY, SelectedImage.GetUnitPerPixel(SelectedImage.Resolutions.Count - 1))); - bf = new Bitmap((int)Math.Round(OpenSlideBase.destExtent.Width), (int)Math.Round(OpenSlideBase.destExtent.Height), PixelFormat.Format24bppRgb, bts, new ZCT(), ""); + if (MacroResolution.HasValue) + { + double aspx = (double)SelectedImage.Resolutions[MacroResolution.Value - 1].SizeX / (double)SelectedImage.Resolutions[MacroResolution.Value - 1].SizeY; + double aspy = (double)SelectedImage.Resolutions[MacroResolution.Value - 1].SizeY / (double)SelectedImage.Resolutions[MacroResolution.Value - 1].SizeX; + overview = new Rectangle(0, 0, (int)(aspx * 120), (int)(aspy * 120)); + Bitmap bm = BioImage.GetTile(SelectedImage, GetCoordinate(), MacroResolution.Value - 1, 0, 0, SelectedImage.Resolutions[MacroResolution.Value - 1].SizeX, SelectedImage.Resolutions[MacroResolution.Value - 1].SizeY); + ResizeNearestNeighbor re = new ResizeNearestNeighbor(overview.Width, overview.Height); + Bitmap bmp = re.Apply((Bitmap)bm.ImageRGB); + overviewBitmap = bmp; } else { - bts = _slideBase.GetSlice(new BioLib.SliceInfo(0, 0, res.SizeX, res.SizeY, SelectedImage.GetUnitPerPixel(SelectedImage.Resolutions.Count - 1), GetCoordinate())).Result; - bf = new Bitmap((int)Math.Round(SlideBase.destExtent.Width), (int)Math.Round(SlideBase.destExtent.Height), PixelFormat.Format24bppRgb, bts, new ZCT(), ""); + Resolution res = SelectedImage.Resolutions.Last(); + double aspx = (double)res.SizeX / (double)res.SizeY; + double aspy = (double)res.SizeY / (double)res.SizeX; + overview = new Rectangle(0, 0, (int)(aspx * 120), (int)(aspy * 120)); + Bitmap bm; + ResizeNearestNeighbor re = new ResizeNearestNeighbor(overview.Width, overview.Height); + byte[] bts; + Bitmap bf; + if (_openSlideBase != null) + { + bts = _openSlideBase.GetSlice(new OpenSlideGTK.SliceInfo(PyramidalOrigin.X, PyramidalOrigin.Y, SelectedImage.PyramidalSize.Width, SelectedImage.PyramidalSize.Height, SelectedImage.GetUnitPerPixel(Level))); + bf = new Bitmap((int)Math.Round(OpenSlideBase.destExtent.Width), (int)Math.Round(OpenSlideBase.destExtent.Height), PixelFormat.Format24bppRgb, bts, new ZCT(), ""); + } + else + { + bts = _slideBase.GetSlice(new BioLib.SliceInfo(PyramidalOrigin.X, PyramidalOrigin.Y, SelectedImage.PyramidalSize.Width, SelectedImage.PyramidalSize.Height, SelectedImage.GetUnitPerPixel(Level), GetCoordinate())).Result; + bf = new Bitmap((int)Math.Round(SlideBase.destExtent.Width), (int)Math.Round(SlideBase.destExtent.Height), PixelFormat.Format24bppRgb, bts, new ZCT(), ""); + } + bm = re.Apply((Bitmap)bf.ImageRGB); + overviewBitmap = bm; } - bm = re.Apply((Bitmap)bf.ImageRGB); - overviewBitmap = bm; - ShowOverview = true; Console.WriteLine("Preview Initialized."); } @@ -1352,8 +1360,7 @@ public void UpdateImages() dBitmaps[bi].Dispose(); dBitmaps[bi] = null; } - Bitmap bf = new Bitmap("", bitmap, new ZCT(), 0); - dBitmaps.Add(DBitmap.FromImage(dx.RenderTarget2D, (bf))); + dBitmaps.Add(DBitmap.FromImage(dx.RenderTarget2D, bitmap)); } else Bitmaps.Add(bitmap); diff --git a/BioCore/Source/TabsView.cs b/BioCore/Source/TabsView.cs index d61852c..563e0fe 100644 --- a/BioCore/Source/TabsView.cs +++ b/BioCore/Source/TabsView.cs @@ -260,7 +260,7 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e) int img = Images.images.Count; foreach (string item in openFilesDialog.FileNames) { - BioImage im = BioImage.OpenFile(item, 0, true,true); + BioImage im = BioImage.OpenFile(item, 0, true, true); AddTab(im); if (!App.recent.Contains(im.ID)) App.recent.Add(im.ID); @@ -803,7 +803,7 @@ private void openOMEToolStripMenuItem_Click_1(object sender, EventArgs e) return; foreach (string sts in openFilesDialog.FileNames) { - BioImage im = BioImage.OpenOME(sts,true); + BioImage im = BioImage.OpenOME(sts, true); if (im == null) return; AddTab(im); @@ -972,7 +972,7 @@ private void addImagesToTabToolStripMenuItem_Click(object sender, EventArgs e) return; } } - + } /// If the user selects a file, open it and add it to the viewer @@ -989,7 +989,7 @@ private void addImagesOMEToolStripMenuItem_Click(object sender, EventArgs e) { if (i == 0 && tabControl.TabPages.Count == 0) { - AddTab(BioImage.OpenOME(openFilesDialog.FileNames[0],false)); + AddTab(BioImage.OpenOME(openFilesDialog.FileNames[0], false)); } else App.viewer.AddImage(BioImage.OpenOME(openFilesDialog.FileNames[i], false)); @@ -1012,7 +1012,7 @@ private async void openSeriesToolStripMenuItem_Click(object sender, EventArgs e) int c = BioImage.GetSeriesCount(file); for (int i = 0; i < c; i++) { - await BioImage.OpenAsync(file, true, true, true,c); + await BioImage.OpenAsync(file, true, true, true, c); } } } @@ -1097,7 +1097,7 @@ private void openSeriesToolStripMenuItem_Click_1(object sender, EventArgs e) BioImage[] bms = null; foreach (string item in openFilesDialog.FileNames) { - bms = BioImage.OpenSeries(openFilesDialog.FileName,true); + bms = BioImage.OpenSeries(openFilesDialog.FileName, true); for (int i = 0; i < bms.Length; i++) { if (i == 0) @@ -1401,5 +1401,13 @@ private void exportQuPathROIToolStripMenuItem_Click(object sender, EventArgs e) QuPath.Save(item, ImageView.SelectedImage); } } + + private void extractRegionPyramidalToolStripMenuItem_Click(object sender, EventArgs e) + { + BioImage b = ImageView.SelectedImage; + BioImage bm = b.GetRegion((int)b.PyramidalOrigin.X, (int)b.PyramidalOrigin.Y, b.PyramidalSize.Width, b.PyramidalSize.Height); + AddTab(bm); + Images.AddImage(bm, true); + } } } diff --git a/BioCore/Source/TabsView.designer.cs b/BioCore/Source/TabsView.designer.cs index e08c8a0..efa8a21 100644 --- a/BioCore/Source/TabsView.designer.cs +++ b/BioCore/Source/TabsView.designer.cs @@ -84,6 +84,8 @@ private void InitializeComponent() exportROIsOfFolderOfImagesToolStripMenuItem = new ToolStripMenuItem(); importImageJROIToolStripMenuItem = new ToolStripMenuItem(); exportImageJROIToolStripMenuItem = new ToolStripMenuItem(); + importQuPathROIToolStripMenuItem = new ToolStripMenuItem(); + exportQuPathROIToolStripMenuItem = new ToolStripMenuItem(); channelsToolToolStripMenuItem = new ToolStripMenuItem(); autoThresholdToolStripMenuItem = new ToolStripMenuItem(); channelsToolToolStripMenuItem1 = new ToolStripMenuItem(); @@ -113,10 +115,9 @@ private void InitializeComponent() runToolStripMenuItem1 = new ToolStripMenuItem(); openImageJDialog = new OpenFileDialog(); saveImageJDialog = new SaveFileDialog(); - importQuPathROIToolStripMenuItem = new ToolStripMenuItem(); - exportQuPathROIToolStripMenuItem = new ToolStripMenuItem(); saveQuPathDialog = new SaveFileDialog(); openQuPathDialog = new OpenFileDialog(); + extractRegionPyramidalToolStripMenuItem = new ToolStripMenuItem(); panel.SuspendLayout(); tabContextMenuStrip.SuspendLayout(); menuStrip.SuspendLayout(); @@ -491,6 +492,20 @@ private void InitializeComponent() exportImageJROIToolStripMenuItem.Text = "Export ImageJ ROI from Selected Image"; exportImageJROIToolStripMenuItem.Click += exportImageJROIToolStripMenuItem_Click; // + // importQuPathROIToolStripMenuItem + // + importQuPathROIToolStripMenuItem.Name = "importQuPathROIToolStripMenuItem"; + importQuPathROIToolStripMenuItem.Size = new Size(282, 22); + importQuPathROIToolStripMenuItem.Text = "Import QuPath ROI"; + importQuPathROIToolStripMenuItem.Click += importQuPathROIToolStripMenuItem_Click; + // + // exportQuPathROIToolStripMenuItem + // + exportQuPathROIToolStripMenuItem.Name = "exportQuPathROIToolStripMenuItem"; + exportQuPathROIToolStripMenuItem.Size = new Size(282, 22); + exportQuPathROIToolStripMenuItem.Text = "Export QuPath ROI"; + exportQuPathROIToolStripMenuItem.Click += exportQuPathROIToolStripMenuItem_Click; + // // channelsToolToolStripMenuItem // channelsToolToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { autoThresholdToolStripMenuItem, channelsToolToolStripMenuItem1, switchRedBlueToolStripMenuItem }); @@ -521,7 +536,7 @@ private void InitializeComponent() // // stackToolsToolStripMenuItem // - stackToolsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { stackToolsToolStripMenuItem1, duplicateToolStripMenuItem, rotateToolStripMenuItem, autoFocusToolStripMenuItem }); + stackToolsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { stackToolsToolStripMenuItem1, duplicateToolStripMenuItem, rotateToolStripMenuItem, autoFocusToolStripMenuItem, extractRegionPyramidalToolStripMenuItem }); stackToolsToolStripMenuItem.Name = "stackToolsToolStripMenuItem"; stackToolsToolStripMenuItem.Size = new Size(52, 20); stackToolsToolStripMenuItem.Text = "Stacks"; @@ -529,21 +544,21 @@ private void InitializeComponent() // stackToolsToolStripMenuItem1 // stackToolsToolStripMenuItem1.Name = "stackToolsToolStripMenuItem1"; - stackToolsToolStripMenuItem1.Size = new Size(134, 22); + stackToolsToolStripMenuItem1.Size = new Size(206, 22); stackToolsToolStripMenuItem1.Text = "Stack Tool"; stackToolsToolStripMenuItem1.Click += stackToolsToolStripMenuItem_Click; // // duplicateToolStripMenuItem // duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem"; - duplicateToolStripMenuItem.Size = new Size(134, 22); + duplicateToolStripMenuItem.Size = new Size(206, 22); duplicateToolStripMenuItem.Text = "Duplicate"; duplicateToolStripMenuItem.Click += duplicateToolStripMenuItem_Click; // // rotateToolStripMenuItem // rotateToolStripMenuItem.Name = "rotateToolStripMenuItem"; - rotateToolStripMenuItem.Size = new Size(134, 22); + rotateToolStripMenuItem.Size = new Size(206, 22); rotateToolStripMenuItem.Text = "Rotate Flip"; rotateToolStripMenuItem.DropDownOpening += rotateToolStripMenuItem_DropDownOpening; rotateToolStripMenuItem.DropDownItemClicked += rotateToolStripMenuItem_DropDownItemClicked; @@ -551,7 +566,7 @@ private void InitializeComponent() // autoFocusToolStripMenuItem // autoFocusToolStripMenuItem.Name = "autoFocusToolStripMenuItem"; - autoFocusToolStripMenuItem.Size = new Size(134, 22); + autoFocusToolStripMenuItem.Size = new Size(206, 22); autoFocusToolStripMenuItem.Text = "Auto Focus"; autoFocusToolStripMenuItem.Click += autoFocusToolStripMenuItem_Click; // @@ -693,20 +708,6 @@ private void InitializeComponent() saveImageJDialog.Filter = "ROI Files (*.roi)|*.roi|All files (*.*)|*.*"; saveImageJDialog.Title = "Save ROIs to CSV"; // - // importQuPathROIToolStripMenuItem - // - importQuPathROIToolStripMenuItem.Name = "importQuPathROIToolStripMenuItem"; - importQuPathROIToolStripMenuItem.Size = new Size(282, 22); - importQuPathROIToolStripMenuItem.Text = "Import QuPath ROI"; - importQuPathROIToolStripMenuItem.Click += importQuPathROIToolStripMenuItem_Click; - // - // exportQuPathROIToolStripMenuItem - // - exportQuPathROIToolStripMenuItem.Name = "exportQuPathROIToolStripMenuItem"; - exportQuPathROIToolStripMenuItem.Size = new Size(282, 22); - exportQuPathROIToolStripMenuItem.Text = "Export QuPath ROI"; - exportQuPathROIToolStripMenuItem.Click += exportQuPathROIToolStripMenuItem_Click; - // // saveQuPathDialog // saveQuPathDialog.DefaultExt = "roi"; @@ -720,6 +721,13 @@ private void InitializeComponent() openQuPathDialog.Multiselect = true; openQuPathDialog.Title = "Import ROI from CSV"; // + // extractRegionPyramidalToolStripMenuItem + // + extractRegionPyramidalToolStripMenuItem.Name = "extractRegionPyramidalToolStripMenuItem"; + extractRegionPyramidalToolStripMenuItem.Size = new Size(206, 22); + extractRegionPyramidalToolStripMenuItem.Text = "Extract Region Pyramidal"; + extractRegionPyramidalToolStripMenuItem.Click += extractRegionPyramidalToolStripMenuItem_Click; + // // TabsView // AutoScaleDimensions = new SizeF(7F, 15F); @@ -837,5 +845,6 @@ private void InitializeComponent() private ToolStripMenuItem exportQuPathROIToolStripMenuItem; private SaveFileDialog saveQuPathDialog; private OpenFileDialog openQuPathDialog; + private ToolStripMenuItem extractRegionPyramidalToolStripMenuItem; } } \ No newline at end of file