BioGTK  5.1.1
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images.
Loading...
Searching...
No Matches
BioGTK.ImageView Class Reference
Inheritance diagram for BioGTK.ImageView:

Public Types

enum  ViewMode { Raw , Filtered , RGBImage , Emission }
 

Public Member Functions

void SetCoordinate (int z, int c, int t)
 
ZCT GetCoordinate ()
 
void AddImage (BioImage im)
 
SKImage BitmapToSKImage (Bitmap bitmap)
 
void UpdateImages ()
 It updates the images.
 
void UpdateImage ()
 It updates the image.
 
void UpdateGUI ()
 It updates the GUI to reflect the current state of the image.
 
void CopySelection ()
 It takes the selected ROIs and copies them to the clipboard.
 
void PasteSelection ()
 
int LevelFromResolution (double Resolution)
 
void UpdateStatus ()
 It updates the status of the user.
 
void UpdateView ()
 It updates the view.
 
double GetScale ()
 
List< ROIGetSelectedROIs ()
 
PointD ImageToViewSpace (double x, double y)
 
RectangleD ToViewSpace (RectangleD p)
 
PointF ToViewSpace (Point p)
 
PointF ToViewSpace (PointF p)
 
PointD ToViewSpace (PointD p)
 
PointD ToViewSpace (double x, double y)
 
RectangleD ToViewSpace (double x, double y, double w, double h)
 
double ToViewSizeH (double d)
 
double ToViewW (double d)
 
double ToViewH (double d)
 
PointD ToScreenSpace (double x, double y)
 
PointD ToScreenSpace (PointD p)
 
PointF ToScreenSpace (PointF p)
 
PointF[] ToScreenSpace (PointF[] p)
 
PointF ToScreenSpace (Point3D p)
 
double ToScreenScaleW (double x)
 
double ToScreenScaleH (double y)
 
PointF ToScreenScale (PointD p)
 
RectangleD ToScreenRectF (double x, double y, double w, double h)
 
SKRect ToScreenSpaceSK (double x, double y, double w, double h)
 
RectangleD ToScreenSpace (RectangleD p)
 
RectangleD[] ToScreenSpace (RectangleD[] p)
 
PointF[] ToScreenSpace (PointD[] p)
 
void GoToImage ()
 This function is used to go to the image at the specified index.
 
void GoToImage (int i)
 

Static Public Member Functions

static ImageView Create (BioImage bm)
 
static Cairo.Color FromColor (Color color)
 

Public Attributes

List< BioImageImages = new List<BioImage>()
 
List< BitmapBitmaps = new List<Bitmap>()
 
List< SKImage > SkImages = new List<SKImage>()
 
Gtk.Box mainBox
 
Menu contextMenu
 
bool showRROIs = true
 
bool showGROIs = true
 
bool showBROIs = true
 

Static Public Attributes

static List< ROIselectedAnnotations = new List<ROI>()
 
static int waitz = 1000
 
static int waitc = 1000
 
static int waitt = 1000
 
static int startz = 0
 
static int startc = 0
 
static int startt = 0
 
static int endz = 0
 
static int endc = 0
 
static int endt = 0
 
static Gdk.Key keyDown = Gdk.Key.Key_3270_Test
 
static bool x1State
 
static bool x2State
 
static bool mouseLeftState
 
static ModifierType Modifiers
 
static PointD mouseDown
 
static PointD mouseUp
 

Protected Member Functions

 ImageView (Builder builder, IntPtr handle, BioImage im)
 
void SetupHandlers ()
 Sets up the handlers.
 

Properties

double PxWmicron [get, set]
 
double PxHmicron [get, set]
 
bool AllowNavigation [get, set]
 
static AForge.Bitmap SelectedBuffer [get]
 
int SelectedIndex [get, set]
 
bool ShowOverview [get, set]
 
int? MacroResolution [get]
 
int? LabelResolution [get]
 
bool OpenSlide [get, set]
 
static BioImage SelectedImage [get, set]
 
ViewMode Mode [get, set]
 
Channel RChannel [get]
 
Channel GChannel [get]
 
Channel BChannel [get]
 
PointD Origin [get, set]
 
PointD TopRightOrigin [get]
 
PointD PyramidalOriginTransformed [get, set]
 
PointD PyramidalOrigin [get, set]
 
double Resolution [get, set]
 
int Level [get]
 
SizeF Scale [get, set]
 
PointD MouseDownInt [get, set]
 
PointD MouseMoveInt [get, set]
 
PointD MouseDown [get, set]
 
PointD MouseMove [get, set]
 

Member Enumeration Documentation

◆ ViewMode

Enumerator
Raw 
Filtered 
RGBImage 
Emission 

Constructor & Destructor Documentation

◆ ImageView()

BioGTK.ImageView.ImageView ( Builder  builder,
IntPtr  handle,
BioImage  im 
)
inlineprotected
247 : base(handle)
248 {
249 _builder = builder;
250 App.viewer = this;
251 builder.Autoconnect(this);
252 viewStack.Add(sk);
253 viewStack.ShowAll();
254 sk.Show();
255 roi.Submenu = roiMenu;
256 roi.ShowAll();
257 AddImage(im);
258 pxWmicron = SelectedImage.PhysicalSizeX;
259 pxHmicron = SelectedImage.PhysicalSizeY;
261 //pictureBox.WidthRequest = im.SizeX;
262 //pictureBox.HeightRequest = im.SizeY;
263 Function.InitializeContextMenu();
264 this.Scale = new SizeF(1, 1);
265 // Set the text column to display for comboboxs.
266 var rendererr = new CellRendererText();
267 rBox.PackStart(rendererr, false);
268 rBox.AddAttribute(rendererr, "text", 0);
269 var rendererg = new CellRendererText();
270 gBox.PackStart(rendererg, false);
271 gBox.AddAttribute(rendererg, "text", 0);
272 var rendererb = new CellRendererText();
273 bBox.PackStart(rendererb, false);
274 bBox.AddAttribute(rendererb, "text", 0);
275 App.ApplyStyles(this);
276 if(im.Type == BioImage.ImageType.well)
277 {
278 Resolution = 0;
279 }
280
281 }
AForge.SizeF SizeF
Definition ImageView.cs:12
Definition Bio.cs:2008
ImageType Type
Definition Bio.cs:2099
double PhysicalSizeX
Definition Bio.cs:2362
ImageType
Definition Bio.cs:2093
double PhysicalSizeY
Definition Bio.cs:2366
static BioImage SelectedImage
Definition ImageView.cs:1559
void SetupHandlers()
Sets up the handlers.
Definition ImageView.cs:639
void AddImage(BioImage im)
Definition ImageView.cs:65
Definition Bio.cs:181

Member Function Documentation

◆ AddImage()

