![]() |
BioImager
4.9.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 () |
| void | UpdateView (bool refresh) |
| async void | UpdateImages (bool updatePyramidal=false) |
| 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 () |
| 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 |
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. | |
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 | ShowOverview [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] |
ImageView control for image stacks, pyramidal and whole-slide-images.
Definition at line 4 of file ImageView.designer.cs.
| enum BioImager.ImageView.ViewMode |
Definition at line 610 of file ImageView.cs.
| BioImager.ImageView.ImageView | ( | BioImage | im, |
| bool | OpenWithOpenSlide = true ) |
Initializing the image viewer. */.
Definition at line 38 of file ImageView.cs.
| BioImager.ImageView.ImageView | ( | ) |
Initializing the ImageView class. */.
Definition at line 118 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 429 of file ImageView.cs.
| void BioImager.ImageView.CopySelection | ( | ) |
It takes the selected ROIs and copies them to the clipboard.
Definition at line 2749 of file ImageView.cs.
| new void BioImager.ImageView.Dispose | ( | ) |
Definition at line 3390 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 2214 of file ImageView.cs.
| ZCT BioImager.ImageView.GetCoordinate | ( | ) |
It returns the coordinate of the selected image
Definition at line 420 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 1648 of file ImageView.cs.
| double BioImager.ImageView.GetScale | ( | ) |
GetScale() returns the scale of the image in the viewport.
Definition at line 2325 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 3252 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 3294 of file ImageView.cs.
| void BioImager.ImageView.GoToStage | ( | ) |
Definition at line 3504 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 2863 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 3177 of file ImageView.cs.
| void BioImager.ImageView.InitGUI | ( | ) |
It initializes the GUI
Definition at line 910 of file ImageView.cs.
| void BioImager.ImageView.MoveStageToImage | ( | ) |
Move the stage to the location of the selected image
Definition at line 3521 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 3532 of file ImageView.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 2765 of file ImageView.cs.
|
protected |
Definition at line 145 of file ImageView.cs.
| void BioImager.ImageView.RemoveImage | ( | int | i | ) |
Definition at line 1355 of file ImageView.cs.
| void BioImager.ImageView.RemoveImages | ( | ) |
Definition at line 1366 of file ImageView.cs.
| void BioImager.ImageView.SetCoordinate | ( | int | z, |
| int | c, | ||
| int | t ) |
Sets the coordinate of the image to the specified Z, C, and T values
| z | the z-coordinate of the image |
| c | channel |
| t | time |
Definition at line 389 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 3166 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 3055 of file ImageView.cs.
| PointF BioImager.ImageView.ToScreenScale | ( | PointD | p | ) |
Convert a point in the world coordinate system to a point in the screen coordinate system
| PointD |
Definition at line 3041 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 3032 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 3023 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 2969 of file ImageView.cs.
| PointF BioImager.ImageView.ToScreenSpace | ( | Point3D | p | ) |
It converts a 3D point to a 2D point
| Point3D |
Definition at line 3013 of file ImageView.cs.
| PointD BioImager.ImageView.ToScreenSpace | ( | PointD | p | ) |
Converts a point from world space to screen space
| PointD | A class that contains an X and Y value. |
Definition at line 2980 of file ImageView.cs.
| PointF[] BioImager.ImageView.ToScreenSpace | ( | PointD[] | p | ) |
Convert a list of points from world space to screen space
| p | The point to convert |
Definition at line 3142 of file ImageView.cs.
| PointF BioImager.ImageView.ToScreenSpace | ( | PointF | p | ) |
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 2989 of file ImageView.cs.
| PointF[] BioImager.ImageView.ToScreenSpace | ( | PointF[] | p | ) |
It takes an array of points and returns an array of points
| p | The point to convert |
Definition at line 2999 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 3096 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 3114 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 3105 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 3128 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 3157 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 3085 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 2958 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 2933 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 2899 of file ImageView.cs.
| PointD BioImager.ImageView.ToViewSpace | ( | PointD | p | ) |
Converts a point from world space to view space
| PointD | A class that contains an X and Y value. |
Definition at line 2889 of file ImageView.cs.
| PointF BioImager.ImageView.ToViewSpace | ( | PointF | p | ) |
Convert a point from world space to view space
| PointF | The point to convert |
Definition at line 2879 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 2948 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 1384 of file ImageView.cs.
| async void BioImager.ImageView.UpdateImages | ( | bool | updatePyramidal = false | ) |
It takes a list of images, and for each image, it gets the image at the current Z, C, T coordinates, and then converts it to a bitmap
Definition at line 1291 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 970 of file ImageView.cs.
| void BioImager.ImageView.UpdateRGBChannels | ( | ) |
"If the user has selected a channel, then set the channel to the selected index, otherwise set it to 0."
The above function is called when the user changes the channel selection
Definition at line 841 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 962 of file ImageView.cs.
| void BioImager.ImageView.UpdateStatus | ( | ) |
It updates the status bar of the image viewer
Definition at line 978 of file ImageView.cs.
| void BioImager.ImageView.UpdateView | ( | ) |
If hardware acceleration is enabled, render the frame. Otherwise, invalidate the picture box.
Definition at line 1021 of file ImageView.cs.
| void BioImager.ImageView.UpdateView | ( | 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 1277 of file ImageView.cs.
| Image BioImager.ImageView.Buf = null |
Definition at line 294 of file ImageView.cs.
|
static |
Definition at line 277 of file ImageView.cs.
| string BioImager.ImageView.filepath = "" |
Definition at line 364 of file ImageView.cs.
| List<BioImage> BioImager.ImageView.Images = new List<BioImage>() |
Definition at line 298 of file ImageView.cs.
| bool BioImager.ImageView.init = false |
Definition at line 295 of file ImageView.cs.
Definition at line 230 of file ImageView.cs.
| bool BioImager.ImageView.loopC = true |
Definition at line 370 of file ImageView.cs.
| bool BioImager.ImageView.loopT = true |
Definition at line 369 of file ImageView.cs.
| bool BioImager.ImageView.loopZ = true |
Definition at line 368 of file ImageView.cs.
| int BioImager.ImageView.minSizeX = 50 |
Definition at line 366 of file ImageView.cs.
| int BioImager.ImageView.minSizeY = 20 |
Definition at line 367 of file ImageView.cs.
|
static |
Definition at line 276 of file ImageView.cs.
|
static |
Definition at line 290 of file ImageView.cs.
|
static |
Definition at line 278 of file ImageView.cs.
|
static |
Definition at line 289 of file ImageView.cs.
|
static |
Definition at line 243 of file ImageView.cs.
| int BioImager.ImageView.serie = 0 |
Definition at line 365 of file ImageView.cs.
|
static |
Definition at line 292 of file ImageView.cs.
| bool BioImager.ImageView.showBROIs = true |
Definition at line 1910 of file ImageView.cs.
| bool BioImager.ImageView.showGROIs = true |
Definition at line 1909 of file ImageView.cs.
| bool BioImager.ImageView.showRROIs = true |
Definition at line 1908 of file ImageView.cs.
|
static |
Definition at line 293 of file ImageView.cs.
|
static |
Definition at line 279 of file ImageView.cs.
|
get |
Definition at line 1929 of file ImageView.cs.
|
get |
Definition at line 1921 of file ImageView.cs.
|
get |
Definition at line 1913 of file ImageView.cs.
|
get |
Definition at line 1936 of file ImageView.cs.
|
get |
Getting the B channel of the image. */.
Definition at line 694 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the inverse of the fps. */.
Definition at line 894 of file ImageView.cs.
|
staticget |
Definition at line 280 of file ImageView.cs.
|
get |
A property that returns the G channel of the image. */.
Definition at line 686 of file ImageView.cs.
|
get |
Definition at line 709 of file ImageView.cs.
|
get |
Current level when viewing whole-slide and pyramidal images.
Definition at line 795 of file ImageView.cs.
|
get |
Definition at line 708 of file ImageView.cs.
|
getset |
Setting the view mode of the application. */.
Definition at line 620 of file ImageView.cs.
|
getset |
Definition at line 3268 of file ImageView.cs.
|
getset |
Definition at line 3280 of file ImageView.cs.
|
getset |
Definition at line 3274 of file ImageView.cs.
|
get |
Definition at line 704 of file ImageView.cs.
|
getset |
A property of the class PointD. */.
Definition at line 726 of file ImageView.cs.
|
get |
Definition at line 373 of file ImageView.cs.
|
get |
A property that returns the filepath. */.
Definition at line 670 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 599 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 584 of file ImageView.cs.
|
getset |
Setting the value of the pyramidalOrigin variable. */.
Definition at line 738 of file ImageView.cs.
|
getset |
Definition at line 3257 of file ImageView.cs.
|
get |
A property that returns the R channel of the selected image. */.
Definition at line 678 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 751 of file ImageView.cs.
|
getset |
Scale when opening image stacks.
Definition at line 809 of file ImageView.cs.
|
staticget |
Definition at line 268 of file ImageView.cs.
|
staticgetset |
Definition at line 245 of file ImageView.cs.
|
getset |
A property that is used to set the selected index of the image. */.
Definition at line 350 of file ImageView.cs.
|
getset |
Setting the visibility of the trackBarPanel. */.
Definition at line 510 of file ImageView.cs.
|
getset |
Definition at line 3287 of file ImageView.cs.
|
getset |
Definition at line 505 of file ImageView.cs.
|
getset |
Definition at line 378 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 878 of file ImageView.cs.
|
get |
Definition at line 363 of file ImageView.cs.
|
get |
A property that returns a ContextMenuStrip object. */.
Definition at line 830 of file ImageView.cs.
|
get |
Definition at line 717 of file ImageView.cs.
|
get |
Definition at line 710 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the fps. */.
Definition at line 862 of file ImageView.cs.