![]() |
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 (bool refreshImages=true) |
| void | UpdateViewLegacy (bool refresh) |
| async void | UpdateImages () |
| 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 |
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 822 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 128 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 501 of file ImageView.cs.
| void BioImager.ImageView.CopySelection | ( | ) |
It takes the selected ROIs and copies them to the clipboard.
Definition at line 3750 of file ImageView.cs.
| new void BioImager.ImageView.Dispose | ( | ) |
Definition at line 4513 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 2714 of file ImageView.cs.
| ZCT BioImager.ImageView.GetCoordinate | ( | ) |
It returns the coordinate of the selected image
Definition at line 489 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 2029 of file ImageView.cs.
| double BioImager.ImageView.GetScale | ( | ) |
GetScale() returns the scale of the image in the viewport.
Definition at line 3215 of file ImageView.cs.
| double BioImager.ImageView.GetSelectionBoxHitSize | ( | ) |
Definition at line 3220 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 4291 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 4333 of file ImageView.cs.
| void BioImager.ImageView.GoToStage | ( | ) |
Definition at line 4639 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 3864 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 4214 of file ImageView.cs.
| void BioImager.ImageView.InitGUI | ( | ) |
It initializes the GUI
Definition at line 1119 of file ImageView.cs.
| void BioImager.ImageView.MoveStageToImage | ( | ) |
Move the stage to the location of the selected image
Definition at line 4656 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 4667 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 3766 of file ImageView.cs.
|
protected |
Definition at line 158 of file ImageView.cs.
| void BioImager.ImageView.RemoveImage | ( | int | i | ) |
Definition at line 1736 of file ImageView.cs.
| void BioImager.ImageView.RemoveImages | ( | ) |
Definition at line 1747 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 461 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 4203 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 4092 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 4078 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 4069 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 4060 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 3968 of file ImageView.cs.
| PointF BioImager.ImageView.ToScreenSpace | ( | Point3D | p | ) |
It converts a 3D point to a 2D point
| Point3D |
Definition at line 4050 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 3983 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 4179 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 3992 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 4002 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 4133 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 4151 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 4142 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 4165 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 4194 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 4122 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 3957 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 3932 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 3900 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 3890 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 3880 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 3947 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 1765 of file ImageView.cs.
| async void BioImager.ImageView.UpdateImages | ( | ) |
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 1626 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 1219 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 1050 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 1174 of file ImageView.cs.
| void BioImager.ImageView.UpdateStatus | ( | ) |
It updates the status bar of the image viewer
Definition at line 1234 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 1277 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 1611 of file ImageView.cs.
| Image BioImager.ImageView.Buf = null |
Definition at line 348 of file ImageView.cs.
|
static |
Definition at line 331 of file ImageView.cs.
| string BioImager.ImageView.filepath = "" |
Definition at line 437 of file ImageView.cs.
| List<BioImage> BioImager.ImageView.Images = new List<BioImage>() |
Definition at line 351 of file ImageView.cs.
| bool BioImager.ImageView.init = false |
Definition at line 349 of file ImageView.cs.
Definition at line 282 of file ImageView.cs.
| bool BioImager.ImageView.loopC = true |
Definition at line 443 of file ImageView.cs.
| bool BioImager.ImageView.loopT = true |
Definition at line 442 of file ImageView.cs.
| bool BioImager.ImageView.loopZ = true |
Definition at line 441 of file ImageView.cs.
| int BioImager.ImageView.minSizeX = 50 |
Definition at line 439 of file ImageView.cs.
| int BioImager.ImageView.minSizeY = 20 |
Definition at line 440 of file ImageView.cs.
|
static |
Definition at line 330 of file ImageView.cs.
|
static |
Definition at line 344 of file ImageView.cs.
|
static |
Definition at line 332 of file ImageView.cs.
|
static |
Definition at line 343 of file ImageView.cs.
|
static |
Definition at line 295 of file ImageView.cs.
| int BioImager.ImageView.serie = 0 |
Definition at line 438 of file ImageView.cs.
|
static |
Definition at line 346 of file ImageView.cs.
| bool BioImager.ImageView.showBROIs = true |
Definition at line 2324 of file ImageView.cs.
| bool BioImager.ImageView.showGROIs = true |
Definition at line 2323 of file ImageView.cs.
| bool BioImager.ImageView.showRROIs = true |
Definition at line 2322 of file ImageView.cs.
|
static |
Definition at line 347 of file ImageView.cs.
|
static |
Definition at line 333 of file ImageView.cs.
|
get |
Definition at line 2355 of file ImageView.cs.
|
get |
Definition at line 2341 of file ImageView.cs.
|
get |
Definition at line 2327 of file ImageView.cs.
|
get |
Definition at line 2368 of file ImageView.cs.
|
get |
Getting the B channel of the image. */.
Definition at line 906 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the inverse of the fps. */.
Definition at line 1103 of file ImageView.cs.
|
staticget |
Definition at line 334 of file ImageView.cs.
|
get |
A property that returns the G channel of the image. */.
Definition at line 898 of file ImageView.cs.
|
get |
Definition at line 920 of file ImageView.cs.
|
get |
Current level when viewing whole-slide and pyramidal images.
Definition at line 1010 of file ImageView.cs.
|
get |
Definition at line 919 of file ImageView.cs.
|
getset |
Setting the view mode of the application. */.
Definition at line 832 of file ImageView.cs.
|
getset |
Definition at line 4307 of file ImageView.cs.
|
getset |
Definition at line 4319 of file ImageView.cs.
|
getset |
Definition at line 4313 of file ImageView.cs.
|
get |
Definition at line 915 of file ImageView.cs.
|
getset |
A property of the class PointD. */.
Definition at line 941 of file ImageView.cs.
|
get |
Definition at line 445 of file ImageView.cs.
|
get |
A property that returns the filepath. */.
Definition at line 882 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 811 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 796 of file ImageView.cs.
|
getset |
Setting the value of the pyramidalOrigin variable. */.
Definition at line 953 of file ImageView.cs.
|
getset |
Definition at line 4296 of file ImageView.cs.
|
get |
A property that returns the R channel of the selected image. */.
Definition at line 890 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 969 of file ImageView.cs.
|
getset |
Scale when opening image stacks.
Definition at line 1024 of file ImageView.cs.
|
staticget |
Definition at line 322 of file ImageView.cs.
|
staticgetset |
Definition at line 297 of file ImageView.cs.
|
getset |
A property that is used to set the selected index of the image. */.
Definition at line 421 of file ImageView.cs.
|
getset |
Setting the visibility of the trackBarPanel. */.
Definition at line 722 of file ImageView.cs.
|
getset |
Definition at line 4326 of file ImageView.cs.
|
getset |
Definition at line 717 of file ImageView.cs.
|
getset |
Definition at line 450 of file ImageView.cs.
|
getset |
Setting the value of the property ShowStatus. */.
Definition at line 767 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the timefps variable. */.
Definition at line 1087 of file ImageView.cs.
|
get |
Definition at line 436 of file ImageView.cs.
|
get |
A property that returns a ContextMenuStrip object. */.
Definition at line 1039 of file ImageView.cs.
|
get |
Definition at line 930 of file ImageView.cs.
|
get |
Definition at line 921 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the fps. */.
Definition at line 1071 of file ImageView.cs.