void BioGTK.ImageView.AddImage ( BioImage  im)
inline

It adds an image to the list of images, and then updates the GUI and the images

Parameters
BioImagea class that contains the image data and metadata
66 {
67 Images.Add(im);
68 selectedIndex = Images.Count - 1;
69 if(im.Resolutions[0].SizeX <= 1920 && im.Resolutions[0].SizeY <= 1080)
70 {
71 sk.WidthRequest = im.Resolutions[0].SizeX;
72 sk.HeightRequest = im.Resolutions[0].SizeY;
73 }
74 else
75 {
76 sk.WidthRequest = 600;
77 sk.HeightRequest = 400;
78 }
79 if(im.isPyramidal)
80 {
81 Initialize();
82 InitPreview();
83 }
84 UpdateGUI();
86 GoToImage(Images.Count - 1);
87 }
bool isPyramidal
Definition Bio.cs:2712
List< Resolution > Resolutions
Definition Bio.cs:2101
List< BioImage > Images
Definition ImageView.cs:28
void GoToImage()
This function is used to go to the image at the specified index.
Definition ImageView.cs:2577
void UpdateGUI()
It updates the GUI to reflect the current state of the image.
Definition ImageView.cs:1439
void UpdateImages()
It updates the images.
Definition ImageView.cs:522

◆ BitmapToSKImage()

SKImage BioGTK.ImageView.BitmapToSKImage ( Bitmap  bitmap)
inline
507 {
508 // Step 1: Create an SKBitmap from the System.Drawing.Bitmap
509 var bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
510 ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
511
512 var info = new SKImageInfo(bitmap.Width, bitmap.Height, SKColorType.Bgra8888, SKAlphaType.Premul);
513 var skBitmap = new SKBitmap(info);
514 skBitmap.InstallPixels(info, bitmapData.Scan0, bitmapData.Stride, delegate { bitmap.UnlockBits(bitmapData); }, null);
515
516 // Step 2: Create an SKImage from the SKBitmap
517 var skImage = SKImage.FromBitmap(skBitmap);
518
519 return skImage;
520 }
AForge.Rectangle Rectangle
Definition ImageView.cs:14

◆ CopySelection()

void BioGTK.ImageView.CopySelection ( )
inline

It takes the selected ROIs and copies them to the clipboard.

1510 {
1511 copys.Clear();
1512 string s = "";
1513 foreach (ROI item in SelectedImage.AnnotationsRGB)
1514 {
1515 if (item.Selected)
1516 {
1517 copys.Add(item);
1518 s += BioImage.ROIToString(item);
1519 }
1520 }
1521 Clipboard clipboard = Clipboard.Get(Gdk.Selection.Clipboard);
1522 clipboard.Text = s;
1523 }
List< ROI > AnnotationsRGB
Definition Bio.cs:2474
static string ROIToString(ROI an)
Definition Bio.cs:8017
Definition Bio.cs:391
bool Selected
Definition Bio.cs:560

◆ Create()

static ImageView BioGTK.ImageView.Create ( BioImage  bm)
inlinestatic

The function creates an ImageView object using a BioImage object and returns it.

Parameters
BioImageThe BioImage parameter is an object that represents an image in a biological context. It likely contains information about the image file, such as the filename, and possibly additional metadata related to the image.
Returns
The method is returning an instance of the ImageView class.
237 {
238 Console.WriteLine("Creating ImageView for " + bm.file);
239 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/ImageView.glade", FileMode.Open));
240 ImageView v = new ImageView(builder, builder.GetObject("imageView").Handle, bm);
241 v.Title = bm.Filename;
242 return v;
243 }
string Filename
Definition Bio.cs:2144
string file
Definition Bio.cs:2721
Definition ImageView.cs:23

◆ FromColor()

static Cairo.Color BioGTK.ImageView.FromColor ( Color  color)
inlinestatic

It takes a System.Drawing.Color and returns a Cairo.Color

Parameters
ColorThe color to convert
Returns
A Cairo.Color object.
1198 {
1199 return new Cairo.Color((double)color.R / 255, (double)color.G / 255, (double)color.B / 255);
1200 }

◆ GetCoordinate()

ZCT BioGTK.ImageView.GetCoordinate ( )
inline

It returns the coordinate of the selected image

Returns
The Coordinate property of the SelectedImage object.
59 {
61 }
ZCT Coordinate
Definition Bio.cs:2082

◆ GetScale()

double BioGTK.ImageView.GetScale ( )
inline
1812 {
1813 return ToViewSizeW(ROI.selectBoxSize / Scale.Width);
1814 }
SizeF Scale
Definition ImageView.cs:1765
static float selectBoxSize
Definition Bio.cs:521

◆ GetSelectedROIs()

List< ROI > BioGTK.ImageView.GetSelectedROIs ( )
inline
1822 {
1823 List<ROI> roi = new List<ROI>();
1824 foreach (ROI r in SelectedImage.AnnotationsRGB)
1825 {
1826 if(r.Selected)
1827 {
1828 roi.Add(r);
1829 }
1830 }
1831 return roi;
1832 }

◆ GoToImage() [1/2]

void BioGTK.ImageView.GoToImage ( )
inline

This function is used to go to the image at the specified index.

2578 {
2579 GoToImage(0);
2580 }

◆ GoToImage() [2/2]

void BioGTK.ImageView.GoToImage ( int  i)
inline

It takes an image index and sets the origin and physical size of the image to the values of the image at that index

Parameters
ithe index of the image in the list
Returns
The method is returning the value of the variable "i"
2588 {
2589 if (Images.Count <= i)
2590 return;
2591 if(SelectedImage.Type == BioImage.ImageType.pyramidal)
2592 {
2593 if (SelectedImage.OpenSlideBase != null)
2594 {
2595 if (MacroResolution.HasValue)
2596 {
2597 int lev = MacroResolution.Value - 2;
2598 Resolution = _openSlideBase.Schema.Resolutions[lev].UnitsPerPixel;
2599 }
2600 else
2601 {
2602 Resolution = _openSlideBase.Schema.Resolutions[0].UnitsPerPixel;
2603 }
2604 }
2605 else
2606 {
2607 if (MacroResolution.HasValue)
2608 {
2609 int lev = MacroResolution.Value - 1;
2611 }
2612 else
2613 {
2614 Resolution = SelectedImage.GetLevelDownsamples()[SelectedImage.Resolutions.Count - 1];
2615 }
2616 }
2617 return;
2618 }
2619 double dx = Images[i].Volume.Width / 2;
2620 double dy = Images[i].Volume.Height / 2;
2621 Origin = new PointD((Images[i].Volume.Location.X) - dx, (Images[i].Volume.Location.Y) - dy);
2622 PxWmicron = Images[i].PhysicalSizeX;
2623 PxHmicron = Images[i].PhysicalSizeY;
2624 if (Images[i].SizeX > 1080)
2625 {
2626 double w = (double)SelectedImage.SizeX / (double)Width;
2627 double h = (double)SelectedImage.SizeY / (double)Height;
2628 PxWmicron *= h;
2629 PxHmicron *= h;
2630 }
2631 UpdateView();
2632 }
double[] GetLevelDownsamples()
Definition Bio.cs:2316
OpenSlideBase OpenSlideBase
Definition Bio.cs:2416
int SizeY
Definition Bio.cs:2630
int SizeX
Definition Bio.cs:2621
double Resolution
Definition ImageView.cs:1722
PointD Origin
Definition ImageView.cs:1633
void UpdateView()
It updates the view.
Definition ImageView.cs:1795
double PxHmicron
Definition ImageView.cs:115
int? MacroResolution
Definition ImageView.cs:590
double PxWmicron
Definition ImageView.cs:92

