![]() |
BioImager
5.0.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
|
ImageView control for image stacks, pyramidal and whole-slide-images. More...
Classes | |
| struct | Layer |
Public Types | |
| enum | ViewMode { Raw , Filtered , RGBImage , Emission } |
Public Member Functions | |
| ImageView (BioImage im, bool OpenWithOpenSlide=true) | |
| Initializing the image viewer. */. | |
| ImageView () | |
| Initializing the ImageView class. */. | |
| void | SetCoordinate (int z, int c, int t) |
| ZCT | GetCoordinate () |
| void | AddImage (BioImage im) |
| void | UpdateRGBChannels () |
| void | InitGUI () |
| void | UpdateSelectBoxSize (float size) |
| void | UpdateOverlay () |
| void | UpdateStatus () |
| void | UpdateView (bool refreshImages=true) |
| void | UpdateViewLegacy (bool refresh) |
| async void | UpdateImages (bool updatePyramidal=true) |
| void | RemoveImage (int i) |
| void | RemoveImages () |
| void | UpdateImage () |
| void | GetRange () |
| void | DrawView (System.Drawing.Graphics g) |
| Draws the viewport when Hardware Acceleration is off. | |
| double | GetScale () |
| double | GetSelectionBoxHitSize () |
| void | CopySelection () |
| It takes the selected ROIs and copies them to the clipboard. | |
| void | PasteSelection () |
| PointD | ImageToViewSpace (double x, double y) |
| PointF | ToViewSpace (PointF p) |
| PointD | ToViewSpace (PointD p) |
| PointD | ToViewSpace (double x, double y) |
| 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) |
| float | ToScreenScaleW (double x) |
| float | ToScreenScaleH (double y) |
| PointF | ToScreenScale (PointD p) |
| RectangleD | ToScreenRect (double x, double y, double w, double h) |
| SKRect | ToSKRect (double x, double y, double w, double h) |
| RectangleD | ToScreenSpace (RectangleD p) |
| RectangleD | ToScreenSpace (RectangleF p) |
| RectangleD[] | ToScreenSpace (RectangleD[] p) |
| RectangleF[] | ToScreenSpace (RectangleF[] p) |
| PointF[] | ToScreenSpace (PointD[] p) |
| float | ToScreenW (double x) |
| float | ToScreenH (double y) |
| void | ImageView_KeyDown (object sender, KeyEventArgs e) |
| void | GoToImage () |
| void | GoToImage (int i) |
| new void | Dispose () |
| void | GoToStage () |
| void | MoveStageToImage () |
| void | MoveStageToImage (int i) |
Public Attributes | |
| List< Layer > | Layers = new List<Layer>() |
| Image | Buf = null |
| bool | init = false |
| List< BioImage > | Images = new List<BioImage>() |
| string | filepath = "" |
| int | serie = 0 |
| int | minSizeX = 50 |
| int | minSizeY = 20 |
| bool | loopZ = true |
| bool | loopT = true |
| bool | loopC = true |
| bool | showRROIs = true |
| bool | showGROIs = true |
| bool | showBROIs = true |
| Drawing.Bitmap | overviewImage |
Static Public Attributes | |
| static List< ROI > | selectedAnnotations = new List<ROI>() |
| static PointD | mouseDown |
| static bool | down |
| static PointD | mouseUp |
| static bool | up |
| static MouseButtons | mouseUpButtons |
| static MouseButtons | mouseDownButtons |
| static bool | showBounds = true |
| static bool | showText = true |
Protected Member Functions | |
| override bool | ProcessCmdKey (ref Message msg, Keys keyData) |
| override void | Dispose (bool disposing) |
| Clean up any resources being used. | |
| override void | OnLayout (LayoutEventArgs e) |
Properties | |
| static BioImage | SelectedImage [get, set] |
| static Bitmap | SelectedBuffer [get] |
| static bool | Ctrl [get] |
| int | SelectedIndex = 0 [get, set] |
| A property that is used to set the selected index of the image. */. | |
| Tools | tools [get] |
| Rectangle | OverView [get] |
| bool | ShowStage [get, set] |
| bool | ShowControls [get, set] |
| Setting the visibility of the trackBarPanel. */. | |
| bool | ShowStatus [get, set] |
| Setting the value of the property ShowStatus. */. | |
| double | PxWmicron [get, set] |
| Only used when opening stacks. | |
| double | PxHmicron [get, set] |
| Only used when opening stacks. | |
| ViewMode | Mode [get, set] |
| Setting the view mode of the application. */. | |
| string | Path [get] |
| A property that returns the filepath. */. | |
| Channel | RChannel [get] |
| A property that returns the R channel of the selected image. */. | |
| Channel | GChannel [get] |
| A property that returns the G channel of the image. */. | |
| Channel | BChannel [get] |
| Getting the B channel of the image. */. | |
| bool | OpenSlide [get] |
| int? | MacroResolution [get] |
| int? | LabelResolution [get] |
| int | ViewWidth [get] |
| int | ViewHeight [get] |
| PointD | Origin [get, set] |
| A property of the class PointD. */. | |
| PointD | PyramidalOrigin [get, set] |
| Setting the value of the pyramidalOrigin variable. */. | |
| double | Resolution [get, set] |
| A property of the class ImageViewer. It is a getter and setter for the resolution of the image. | |
| int | Level [get] |
| Current level when viewing whole-slide and pyramidal images. | |
| new AForge.SizeF | Scale [get, set] |
| Scale when opening image stacks. | |
| ContextMenuStrip | ViewContextMenu [get] |
| A property that returns a ContextMenuStrip object. */. | |
| int | ZFps [get, set] |
| Setting the interval of the timer to the value of the fps. */. | |
| int | TimeFps [get, set] |
| Setting the interval of the timer to the value of the timefps variable. */. | |
| int | CFps [get, set] |
| Setting the interval of the timer to the inverse of the fps. */. | |
| List< ROI > | AnnotationsR [get] |
| List< ROI > | AnnotationsG [get] |
| List< ROI > | AnnotationsB [get] |
| List< ROI > | AnnotationsRGB [get] |
| PointD | PyramidalOriginTransformed [get, set] |
| PointD | MouseDownInt [get, set] |
| PointD | MouseUpInt [get, set] |
| PointD | MouseMoveInt [get, set] |
| bool | ShowMasks = true [get, set] |
| bool | ShowOverview [get, set] |
ImageView control for image stacks, pyramidal and whole-slide-images.
Definition at line 6 of file ImageView.ScrollBars.cs.
| BioImager.ImageView.ImageView | ( | BioImage | im, |
| bool | OpenWithOpenSlide = true ) |
Initializing the image viewer. */.
Definition at line 36 of file ImageView.cs.
| BioImager.ImageView.ImageView | ( | ) |
Initializing the ImageView class. */.
Definition at line 121 of file ImageView.cs.
| void BioImager.ImageView.AddImage | ( | BioImage | im | ) |
This function adds an image to the list of images, and then updates the GUI to reflect the new image
| BioImage | This is a class that contains the image data, and some other information about the image. |
Definition at line 475 of file ImageView.cs.
| void BioImager.ImageView.CopySelection | ( | ) |
It takes the selected ROIs and copies them to the clipboard.
Definition at line 3187 of file ImageView.cs.
| new void BioImager.ImageView.Dispose | ( | ) |
Definition at line 3951 of file ImageView.cs.
|
protected |
Clean up any resources being used.
| disposing | true if managed resources should be disposed; otherwise, false. |
Definition at line 15 of file ImageView.designer.cs.
| void BioImager.ImageView.DrawView | ( | System.Drawing.Graphics | g | ) |
Draws the viewport when Hardware Acceleration is off.
| g |
Definition at line 2562 of file ImageView.cs.
| ZCT BioImager.ImageView.GetCoordinate | ( | ) |
It returns the coordinate of the selected image
Definition at line 463 of file ImageView.cs.
| void BioImager.ImageView.GetRange | ( | ) |
It creates a new RangeTool object, which is a form that allows the user to set the range of the data to be displayed.
The RangeTool object is created with the following parameters:
The RangeTool object is then shown to the user.
If the user clicks the
Definition at line 1879 of file ImageView.cs.
| double BioImager.ImageView.GetScale | ( | ) |
GetScale() returns the scale of the image in the viewport.
Definition at line 2658 of file ImageView.cs.
| double BioImager.ImageView.GetSelectionBoxHitSize | ( | ) |
Definition at line 2663 of file ImageView.cs.
| void BioImager.ImageView.GoToImage | ( | ) |
If the selected image is not null, set the origin to the center of the image, and set the scale to the height of the image.
Definition at line 3728 of file ImageView.cs.
| void BioImager.ImageView.GoToImage | ( | int | i | ) |
It takes an image index and centers the image in the viewport
| i | the index of the image to go to |
Definition at line 3770 of file ImageView.cs.
| void BioImager.ImageView.GoToStage | ( | ) |
Definition at line 4071 of file ImageView.cs.
| PointD BioImager.ImageView.ImageToViewSpace | ( | double | x, |
| double | y ) |
It takes a point in the image space and returns the point in the view space
| x | the x coordinate of the point in the image |
| y | the y coordinate of the point in the image |
Definition at line 3301 of file ImageView.cs.
| void BioImager.ImageView.ImageView_KeyDown | ( | object | sender, |
| KeyEventArgs | e ) |
If the user presses the "C" key while holding down the "Control" key, then the function "CopySelection" is called
| sender | The object that raised the event. |
| KeyEventArgs | The event arguments for the key press. |
Definition at line 3651 of file ImageView.cs.
| void BioImager.ImageView.InitGUI | ( | ) |
It initializes the GUI
Definition at line 874 of file ImageView.cs.
| void BioImager.ImageView.MoveStageToImage | ( | ) |
Move the stage to the location of the selected image
Definition at line 4088 of file ImageView.cs.
| void BioImager.ImageView.MoveStageToImage | ( | int | i | ) |
Move the stage to the location of the image at index i
| i | the index of the image in the list of images |
Definition at line 4099 of file ImageView.cs.
|
protected |
Definition at line 16 of file ImageView.Layout.cs.
| void BioImager.ImageView.PasteSelection | ( | ) |
We get the text from the clipboard, split it into lines, and then for each line, if it's longer than 8 characters, we convert it to an ROI and add it to the image
Definition at line 3203 of file ImageView.cs.
|
protected |
Definition at line 150 of file ImageView.cs.
| void BioImager.ImageView.RemoveImage | ( | int | i | ) |
Definition at line 1601 of file ImageView.cs.
| void BioImager.ImageView.RemoveImages | ( | ) |
Definition at line 1612 of file ImageView.cs.
| void BioImager.ImageView.SetCoordinate | ( | int | z, |
| int | c, | ||
| int | t ) |
Definition at line 431 of file ImageView.cs.
| float BioImager.ImageView.ToScreenH | ( | double | y | ) |
Convert a value in microns to a value in pixels
| y | the y coordinate of the point to be converted |
Definition at line 3640 of file ImageView.cs.
| RectangleD BioImager.ImageView.ToScreenRect | ( | double | x, |
| double | y, | ||
| double | w, | ||
| double | h ) |
It converts a rectangle in microns to a rectangle in pixels
| x | The x coordinate of the rectangle |
| y | -0.0015 |
| w | width of the image in microns |
| h | height of the rectangle |
Definition at line 3529 of file ImageView.cs.
Convert a point in the world coordinate system to a point in the screen coordinate system
| PointD |
Definition at line 3515 of file ImageView.cs.
| float BioImager.ImageView.ToScreenScaleH | ( | double | y | ) |
Convert a value in microns to a value in pixels
| y | the y coordinate of the point to be converted |
Definition at line 3506 of file ImageView.cs.
| float BioImager.ImageView.ToScreenScaleW | ( | double | x | ) |
ToScreenScaleW() returns the number of pixels that correspond to the given number of microns
| x | the x coordinate of the point to be converted |
Definition at line 3497 of file ImageView.cs.
| PointD BioImager.ImageView.ToScreenSpace | ( | double | x, |
| double | y ) |
It converts a point in world space to a point in screen space
| x | The x coordinate of the point to convert. |
| y | The y coordinate of the point to transform. |
Definition at line 3405 of file ImageView.cs.
| PointF BioImager.ImageView.ToScreenSpace | ( | Point3D | p | ) |
It converts a 3D point to a 2D point
| Point3D |
Definition at line 3487 of file ImageView.cs.
Converts a point from world space to screen space
| PointD | A class that contains an X and Y value. |
Definition at line 3420 of file ImageView.cs.
Convert a list of points from world space to screen space
| p | The point to convert |
Definition at line 3616 of file ImageView.cs.
Convert a point in the world coordinate system to the screen coordinate system
| PointF | The point you want to convert to screen space. |
Definition at line 3429 of file ImageView.cs.
It takes an array of points and returns an array of points
| p | The point to convert |
Definition at line 3439 of file ImageView.cs.
| RectangleD BioImager.ImageView.ToScreenSpace | ( | RectangleD | p | ) |
It converts a rectangle from world space to screen space
| RectangleD | The rectangle to convert. |
Definition at line 3570 of file ImageView.cs.
| RectangleD[] BioImager.ImageView.ToScreenSpace | ( | RectangleD[] | p | ) |
It takes an array of RectangleD objects and returns an array of RectangleF objects
| p | The rectangle to convert |
Definition at line 3588 of file ImageView.cs.
| RectangleD BioImager.ImageView.ToScreenSpace | ( | RectangleF | p | ) |
It converts a rectangle from world space to screen space
| RectangleF | The rectangle to convert. |
Definition at line 3579 of file ImageView.cs.
| RectangleF[] BioImager.ImageView.ToScreenSpace | ( | RectangleF[] | p | ) |
It takes an array of RectangleF objects and returns an array of RectangleF objects
| p | The rectangle to convert |
Definition at line 3602 of file ImageView.cs.
| float BioImager.ImageView.ToScreenW | ( | double | x | ) |
ToScreenW(x) = x * PxWmicron
| x | the x coordinate of the point to be converted |
Definition at line 3631 of file ImageView.cs.
| SKRect BioImager.ImageView.ToSKRect | ( | double | x, |
| double | y, | ||
| double | w, | ||
| double | h ) |
It takes a rectangle in the coordinate system of the stage and returns a rectangle in the coordinate system of the picturebox
| x | The x coordinate of the upper-left corner of the rectangle. |
| y | The y-coordinate of the upper-left corner of the rectangle. |
| w | width of the rectangle |
| h | height of the rectangle |
Definition at line 3559 of file ImageView.cs.
| double BioImager.ImageView.ToViewH | ( | double | d | ) |
Convert a distance in microns to a distance in pixels
| d | the distance in microns |
Definition at line 3394 of file ImageView.cs.
| double BioImager.ImageView.ToViewSizeH | ( | double | d | ) |
Convert a value in microns to a value in pixels
| d | the size in microns |
Definition at line 3369 of file ImageView.cs.
| PointD BioImager.ImageView.ToViewSpace | ( | double | x, |
| double | y ) |
ToViewSpace(x, y) = (ToViewSizeW(x - (ViewWidth / 2)) / Scale.Width) - Origin.X;
| x | The x coordinate of the point to convert |
| y | The y coordinate of the point to convert. |
Definition at line 3337 of file ImageView.cs.
Converts a point from world space to view space
| PointD | A class that contains an X and Y value. |
Definition at line 3327 of file ImageView.cs.
Convert a point from world space to view space
| PointF | The point to convert |
Definition at line 3317 of file ImageView.cs.
| double BioImager.ImageView.ToViewW | ( | double | d | ) |
Convert a distance in microns to a distance in pixels on the screen
| d | the distance in microns |
Definition at line 3384 of file ImageView.cs.
| void BioImager.ImageView.UpdateImage | ( | ) |
It takes a 16-bit image, converts it to 8-bit, and then converts it to a DirectX texture
Definition at line 1630 of file ImageView.cs.
| async void BioImager.ImageView.UpdateImages | ( | bool | updatePyramidal = true | ) |
Definition at line 1377 of file ImageView.cs.
| void BioImager.ImageView.UpdateOverlay | ( | ) |
If hardware acceleration is enabled, render the frame. Otherwise, set a flag to update the overlay and invalidate the overlay picture box
Definition at line 982 of file ImageView.cs.
| void BioImager.ImageView.UpdateRGBChannels | ( | ) |
Definition at line 811 of file ImageView.cs.
| void BioImager.ImageView.UpdateSelectBoxSize | ( | float | size | ) |
This function is called from the Unity Editor when the user changes the size of the select box
| size | The size of the box that will be drawn around the ROI. |
Definition at line 937 of file ImageView.cs.
| void BioImager.ImageView.UpdateStatus | ( | ) |
It updates the status bar of the image viewer
Definition at line 997 of file ImageView.cs.
| void BioImager.ImageView.UpdateView | ( | bool | refreshImages = true | ) |
If hardware acceleration is enabled, render the frame. Otherwise, invalidate the picture box.
Definition at line 1025 of file ImageView.cs.
| void BioImager.ImageView.UpdateViewLegacy | ( | bool | refresh | ) |
It draws the images and annotations to the screen
Update the status of the application and then render the frame
| refresh | boolean |
Definition at line 1361 of file ImageView.cs.
| Image BioImager.ImageView.Buf = null |
Definition at line 320 of file ImageView.cs.
|
static |
Definition at line 303 of file ImageView.cs.
| string BioImager.ImageView.filepath = "" |
Definition at line 406 of file ImageView.cs.
Definition at line 323 of file ImageView.cs.
| bool BioImager.ImageView.init = false |
Definition at line 321 of file ImageView.cs.
Definition at line 254 of file ImageView.cs.
| bool BioImager.ImageView.loopC = true |
Definition at line 412 of file ImageView.cs.
| bool BioImager.ImageView.loopT = true |
Definition at line 411 of file ImageView.cs.
| bool BioImager.ImageView.loopZ = true |
Definition at line 410 of file ImageView.cs.
| int BioImager.ImageView.minSizeX = 50 |
Definition at line 408 of file ImageView.cs.
| int BioImager.ImageView.minSizeY = 20 |
Definition at line 409 of file ImageView.cs.
|
static |
Definition at line 302 of file ImageView.cs.
|
static |
Definition at line 316 of file ImageView.cs.
|
static |
Definition at line 304 of file ImageView.cs.
|
static |
Definition at line 315 of file ImageView.cs.
| Drawing.Bitmap BioImager.ImageView.overviewImage |
Definition at line 11 of file ImageView.Overview.cs.
|
static |
Definition at line 267 of file ImageView.cs.
| int BioImager.ImageView.serie = 0 |
Definition at line 407 of file ImageView.cs.
|
static |
Definition at line 318 of file ImageView.cs.
| bool BioImager.ImageView.showBROIs = true |
Definition at line 2172 of file ImageView.cs.
| bool BioImager.ImageView.showGROIs = true |
Definition at line 2171 of file ImageView.cs.
| bool BioImager.ImageView.showRROIs = true |
Definition at line 2170 of file ImageView.cs.
|
static |
Definition at line 319 of file ImageView.cs.
|
static |
Definition at line 305 of file ImageView.cs.
|
get |
Definition at line 2203 of file ImageView.cs.
|
get |
Definition at line 2189 of file ImageView.cs.
|
get |
Definition at line 2175 of file ImageView.cs.
|
get |
Definition at line 2216 of file ImageView.cs.
|
get |
Getting the B channel of the image. */.
Definition at line 682 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the inverse of the fps. */.
Definition at line 858 of file ImageView.cs.
|
staticget |
Definition at line 306 of file ImageView.cs.
|
get |
A property that returns the G channel of the image. */.
Definition at line 674 of file ImageView.cs.
|
get |
Definition at line 696 of file ImageView.cs.
|
get |
Current level when viewing whole-slide and pyramidal images.
Definition at line 764 of file ImageView.cs.
|
get |
Definition at line 695 of file ImageView.cs.
|
getset |
Setting the view mode of the application. */.
Definition at line 608 of file ImageView.cs.
|
getset |
Definition at line 3744 of file ImageView.cs.
|
getset |
Definition at line 3756 of file ImageView.cs.
|
getset |
Definition at line 3750 of file ImageView.cs.
|
get |
Definition at line 691 of file ImageView.cs.
|
getset |
A property of the class PointD. */.
Definition at line 717 of file ImageView.cs.
|
get |
Definition at line 414 of file ImageView.cs.
|
get |
A property that returns the filepath. */.
Definition at line 658 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 587 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 572 of file ImageView.cs.
|
getset |
Setting the value of the pyramidalOrigin variable. */.
Definition at line 729 of file ImageView.cs.
|
getset |
Definition at line 3733 of file ImageView.cs.
|
get |
A property that returns the R channel of the selected image. */.
Definition at line 666 of file ImageView.cs.
|
getset |
A property of the class ImageViewer. It is a getter and setter for the resolution of the image.
Definition at line 745 of file ImageView.cs.
|
getset |
Scale when opening image stacks.
Definition at line 778 of file ImageView.cs.
|
staticget |
Definition at line 294 of file ImageView.cs.
|
staticgetset |
Definition at line 269 of file ImageView.cs.
|
getset |
A property that is used to set the selected index of the image. */.
Definition at line 389 of file ImageView.cs.
|
getset |
Setting the visibility of the trackBarPanel. */.
Definition at line 538 of file ImageView.cs.
|
getset |
Definition at line 3763 of file ImageView.cs.
|
getset |
Definition at line 21 of file ImageView.Overview.cs.
|
getset |
Definition at line 419 of file ImageView.cs.
|
getset |
Setting the value of the property ShowStatus. */.
Definition at line 555 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the timefps variable. */.
Definition at line 842 of file ImageView.cs.
|
get |
Definition at line 405 of file ImageView.cs.
|
get |
A property that returns a ContextMenuStrip object. */.
Definition at line 793 of file ImageView.cs.
|
get |
Definition at line 706 of file ImageView.cs.
|
get |
Definition at line 697 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the fps. */.
Definition at line 826 of file ImageView.cs.