![]() |
BioCore
5.0.0
A Windows .NET microscopy library and application for viewing, editing, and annotating images.
|
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=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 () |
| 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 | ImageView_KeyUp (object sender, KeyEventArgs e) |
| void | ImageView_KeyPress (object sender, System.Windows.Forms.KeyPressEventArgs e) |
| void | GoToImage () |
| void | GoToImage (int i) |
| new void | Dispose () |
| void | MoveStageToImage () |
| void | MoveStageToImage (int i) |
Public Attributes | |
| List< Layer > | Layers = new List<Layer>() |
| Image | Buf = null |
| bool | init = false |
| System.Drawing.Bitmap | overviewImage = null |
| 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 void | OnLayout (LayoutEventArgs e) |
| 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] |
| List< BioImage > | Images [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 5 of file ImageView.ScrollBars.cs.
| BioCore.ImageView.ImageView | ( | BioImage | im, |
| bool | OpenWithOpenSlide = true ) |
Initializing the image viewer. */.
Definition at line 32 of file ImageView.cs.
| BioCore.ImageView.ImageView | ( | ) |
Initializing the ImageView class. */.
Definition at line 114 of file ImageView.cs.
| void BioCore.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 485 of file ImageView.cs.
| void BioCore.ImageView.CopySelection | ( | ) |
It takes the selected ROIs and copies them to the clipboard.
Definition at line 2838 of file ImageView.cs.
| new void BioCore.ImageView.Dispose | ( | ) |
Definition at line 3474 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 BioCore.ImageView.DrawView | ( | System.Drawing.Graphics | g | ) |
Draws the viewport when Hardware Acceleration is off.
| g |
Definition at line 2354 of file ImageView.cs.
| ZCT BioCore.ImageView.GetCoordinate | ( | ) |
It returns the coordinate of the selected image
Definition at line 474 of file ImageView.cs.
| void BioCore.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 1793 of file ImageView.cs.
| double BioCore.ImageView.GetScale | ( | ) |
GetScale() returns the scale of the image in the viewport.
Definition at line 2438 of file ImageView.cs.
| void BioCore.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 3341 of file ImageView.cs.
| void BioCore.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 3383 of file ImageView.cs.
| PointD BioCore.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 2952 of file ImageView.cs.
| void BioCore.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 3266 of file ImageView.cs.
| void BioCore.ImageView.ImageView_KeyPress | ( | object | sender, |
| System.Windows.Forms.KeyPressEventArgs | e ) |
Definition at line 3333 of file ImageView.cs.
| void BioCore.ImageView.ImageView_KeyUp | ( | object | sender, |
| KeyEventArgs | e ) |
Definition at line 3329 of file ImageView.cs.
| void BioCore.ImageView.InitGUI | ( | ) |
It initializes the GUI
Definition at line 905 of file ImageView.cs.
| void BioCore.ImageView.MoveStageToImage | ( | ) |
Move the stage to the location of the selected image
Definition at line 3591 of file ImageView.cs.
| void BioCore.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 3602 of file ImageView.cs.
|
protected |
Definition at line 186 of file ImageView.cs.
| void BioCore.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 2854 of file ImageView.cs.
|
protected |
Definition at line 205 of file ImageView.cs.
| void BioCore.ImageView.RemoveImage | ( | int | i | ) |
Definition at line 1497 of file ImageView.cs.
| void BioCore.ImageView.RemoveImages | ( | ) |
Definition at line 1508 of file ImageView.cs.
| void BioCore.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 443 of file ImageView.cs.
| float BioCore.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 3255 of file ImageView.cs.
| RectangleD BioCore.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 3144 of file ImageView.cs.
| PointF BioCore.ImageView.ToScreenScale | ( | PointD | p | ) |
Convert a point in the world coordinate system to a point in the screen coordinate system
| PointD |
Definition at line 3130 of file ImageView.cs.
| float BioCore.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 3121 of file ImageView.cs.
| float BioCore.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 3112 of file ImageView.cs.
| PointD BioCore.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 3058 of file ImageView.cs.
| PointF BioCore.ImageView.ToScreenSpace | ( | Point3D | p | ) |
It converts a 3D point to a 2D point
| Point3D |
Definition at line 3102 of file ImageView.cs.
| PointD BioCore.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 3069 of file ImageView.cs.
| PointF[] BioCore.ImageView.ToScreenSpace | ( | PointD[] | p | ) |
Convert a list of points from world space to screen space
| p | The point to convert |
Definition at line 3231 of file ImageView.cs.
| PointF BioCore.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 3078 of file ImageView.cs.
| PointF[] BioCore.ImageView.ToScreenSpace | ( | PointF[] | p | ) |
It takes an array of points and returns an array of points
| p | The point to convert |
Definition at line 3088 of file ImageView.cs.
| RectangleD BioCore.ImageView.ToScreenSpace | ( | RectangleD | p | ) |
It converts a rectangle from world space to screen space
| RectangleD | The rectangle to convert. |
Definition at line 3185 of file ImageView.cs.
| RectangleD[] BioCore.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 3203 of file ImageView.cs.
| RectangleD BioCore.ImageView.ToScreenSpace | ( | RectangleF | p | ) |
It converts a rectangle from world space to screen space
| RectangleF | The rectangle to convert. |
Definition at line 3194 of file ImageView.cs.
| RectangleF[] BioCore.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 3217 of file ImageView.cs.
| float BioCore.ImageView.ToScreenW | ( | double | x | ) |
ToScreenW(x) = x * PxWmicron
| x | the x coordinate of the point to be converted |
Definition at line 3246 of file ImageView.cs.
| SKRect BioCore.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 3174 of file ImageView.cs.
| double BioCore.ImageView.ToViewH | ( | double | d | ) |
Convert a distance in microns to a distance in pixels
| d | the distance in microns |
Definition at line 3047 of file ImageView.cs.
| double BioCore.ImageView.ToViewSizeH | ( | double | d | ) |
Convert a value in microns to a value in pixels
| d | the size in microns |
Definition at line 3022 of file ImageView.cs.
| PointD BioCore.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 2988 of file ImageView.cs.
| PointD BioCore.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 2978 of file ImageView.cs.
| PointF BioCore.ImageView.ToViewSpace | ( | PointF | p | ) |
Convert a point from world space to view space
| PointF | The point to convert |
Definition at line 2968 of file ImageView.cs.
| double BioCore.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 3037 of file ImageView.cs.
| void BioCore.ImageView.UpdateImage | ( | ) |
It takes a 16-bit image, converts it to 8-bit, and then converts it to a DirectX texture
Definition at line 1526 of file ImageView.cs.
| async void BioCore.ImageView.UpdateImages | ( | bool | updatePyramidal = true | ) |
Definition at line 1305 of file ImageView.cs.
| void BioCore.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 967 of file ImageView.cs.
| void BioCore.ImageView.UpdateRGBChannels | ( | ) |
Definition at line 843 of file ImageView.cs.
| void BioCore.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 959 of file ImageView.cs.
| void BioCore.ImageView.UpdateStatus | ( | ) |
It updates the status bar of the image viewer
Definition at line 975 of file ImageView.cs.
| void BioCore.ImageView.UpdateView | ( | ) |
If hardware acceleration is enabled, render the frame. Otherwise, invalidate the picture box.
Definition at line 1020 of file ImageView.cs.
| void BioCore.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 1290 of file ImageView.cs.
| Image BioCore.ImageView.Buf = null |
Definition at line 353 of file ImageView.cs.
|
static |
Definition at line 336 of file ImageView.cs.
| string BioCore.ImageView.filepath = "" |
Definition at line 419 of file ImageView.cs.
| bool BioCore.ImageView.init = false |
Definition at line 354 of file ImageView.cs.
Definition at line 290 of file ImageView.cs.
| bool BioCore.ImageView.loopC = true |
Definition at line 425 of file ImageView.cs.
| bool BioCore.ImageView.loopT = true |
Definition at line 424 of file ImageView.cs.
| bool BioCore.ImageView.loopZ = true |
Definition at line 423 of file ImageView.cs.
| int BioCore.ImageView.minSizeX = 50 |
Definition at line 421 of file ImageView.cs.
| int BioCore.ImageView.minSizeY = 20 |
Definition at line 422 of file ImageView.cs.
|
static |
Definition at line 335 of file ImageView.cs.
|
static |
Definition at line 349 of file ImageView.cs.
|
static |
Definition at line 337 of file ImageView.cs.
|
static |
Definition at line 348 of file ImageView.cs.
| System.Drawing.Bitmap BioCore.ImageView.overviewImage = null |
Definition at line 365 of file ImageView.cs.
|
static |
Definition at line 303 of file ImageView.cs.
| int BioCore.ImageView.serie = 0 |
Definition at line 420 of file ImageView.cs.
|
static |
Definition at line 351 of file ImageView.cs.
| bool BioCore.ImageView.showBROIs = true |
Definition at line 2052 of file ImageView.cs.
| bool BioCore.ImageView.showGROIs = true |
Definition at line 2051 of file ImageView.cs.
| bool BioCore.ImageView.showRROIs = true |
Definition at line 2050 of file ImageView.cs.
|
static |
Definition at line 352 of file ImageView.cs.
|
static |
Definition at line 338 of file ImageView.cs.
|
get |
Definition at line 2071 of file ImageView.cs.
|
get |
Definition at line 2063 of file ImageView.cs.
|
get |
Definition at line 2055 of file ImageView.cs.
|
get |
Definition at line 2078 of file ImageView.cs.
|
get |
Getting the B channel of the image. */.
Definition at line 710 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the inverse of the fps. */.
Definition at line 889 of file ImageView.cs.
|
staticget |
Definition at line 339 of file ImageView.cs.
|
get |
A property that returns the G channel of the image. */.
Definition at line 702 of file ImageView.cs.
|
get |
Definition at line 358 of file ImageView.cs.
|
get |
Definition at line 725 of file ImageView.cs.
|
get |
Current level when viewing whole-slide and pyramidal images.
Definition at line 790 of file ImageView.cs.
|
get |
Definition at line 724 of file ImageView.cs.
|
getset |
Setting the view mode of the application. */.
Definition at line 634 of file ImageView.cs.
|
getset |
Definition at line 3357 of file ImageView.cs.
|
getset |
Definition at line 3369 of file ImageView.cs.
|
getset |
Definition at line 3363 of file ImageView.cs.
|
get |
Definition at line 720 of file ImageView.cs.
|
getset |
A property of the class PointD. */.
Definition at line 742 of file ImageView.cs.
|
get |
Definition at line 427 of file ImageView.cs.
|
get |
A property that returns the filepath. */.
Definition at line 686 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 613 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 598 of file ImageView.cs.
|
getset |
Setting the value of the pyramidalOrigin variable. */.
Definition at line 754 of file ImageView.cs.
|
getset |
Definition at line 3346 of file ImageView.cs.
|
get |
A property that returns the R channel of the selected image. */.
Definition at line 694 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 769 of file ImageView.cs.
|
getset |
Scale when opening image stacks.
Definition at line 804 of file ImageView.cs.
|
staticget |
Definition at line 327 of file ImageView.cs.
|
staticgetset |
Definition at line 305 of file ImageView.cs.
|
getset |
A property that is used to set the selected index of the image. */.
Definition at line 405 of file ImageView.cs.
|
getset |
Setting the visibility of the trackBarPanel. */.
Definition at line 524 of file ImageView.cs.
|
getset |
Definition at line 3376 of file ImageView.cs.
|
getset |
Definition at line 18 of file ImageView.Overview.cs.
|
getset |
Definition at line 432 of file ImageView.cs.
|
getset |
Setting the value of the property ShowStatus. */.
Definition at line 569 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the timefps variable. */.
Definition at line 873 of file ImageView.cs.
|
get |
Definition at line 418 of file ImageView.cs.
|
get |
A property that returns a ContextMenuStrip object. */.
Definition at line 825 of file ImageView.cs.
|
get |
Definition at line 733 of file ImageView.cs.
|
get |
Definition at line 726 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the fps. */.
Definition at line 857 of file ImageView.cs.