◆ ImageToViewSpace()

PointD BioGTK.ImageView.ImageToViewSpace ( double  x,
double  y 
)
inline

It takes a point in the image space and returns the point in the view space

Parameters
xthe x coordinate of the point in the image
ythe y coordinate of the point in the image
Returns
The point in the image space that corresponds to the point in the view space.
2233 {
2235 {
2236 return new PointD((PyramidalOrigin.X + x) * Resolution, (PyramidalOrigin.Y + y) * Resolution);
2237 }
2238 double dx = ToViewW(SelectedImage.Volume.Width);
2239 double dy = ToViewH(SelectedImage.Volume.Height);
2240 //The origin is the middle of the screen we want the top left corner
2241 PointD torig = new PointD((Origin.X - ((Width / 2) * pxWmicron)), (Origin.Y - ((Height / 2) * pxHmicron)));
2242 PointD orig = new PointD(torig.X - SelectedImage.Volume.Location.X, torig.Y - SelectedImage.Volume.Location.Y);
2243 PointD diff = new PointD(ToViewW(orig.X), ToViewH(orig.Y));
2244 PointD f = new PointD((((x + diff.X)/ dx) * SelectedImage.Volume.Width),(((y + diff.Y) / dy) * SelectedImage.Volume.Height));
2245 PointD ff = new PointD(((SelectedImage.Volume.Location.X + SelectedImage.Volume.Width) + f.X), ((SelectedImage.Volume.Location.Y + SelectedImage.Volume.Height) + f.Y));
2246 return ff;
2247 }
VolumeD Volume
Definition Bio.cs:2139
double ToViewH(double d)
Definition ImageView.cs:2386
double ToViewW(double d)
Definition ImageView.cs:2371
PointD PyramidalOrigin
Definition ImageView.cs:1656

◆ LevelFromResolution()

int BioGTK.ImageView.LevelFromResolution ( double  Resolution)
inline
1672 {
1673 int lev;
1674 if (MacroResolution.HasValue)
1675 {
1676 if (Resolution >= MacroResolution.Value)
1677 {
1678 int r = 0;
1679 for (int i = 0; i < SelectedImage.Resolutions.Count; i++)
1680 {
1681 if (i <= Resolution - 1)
1682 r = i;
1683 }
1684 if (r - 1 <= MacroResolution.Value)
1685 lev = MacroResolution.Value - 1;
1686 else
1687 lev = r - 1;
1688 }
1689 else
1690 return (int)Resolution;
1691 }
1692 else
1693 {
1694 int r = 0;
1695 for (int i = 0; i < SelectedImage.Resolutions.Count; i++)
1696 {
1697 if (i <= Resolution - 1)
1698 r = i;
1699 }
1700 lev = r;
1701 }
1702 if (!OpenSlide)
1703 {
1704 return lev;
1705 }
1706 else
1707 {
1708 if (MacroResolution.HasValue)
1709 {
1710 if (lev >= MacroResolution.Value - 1)
1711 return lev - 1;
1712 else
1713 return lev;
1714 }
1715 else
1716 {
1717 return lev - 1;
1718 }
1719 }
1720 }
bool OpenSlide
Definition ImageView.cs:1554

◆ PasteSelection()

void BioGTK.ImageView.PasteSelection ( )
inline

The function takes the text from the clipboard and splits it into lines. Each line is then converted into an ROI object and added to the list of annotations

1527 {
1528 Clipboard clipboard = Clipboard.Get(Gdk.Selection.Clipboard);
1529 string text = clipboard.WaitForText();
1530 string[] sts = text.Split(BioImage.NewLine);
1531 foreach (string line in sts)
1532 {
1533 if (line.Length > 8)
1534 {
1535 ROI an = BioImage.StringToROI(line);
1536 //We set the coordinates of the ROI's we are pasting
1537 an.coord = GetCoordinate();
1538 SelectedImage.Annotations.Add(an);
1539 }
1540 }
1541 UpdateView();
1542 }
static ROI StringToROI(string sts)
Definition Bio.cs:8042
List< ROI > Annotations
Definition Bio.cs:2140
const char NewLine
Definition Bio.cs:7597
ZCT GetCoordinate()
Definition ImageView.cs:58

◆ SetCoordinate()

void BioGTK.ImageView.SetCoordinate ( int  z,
int  c,
int  t 
)
inline
33 {
34 if (SelectedImage == null)
35 return;
37 zBar.Value = zBar.Adjustment.Upper;
38 else
39 zBar.Value = z;
40 if (c > SelectedImage.SizeC - 1)
41 cBar.Value = cBar.Adjustment.Upper;
42 else
43 cBar.Value = c;
44 if (t > SelectedImage.SizeT - 1)
45 tBar.Value = tBar.Adjustment.Upper;
46 else
47 tBar.Value = t;
49 SelectedImage.Coordinate = new ZCT(0, (int)cBar.Value, (int)tBar.Value);
50 else
51 SelectedImage.Coordinate = new ZCT((int)zBar.Value, (int)cBar.Value, (int)tBar.Value);
53 UpdateView();
54 }
int SizeT
Definition Bio.cs:2647
int SizeZ
Definition Bio.cs:2639
int SizeC
Definition Bio.cs:2643
void UpdateImage()
It updates the image.
Definition ImageView.cs:572

◆ SetupHandlers()

void BioGTK.ImageView.SetupHandlers ( )
inlineprotected

Sets up the handlers.

640 {
641 zBar.ValueChanged += ValueChanged;
642 cBar.ValueChanged += ValueChanged;
643 tBar.ValueChanged += ValueChanged;
644 zBar.ScrollEvent += ZBar_ScrollEvent;
645 cBar.ScrollEvent += CBar_ScrollEvent;
646 tBar.ScrollEvent += TBar_ScrollEvent;
647 sk.MotionNotifyEvent += ImageView_MotionNotifyEvent;
648 sk.ButtonPressEvent += ImageView_ButtonPressEvent;
649 sk.ButtonReleaseEvent += ImageView_ButtonReleaseEvent;
650 sk.ScrollEvent += ImageView_ScrollEvent;
651 sk.PaintSurface += Render;
652 sk.SizeAllocated += PictureBox_SizeAllocated;
653 sk.AddEvents((int)
654 (EventMask.ButtonPressMask
655 | EventMask.ButtonReleaseMask
656 | EventMask.KeyPressMask
657 | EventMask.PointerMotionMask | EventMask.ScrollMask));
658 this.KeyPressEvent += ImageView_KeyPressEvent;
659 this.DeleteEvent += ImageView_DeleteEvent;
660 rBox.Changed += RBox_Changed;
661 gBox.Changed += GBox_Changed;
662 bBox.Changed += BBox_Changed;
663 //Context Menu
664 goToImageMenu.ButtonPressEvent += GoToImageMenu_ButtonPressEvent;
665 goToOriginMenu.ButtonPressEvent += GoToOriginMenu_ButtonPressEvent;
666
667 roiDelete.ButtonPressEvent += RoiDelete_ButtonPressEvent;
668 roiID.ButtonPressEvent += RoiID_ButtonPressEvent;
669 copy.ButtonPressEvent += Copy_ButtonPressEvent;
670 paste.ButtonPressEvent += Paste_ButtonPressEvent;
671 draw.ButtonPressEvent += Draw_ButtonPressEvent;
672 fill.ButtonPressEvent += Fill_ButtonPressEvent;
673
674 play.ButtonPressEvent += Play_ButtonPressEvent;
675 stop.ButtonPressEvent += Stop_ButtonPressEvent;
676 playSpeed.ButtonPressEvent += PlaySpeed_ButtonPressEvent;
677 setValueRange.ButtonPressEvent += SetValueRange_ButtonPressEvent;
678 loop.ButtonPressEvent += Loop_ButtonPressEvent;
679
680 zBar.ButtonPressEvent += ZBar_ButtonPressEvent;
681 tBar.ButtonPressEvent += TBar_ButtonPressEvent;
682 cBar.ButtonPressEvent += CBar_ButtonPressEvent;
683
684 }

◆ ToScreenRectF()

RectangleD BioGTK.ImageView.ToScreenRectF ( double  x,
double  y,
double  w,
double  h 
)
inline

The function converts a set of coordinates and dimensions from a mathematical coordinate system to a screen coordinate system and returns a rectangle with the converted values.

Parameters
xThe x-coordinate of the rectangle's top-left corner in world space.
yThe parameter "y" represents the y-coordinate of the top-left corner of the rectangle in the coordinate system of the screen.
wThe width of the rectangle in world space.
hThe parameter "h" represents the height of the rectangle.
Returns
The method is returning a RectangleD object.
2510 {
2511 PointD pf = ToScreenSpace(x, y);
2512 RectangleD rf = new RectangleD((float)pf.X, (float)pf.Y, (float)ToViewW(w), (float)ToViewH(h));
2513 return rf;
2514 }
PointD ToScreenSpace(double x, double y)
Definition ImageView.cs:2401
Definition Bio.cs:309

◆ ToScreenScale()

PointF BioGTK.ImageView.ToScreenScale ( PointD  p)
inline

The function takes a PointD object and returns a PointF object with the coordinates scaled to the screen.

Parameters
PointDPointD is a custom data type that represents a point in a two-dimensional space. It consists of two double values, X and Y, which represent the coordinates of the point.
Returns
The method is returning a PointF object, which represents a point in a two-dimensional plane with floating-point coordinates.
2494 {
2495 double x = ToScreenScaleW((float)p.X);
2496 double y = ToScreenScaleH((float)p.Y);
2497 return new PointF((float)x, (float)y);
2498 }
AForge.PointF PointF
Definition ImageView.cs:11
double ToScreenScaleW(double x)
Definition ImageView.cs:2461
double ToScreenScaleH(double y)
Definition ImageView.cs:2476

◆ ToScreenScaleH()

double BioGTK.ImageView.ToScreenScaleH ( double  y)
inline

The function converts a given value to screen scale height based on the selected image's properties.

Parameters
yThe parameter "y" represents the vertical coordinate value that needs to be converted to screen scale.
Returns
The method is returning a double value.
2477 {
2479 {
2480 return y * Resolution;
2481 }
2482 return (y * PxHmicron) * Scale.Height;
2483 }

◆ ToScreenScaleW()

double BioGTK.ImageView.ToScreenScaleW ( double  x)
inline

The function converts a given value to screen scale width based on the selected image's properties.

Parameters
xThe parameter "x" represents a value that needs to be converted to screen scale width.
Returns
The method is returning a double value.
2462 {
2464 {
2465 return x * Resolution;
2466 }
2467 return (x * PxWmicron) * Scale.Width;
2468 }

◆ ToScreenSpace() [1/8]

PointD BioGTK.ImageView.ToScreenSpace ( double  x,
double  y 
)
inline

The function converts coordinates from a Cartesian plane to screen space.

Parameters
xThe x-coordinate of the point in the coordinate system.
yThe parameter "y" represents the y-coordinate of a point in a coordinate system.
Returns
The method is returning a PointD object.
2402 {
2403 double fx = ToScreenScaleW(Origin.X - x);
2404 double fy = ToScreenScaleH(Origin.Y - y);
2405 return new PointD(fx, fy);
2406 }

◆ ToScreenSpace() [2/8]

PointF BioGTK.ImageView.ToScreenSpace ( Point3D  p)
inline

The function converts a 3D point to screen space and returns it as a PointF object.

Parameters
Point3DThe Point3D parameter represents a point in a three-dimensional space. It typically consists of three coordinates: X, Y, and Z.
Returns
The method is returning a PointF object.
2450 {
2451 PointD pd = ToScreenSpace(p.X, p.Y);
2452 return new PointF((float)pd.X, (float)pd.Y);
2453 }

◆ ToScreenSpace() [3/8]

PointD BioGTK.ImageView.ToScreenSpace ( PointD  p)
inline

The function converts a point from a coordinate system to screen space.

Parameters
PointDThe PointD class represents a point in a two-dimensional space. It typically has two properties, X and Y, which represent the coordinates of the point.
Returns
The method is returning a PointD object.
2414 {
2415 return ToScreenSpace(p.X, p.Y);
2416 }

◆ ToScreenSpace() [4/8]

PointF[] BioGTK.ImageView.ToScreenSpace ( PointD[]  p)
inline

The function takes an array of PointD objects and converts them to an array of PointF objects in screen space.

Parameters
pAn array of PointD objects representing points in some coordinate system.
Returns
The method is returning an array of PointF objects.
2567 {
2568 PointF[] rs = new PointF[p.Length];
2569 for (int i = 0; i < p.Length; i++)
2570 {
2571 PointD pd = ToScreenSpace(p[i]);
2572 rs[i] = new PointF((float)pd.X, (float)pd.Y);
2573 }
2574 return rs;
2575 }

◆ ToScreenSpace() [5/8]

PointF BioGTK.ImageView.ToScreenSpace ( PointF  p)
inline

The function converts a PointF object from world space to screen space.

Parameters
PointFPointF is a structure in C# that represents a point in a two-dimensional space. It consists of two float values, X and Y, which represent the coordinates of the point.
Returns
The method is returning a PointF object.
2425 {
2426 PointD pd = ToScreenSpace(p.X, p.Y);
2427 return new PointF((float)pd.X, (float)pd.Y);
2428 }

◆ ToScreenSpace() [6/8]

PointF[] BioGTK.ImageView.ToScreenSpace ( PointF[]  p)
inline

The function takes an array of PointF objects and converts them to screen space coordinates.

Parameters
pAn array of PointF objects representing points in some coordinate system.
Returns
The method is returning an array of PointF objects in screen space.
2435 {
2436 PointF[] pf = new PointF[p.Length];
2437 for (int i = 0; i < p.Length; i++)
2438 {
2439 pf[i] = ToScreenSpace(p[i]);
2440 }
2441 return pf;
2442 }

◆ ToScreenSpace() [7/8]

RectangleD BioGTK.ImageView.ToScreenSpace ( RectangleD  p)
inline

The function converts a RectangleD object to screen space.

Parameters
RectangleDThe RectangleD is a custom data type that represents a rectangle in 2D space. It typically has four properties: X (the x-coordinate of the top-left corner), Y (the y-coordinate of the top-left corner), W (the width of the rectangle), and H (the height of
Returns
The method is returning a RectangleD object.
2543 {
2544 return ToScreenRectF(p.X, p.Y, p.W, p.H);
2545 }
RectangleD ToScreenRectF(double x, double y, double w, double h)
Definition ImageView.cs:2509
double W
Definition Bio.cs:316
double X
Definition Bio.cs:314
double Y
Definition Bio.cs:315
double H
Definition Bio.cs:317

◆ ToScreenSpace() [8/8]

RectangleD[] BioGTK.ImageView.ToScreenSpace ( RectangleD[]  p)
inline

The function takes an array of RectangleD objects and converts them to screen space.

Parameters
pAn array of RectangleD objects representing rectangles in some coordinate space.
Returns
The method is returning an array of RectangleD objects.
2552 {
2553 RectangleD[] rs = new RectangleD[p.Length];
2554 for (int i = 0; i < p.Length; i++)
2555 {
2556 rs[i] = ToScreenSpace(p[i]);
2557 }
2558 return rs;
2559 }

◆ ToScreenSpaceSK()

SKRect BioGTK.ImageView.ToScreenSpaceSK ( double  x,
double  y,
double  w,
double  h 
)
inline

The function converts a set of coordinates and dimensions from a mathematical coordinate system to a screen coordinate system and returns a rectangle with the converted values.

Parameters
xThe x-coordinate of the rectangle's top-left corner in world space.
yThe parameter "y" represents the y-coordinate of the top-left corner of the rectangle in the coordinate system of the screen.
wThe width of the rectangle in world space.
hThe parameter "h" represents the height of the rectangle.
Returns
The method is returning a RectangleD object.
2526 {
2527 PointD pf = ToViewSpace(x, y);
2528 SKRect rf = new SKRect
2529 {
2530 Location = new SKPoint((float)pf.X, (float)pf.Y),
2531 Size = new SKSize((float)ToViewSizeW(w), (float)ToViewSizeH(h)),
2532 };
2533 return rf;
2534 }
double ToViewSizeH(double d)
Definition ImageView.cs:2356
RectangleD ToViewSpace(RectangleD p)
Definition ImageView.cs:2256

◆ ToViewH()

double BioGTK.ImageView.ToViewH ( double  d)
inline

The function converts a given value from a specific unit to a view height value.

Parameters
dThe parameter "d" represents a value that needs to be converted to a different unit of measurement.
Returns
The method is returning a double value.
2387 {
2389 {
2390 return d / Resolution;
2391 }
2392 double y = (double)(d / PxHmicron) * Scale.Height;
2393 return y;
2394 }

◆ ToViewSizeH()

double BioGTK.ImageView.ToViewSizeH ( double  d)
inline

The function converts a given value to a view size in the horizontal direction.

Parameters
dThe parameter "d" represents a value that needs to be converted to a view size.
Returns
The method is returning a double value.
2357 {
2359 {
2360 return d / Resolution;
2361 }
2362 double y = (double)(d / PxHmicron) * Scale.Height;
2363 return y;
2364 }

◆ ToViewSpace() [1/6]

PointD BioGTK.ImageView.ToViewSpace ( double  x,
double  y 
)
inline

The function converts coordinates from a given space to view space.

Parameters
xThe x-coordinate in the original coordinate system.
yThe parameter "y" represents the y-coordinate in the original coordinate system.
Returns
The method is returning a PointD object.
2304 {
2306 {
2307 double ddx = x / Resolution;
2308 double ddy = y / Resolution;
2309 return new PointD(ddx, ddy);
2310 }
2311 double dx = (ToViewSizeW(Origin.X - x)) * Scale.Width;
2312 double dy = (ToViewSizeH(Origin.Y - y)) * Scale.Height;
2313 return new PointD(dx, dy);
2314 }

◆ ToViewSpace() [2/6]

RectangleD BioGTK.ImageView.ToViewSpace ( double  x,
double  y,
double  w,
double  h 
)
inline

The function converts coordinates and sizes from a given space to a view space.

Parameters
xThe x-coordinate of the rectangle's top-left corner in world space.
yThe parameter "y" represents the y-coordinate of the rectangle in the original coordinate space.
wThe width of the rectangle in world space.
hThe parameter "h" represents the height of the rectangle in the original coordinate space.
Returns
The method is returning a RectangleD object.
2326 {
2327 PointD d = ToViewSpace(x, y);
2328 double dw = ToViewSizeW(w);
2329 double dh = ToViewSizeH(h);
2331 {
2332 return new RectangleD(d.X - PyramidalOrigin.X, d.Y - PyramidalOrigin.Y, dw, dh);
2333 }
2334 return new RectangleD(-d.X, -d.Y, dw, dh);
2335 }

◆ ToViewSpace() [3/6]

PointF BioGTK.ImageView.ToViewSpace ( Point  p)
inline

The function converts a Point object to PointF object in view space.

Parameters
PointThe Point class represents an ordered pair of integer x and y coordinates that define a point in a two-dimensional plane.
Returns
The method is returning a PointF object, which represents a point in 2D space with floating-point coordinates.
2271 {
2272 PointD d = ToViewSpace(p.X, p.Y);
2273 return new PointF((float)d.X, (float)d.Y);
2274 }

◆ ToViewSpace() [4/6]

PointD BioGTK.ImageView.ToViewSpace ( PointD  p)
inline

The function converts a point from a coordinate system to view space.

Parameters
PointDThe PointD class represents a point in a two-dimensional space. It typically has two properties: X and Y, which represent the coordinates of the point.
Returns
The method is returning a PointD object.
2294 {
2295 return ToViewSpace(p.X, p.Y); ;
2296 }

◆ ToViewSpace() [5/6]

PointF BioGTK.ImageView.ToViewSpace ( PointF  p)
inline

The function converts a PointF object from world space to view space.

Parameters
PointFPointF is a structure in C# that represents a point in a two-dimensional space. It consists of two float values, X and Y, which represent the coordinates of the point.
Returns
The method is returning a PointF object.
2283 {
2284 PointD d = ToViewSpace(p.X, p.Y);
2285 return new PointF((float)d.X, (float)d.Y);
2286 }

◆ ToViewSpace() [6/6]

RectangleD BioGTK.ImageView.ToViewSpace ( RectangleD  p)
inline

The function converts a rectangle from world space to view space.

Parameters
RectangleDThe RectangleD is a custom data type that represents a rectangle in 2D space. It has four properties: X (the x-coordinate of the top-left corner), Y (the y-coordinate of the top-left corner), W (the width of the rectangle), and H (the height of the
Returns
The method is returning a RectangleD object.
2257 {
2258 PointD d = ToViewSpace(p.X, p.Y);
2259 double dx = ToScreenScaleW(p.W);
2260 double dy = ToScreenScaleH(p.H);
2261 return new RectangleD((float)d.X, (float)d.Y, (float)dx, (float)dy);
2262 }

◆ ToViewW()

double BioGTK.ImageView.ToViewW ( double  d)
inline

The function converts a given value from microns to view width units, taking into account the scale and whether the image is pyramidal.

Parameters
dThe parameter "d" represents a value that needs to be converted to a view width.
Returns
The method is returning a double value.
2372 {
2374 {
2375 return d / Resolution;
2376 }
2377 double x = (double)(d / PxWmicron) * Scale.Width;
2378 return x;
2379 }

◆ UpdateGUI()

void BioGTK.ImageView.UpdateGUI ( )
inline

It updates the GUI to reflect the current state of the image.

1440 {
1441 cBar.Adjustment.Lower = 0;
1442 cBar.Adjustment.Upper = Images[selectedIndex].SizeC - 1;
1443 zBar.Adjustment.Lower = 0;
1444 zBar.Adjustment.Upper = Images[selectedIndex].SizeZ - 1;
1445 tBar.Adjustment.Lower = 0;
1446 tBar.Adjustment.Upper = Images[selectedIndex].SizeT - 1;
1447 if (endz == 0 || endz > Images[selectedIndex].SizeZ - 1)
1448 endz = Images[selectedIndex].SizeZ - 1;
1449 if (endc == 0 || endc > Images[selectedIndex].SizeC - 1)
1450 endc = Images[selectedIndex].SizeC - 1;
1451 if (endt == 0 || endt > Images[selectedIndex].SizeT - 1)
1452 endt = Images[selectedIndex].SizeT - 1;
1453 var store = new ListStore(typeof(string));
1454 foreach (Channel c in SelectedImage.Channels)
1455 {
1456 store.AppendValues(c.Name);
1457 }
1458 // Set the model for the ComboBox
1459 rBox.Model = store;
1460 gBox.Model = store;
1461 bBox.Model = store;
1462 if (SelectedImage.Channels.Count > 2)
1463 {
1464 rBox.Active = 0;
1465 gBox.Active = 1;
1466 bBox.Active = 2;
1467 }
1468 else
1469 if (SelectedImage.Channels.Count == 2)
1470 {
1471 rBox.Active = 0;
1472 gBox.Active = 1;
1473 }
1474 imagesMenu = new Menu();
1475 foreach (BioImage b in Images)
1476 {
1477 MenuItem mi = new MenuItem(b.Filename);
1478 mi.ButtonPressEvent += Mi_ButtonPressEvent;
1479 imagesMenu.Append(mi);
1480 }
1481 goToImageMenu.Submenu = imagesMenu;
1482 goToImageMenu.ShowAll();
1483 }
List< Channel > Channels
Definition Bio.cs:2100
static int endt
Definition ImageView.cs:703
static int endz
Definition ImageView.cs:701
static int endc
Definition ImageView.cs:702

◆ UpdateImage()

void BioGTK.ImageView.UpdateImage ( )
inline

It updates the image.

573 {
574 UpdateImages();
575 }

◆ UpdateImages()

void BioGTK.ImageView.UpdateImages ( )
inline

It updates the images.

523 {
524 if (SelectedImage == null)
525 return;
526 for (int i = 0; i < SkImages.Count; i++)
527 {
528 SkImages[i].Dispose();
529 }
530 SkImages.Clear();
531
532 if (zBar.Adjustment.Upper != SelectedImage.SizeZ - 1 || tBar.Adjustment.Upper != SelectedImage.SizeT - 1)
533 {
534 UpdateGUI();
535 }
536 int bi = 0;
537 if (SelectedImage.isPyramidal && sk.AllocatedHeight <= 1 || sk.AllocatedWidth <= 1)
538 return;
539 SelectedImage.PyramidalSize = new AForge.Size(sk.AllocatedWidth, sk.AllocatedHeight);
542 foreach (BioImage b in Images)
543 {
544 ZCT c = GetCoordinate();
545 AForge.Bitmap bitmap = null;
546 int index = b.Coords[c.Z, c.C, c.T];
547 if (Mode == ViewMode.Filtered)
548 {
549 bitmap = b.GetFiltered(c, b.RChannel.RangeR, b.GChannel.RangeG, b.BChannel.RangeB);
550 }
551 else if (Mode == ViewMode.RGBImage)
552 {
553 bitmap = b.GetRGBBitmap(c, b.RChannel.RangeR, b.GChannel.RangeG, b.BChannel.RangeB);
554 }
555 else if (Mode == ViewMode.Raw)
556 {
557 bitmap = b.Buffers[index];
558 }
559 else
560 {
561 bitmap = b.GetEmission(c, b.RChannel.RangeR, b.GChannel.RangeG, b.BChannel.RangeB);
562 }
563 if (bitmap == null)
564 return;
565 SkImages.Add(BitmapToSKImage(bitmap.ImageRGB));
566 bitmap.Dispose();
567 bitmap = null;
568 bi++;
569 }
570 }
async void UpdateBuffersPyramidal()
Updates the Buffers based on current pyramidal origin and resolution.
Definition Bio.cs:7403
SKImage BitmapToSKImage(Bitmap bitmap)
Definition ImageView.cs:506
List< SKImage > SkImages
Definition ImageView.cs:31
ViewMode Mode
Definition ImageView.cs:1576
ViewMode
Definition ImageView.cs:1546

◆ UpdateStatus()

void BioGTK.ImageView.UpdateStatus ( )
inline

It updates the status of the user.

1782 {
1784 {
1785 statusLabel.Text = (zBar.Value + 1) + "/" + (zBar.Adjustment.Upper + 1) + ", " + (cBar.Value + 1) + "/" + (cBar.Adjustment.Upper + 1) + ", " + (tBar.Value + 1) + "/" + (tBar.Adjustment.Upper + 1) + ", " +
1786 mousePoint + mouseColor + ", " + SelectedImage.Buffers[0].PixelFormat.ToString() + ", (" + SelectedImage.Volume.Location.X.ToString("N2") + ", " + SelectedImage.Volume.Location.Y.ToString("N2") + ") "
1787 + Origin.X.ToString("N2") + "," + Origin.Y.ToString("N2") + " , Well:" + SelectedImage.Level;
1788 }
1789 else
1790 statusLabel.Text = (zBar.Value + 1) + "/" + (zBar.Adjustment.Upper + 1) + ", " + (cBar.Value + 1) + "/" + (cBar.Adjustment.Upper + 1) + ", " + (tBar.Value + 1) + "/" + (tBar.Adjustment.Upper + 1) + ", " +
1791 mousePoint + mouseColor + ", " + SelectedImage.Buffers[0].PixelFormat.ToString() + ", (" + SelectedImage.Volume.Location.X.ToString("N2") + ", " + SelectedImage.Volume.Location.Y.ToString("N2") + ") "
1792 + Origin.X.ToString("N2") + "," + Origin.Y.ToString("N2") + ", Res:" + Resolution;
1793 }
int Level
Definition Bio.cs:2106
List< AForge.Bitmap > Buffers
Definition Bio.cs:2102

◆ UpdateView()

void BioGTK.ImageView.UpdateView ( )
inline

It updates the view.

1796 {
1798 sk.QueueDraw();
1799 else
1800 {
1801 sk.QueueDraw();
1802 }
1803 }

Member Data Documentation

◆ Bitmaps

List<Bitmap> BioGTK.ImageView.Bitmaps = new List<Bitmap>()

◆ contextMenu

Menu BioGTK.ImageView.contextMenu

◆ endc

int BioGTK.ImageView.endc = 0
static

◆ endt

int BioGTK.ImageView.endt = 0
static

◆ endz

int BioGTK.ImageView.endz = 0
static

◆ Images

List<BioImage> BioGTK.ImageView.Images = new List<BioImage>()

◆ keyDown

Gdk.Key BioGTK.ImageView.keyDown = Gdk.Key.Key_3270_Test
static

◆ mainBox

Gtk.Box BioGTK.ImageView.mainBox

◆ Modifiers

ModifierType BioGTK.ImageView.Modifiers
static

◆ mouseDown

PointD BioGTK.ImageView.mouseDown
static

◆ mouseLeftState

bool BioGTK.ImageView.mouseLeftState
static

◆ mouseUp

PointD BioGTK.ImageView.mouseUp
static

◆ selectedAnnotations

List<ROI> BioGTK.ImageView.selectedAnnotations = new List<ROI>()
static

◆ showBROIs

bool BioGTK.ImageView.showBROIs = true

◆ showGROIs

bool BioGTK.ImageView.showGROIs = true

◆ showRROIs

bool BioGTK.ImageView.showRROIs = true

◆ SkImages

List<SKImage> BioGTK.ImageView.SkImages = new List<SKImage>()

◆ startc

int BioGTK.ImageView.startc = 0
static

◆ startt

int BioGTK.ImageView.startt = 0
static

◆ startz

int BioGTK.ImageView.startz = 0
static

◆ waitc

int BioGTK.ImageView.waitc = 1000
static

◆ waitt

int BioGTK.ImageView.waitt = 1000
static

◆ waitz

int BioGTK.ImageView.waitz = 1000
static

◆ x1State

bool BioGTK.ImageView.x1State
static

◆ x2State

bool BioGTK.ImageView.x2State
static

Property Documentation

◆ AllowNavigation

bool BioGTK.ImageView.AllowNavigation
getset
138 {
139 get { return allowNavigation; }
140 set { allowNavigation = value; }
141 }

◆ BChannel

Channel BioGTK.ImageView.BChannel
get
1624 {
1625 get
1626 {
1628 }
1629 }
int[] rgbChannels
Definition Bio.cs:2154

◆ GChannel

Channel BioGTK.ImageView.GChannel
get
1616 {
1617 get
1618 {
1620 }
1621 }

◆ LabelResolution

int? BioGTK.ImageView.LabelResolution
get
591{ get { return SelectedImage.LabelResolution; } }
int? LabelResolution
Definition Bio.cs:3175

◆ Level

int BioGTK.ImageView.Level
get
1749 {
1750 get
1751 {
1752 int l = 0;
1754 if (!openSlide)
1755 l = OpenSlideGTK.TileUtil.GetLevel(_slideBase.Schema.Resolutions, Resolution);
1756 else
1757 l = OpenSlideGTK.TileUtil.GetLevel(_openSlideBase.Schema.Resolutions, Resolution);
1758 return l;
1759 }
1760 }
ITileSchema Schema
Definition ISlideSource.cs:291

◆ MacroResolution

int? BioGTK.ImageView.MacroResolution
get
590{ get { return SelectedImage.MacroResolution; } }
int? MacroResolution
Definition Bio.cs:3174

◆ Mode

ViewMode BioGTK.ImageView.Mode
getset
1576 {
1577 get
1578 {
1579 return viewMode;
1580 }
1581 set
1582 {
1583 viewMode = value;
1584 if (viewMode == ViewMode.RGBImage)
1585 {
1586 rgbStack.VisibleChild = rgbStack.Children[1];
1587 }
1588 else
1589 if (viewMode == ViewMode.Filtered)
1590 {
1591 rgbStack.VisibleChild = rgbStack.Children[0];
1592 }
1593 else
1594 if (viewMode == ViewMode.Raw)
1595 {
1596 rgbStack.VisibleChild = rgbStack.Children[0];
1597 }
1598 else
1599 {
1600 rgbStack.VisibleChild = rgbStack.Children[0];
1601 }
1602 UpdateImage();
1603 UpdateView();
1604 }
1605 }

◆ MouseDown

PointD BioGTK.ImageView.MouseDown
getset
2006 {
2007 get { return mouseDown; }
2008 set { mouseDown = value; }
2009 }
static PointD mouseDown
Definition ImageView.cs:1992

◆ MouseDownInt

PointD BioGTK.ImageView.MouseDownInt
getset
1996 {
1997 get { return mouseDownInt; }
1998 set { mouseDownInt = value; }
1999 }

◆ MouseMove

PointD BioGTK.ImageView.MouseMove
getset
2011 {
2012 get { return mouseMove; }
2013 set { mouseMove = value; }
2014 }

◆ MouseMoveInt

PointD BioGTK.ImageView.MouseMoveInt
getset
2001 {
2002 get { return mouseMoveInt; }
2003 set { mouseMoveInt = value; }
2004 }

◆ OpenSlide

bool BioGTK.ImageView.OpenSlide
getset
1554 {
1555 get { return openSlide; }
1556 set { openSlide = value; }
1557 }

◆ Origin

PointD BioGTK.ImageView.Origin
getset
1633 {
1634 get { return origin; }
1635 set
1636 {
1637 if(AllowNavigation)
1638 origin = value;
1639 }
1640 }
bool AllowNavigation
Definition ImageView.cs:138

◆ PxHmicron

double BioGTK.ImageView.PxHmicron
getset
115 {
116 get
117 {
118 if (SelectedImage.Type == BioImage.ImageType.pyramidal)
119 if (openSlide)
120 {
121 int lev = OpenSlideGTK.TileUtil.GetLevel(_openSlideBase.Schema.Resolutions, Resolution);
122 return _openSlideBase.Schema.Resolutions[lev].UnitsPerPixel * pxHmicron;
123 }
124 else
125 {
126 int lev = OpenSlideGTK.TileUtil.GetLevel(_slideBase.Schema.Resolutions, Resolution);
127 return _slideBase.Schema.Resolutions[lev].UnitsPerPixel * pxHmicron;
128 }
129 return pxHmicron;
130 }
131 set
132 {
133 pxHmicron = value;
134 }
135 }

◆ PxWmicron

double BioGTK.ImageView.PxWmicron
getset
92 {
93 get
94 {
95 if(SelectedImage.Type == BioImage.ImageType.pyramidal)
96 if(openSlide)
97 {
98 int lev = OpenSlideGTK.TileUtil.GetLevel(_openSlideBase.Schema.Resolutions, Resolution);
99 return _openSlideBase.Schema.Resolutions[lev].UnitsPerPixel * pxWmicron;
100 }
101 else
102 {
103 int lev = OpenSlideGTK.TileUtil.GetLevel(_slideBase.Schema.Resolutions, Resolution);
104 return _slideBase.Schema.Resolutions[lev].UnitsPerPixel * pxWmicron;
105 }
106
107 return pxWmicron;
108 }
109 set
110 {
111 pxWmicron = value;
112 }
113 }

◆ PyramidalOrigin

PointD BioGTK.ImageView.PyramidalOrigin
getset
1656 {
1657 get
1658 {
1660 }
1661 set
1662 {
1663 if (!AllowNavigation)
1664 return;
1665 SelectedImage.PyramidalOrigin = value;
1666 UpdateImage();
1667 UpdateView();
1668 }
1669 }
PointD PyramidalOrigin
Definition Bio.cs:2395

◆ PyramidalOriginTransformed

PointD BioGTK.ImageView.PyramidalOriginTransformed
getset
1650 {
1651 get { return new PointD(PyramidalOrigin.X * Resolution, PyramidalOrigin.Y * Resolution); }
1652 set { PyramidalOrigin = new PointD(value.X / Resolution, value.Y / Resolution); }
1653 }

◆ RChannel

Channel BioGTK.ImageView.RChannel
get
1608 {
1609 get
1610 {
1612 }
1613 }

◆ Resolution

double BioGTK.ImageView.Resolution
getset
1722 {
1723 get
1724 {
1726 }
1727 set
1728 {
1729 if(SelectedImage.Type == BioImage.ImageType.well && value > SelectedImage.Resolutions.Count - 1)
1730 return;
1731 else
1732 if (openSlide)
1733 {
1734 double dp = Resolution / value;
1735 PyramidalOrigin = new PointD((dp * PyramidalOrigin.X), (dp * PyramidalOrigin.Y));
1736 }
1737 SelectedImage.Resolution = value;
1738 if(SelectedImage.Type == BioImage.ImageType.well)
1739 SelectedImage.Level = (int)value;
1740 // update ui on main UI thread
1741 Application.Invoke(delegate
1742 {
1743 UpdateImage();
1744 UpdateView();
1745 });
1746 }
1747 }
double Resolution
Definition Bio.cs:2186

◆ Scale

SizeF BioGTK.ImageView.Scale
getset
1765 {
1766 get
1767 {
1768 return scale;
1769 }
1770 set
1771 {
1772 scale = value;
1773 // update ui on main UI thread
1774 Application.Invoke(delegate
1775 {
1776 UpdateView();
1777 });
1778 }
1779 }

◆ SelectedBuffer

AForge.Bitmap BioGTK.ImageView.SelectedBuffer
staticget
144 {
145 get
146 {
148 return SelectedImage.Buffers[ind];
149 }
150 }
int[,,] Coords
Definition Bio.cs:2079

◆ SelectedImage

BioImage BioGTK.ImageView.SelectedImage
staticgetset
1559 {
1560 get
1561 {
1562 if (App.viewer == null)
1563 return null;
1564 if(App.viewer.Images.Count == 0)
1565 return null;
1566 return App.viewer.Images[App.viewer.SelectedIndex];
1567 }
1568 set
1569 {
1570 App.viewer.Images[App.viewer.SelectedIndex] = value;
1571 }
1572 }

◆ SelectedIndex

int BioGTK.ImageView.SelectedIndex
getset
153 {
154 get { return selectedIndex; }
155 set { selectedIndex = value;
156 Images[selectedIndex] = SelectedImage;
157 }
158 }

◆ ShowOverview

bool BioGTK.ImageView.ShowOverview
getset
581 {
582 get { return showOverview; }
583 set
584 {
585 showOverview = value;
586 UpdateView();
587 }
588 }

◆ TopRightOrigin

PointD BioGTK.ImageView.TopRightOrigin
get
1643 {
1644 get
1645 {
1646 return new PointD((Origin.X - ((sk.AllocatedWidth / 2) * pxWmicron)), (Origin.Y - ((sk.AllocatedHeight / 2) * pxHmicron)));
1647 }
1648 }

The documentation for this class was generated from the following file: