![]() |
BioCore
4.0.1
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
|
ImageView control for image stacks, pyramidal and whole-slide-images. More...
Public Types | |
enum | ViewMode |
Public Member Functions | |
ImageView (BioImage im) | |
Initializing the image viewer. */. More... | |
ImageView () | |
Initializing the ImageView class. */. More... | |
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 | RenderFrame () |
void | UpdateView (bool refresh) |
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. More... | |
double | GetScale () |
void | CopySelection () |
It takes the selected ROIs and copies them to the clipboard. More... | |
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) |
System.Drawing.PointF | ToScreenSpace (PointF p) |
System.Drawing.PointF[] | ToScreenSpace (PointF[] p) |
PointF | ToScreenSpace (Point3D p) |
float | ToScreenScaleW (double x) |
float | ToScreenScaleH (double y) |
PointF | ToScreenScale (PointD p) |
System.Drawing.RectangleF | ToScreenRectF (double x, double y, double w, double h) |
RawRectangleF | ToRawRectF (double x, double y, double w, double h) |
System.Drawing.RectangleF | ToScreenSpace (RectangleD p) |
System.Drawing.RectangleF | ToScreenSpace (RectangleF p) |
System.Drawing.RectangleF[] | ToScreenSpace (RectangleD[] p) |
System.Drawing.RectangleF[] | ToScreenSpace (RectangleF[] p) |
PointF[] | ToScreenSpace (PointD[] p) |
float | ToScreenW (double x) |
float | ToScreenH (double y) |
void | GoToImage () |
void | GoToImage (int i) |
new void | Dispose () |
Public Attributes | |
Direct2D | dx = null |
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 void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
Properties | |
static BioImage | SelectedImage [get] |
static BufferInfo | SelectedBuffer [get] |
static bool | Ctrl [get] |
int | SelectedIndex [get, set] |
A property that is used to set the selected index of the image. */. More... | |
Tools | tools [get] |
bool | ShowOverview [get, set] |
bool | ShowControls [get, set] |
Setting the visibility of the trackBarPanel. */. More... | |
bool | ShowStatus [get, set] |
Setting the value of the property ShowStatus. */. More... | |
double | PxWmicron [get, set] |
Only used when opening stacks. More... | |
double | PxHmicron [get, set] |
Only used when opening stacks. More... | |
ViewMode | Mode [get, set] |
Setting the view mode of the application. */. More... | |
string | Path [get] |
A property that returns the filepath. */. More... | |
Channel | RChannel [get] |
A property that returns the R channel of the selected image. */. More... | |
Channel | GChannel [get] |
A property that returns the G channel of the image. */. More... | |
Channel | BChannel [get] |
Getting the B channel of the image. */. More... | |
bool | OpenSlide [get] |
int? | MacroResolution [get] |
int? | LabelResolution [get] |
PointD | Origin [get, set] |
A property of the class PointD. */. More... | |
PointD | PyramidalOrigin [get, set] |
double | Resolution [get, set] |
A property of the class ImageViewer. It is a getter and setter for the Resolution of the image. More... | |
int | Level [get] |
Current level when viewing whole-slide and pyramidal images. More... | |
new SizeF | Scale [get, set] |
Scale when opening image stacks. More... | |
bool | HardwareAcceleration [get, set] |
Whether or not Hardware Acceleration should be used for rendering. More... | |
ContextMenuStrip | ViewContextMenu [get] |
A property that returns a ContextMenuStrip object. */. More... | |
int | ZFps [get, set] |
Setting the interval of the timer to the value of the fps. */. More... | |
int | TimeFps [get, set] |
Setting the interval of the timer to the value of the timefps variable. */. More... | |
int | CFps [get, set] |
Setting the interval of the timer to the inverse of the fps. */. More... | |
List< ROI > | AnnotationsR [get] |
List< ROI > | AnnotationsG [get] |
List< ROI > | AnnotationsB [get] |
List< ROI > | AnnotationsRGB [get] |
ImageView control for image stacks, pyramidal and whole-slide-images.
Definition at line 15 of file ImageView.cs.
enum BioCore.ImageView.ViewMode |
Definition at line 426 of file ImageView.cs.
BioCore.ImageView.ImageView | ( | BioImage | im | ) |
Initializing the image viewer. */.
Definition at line 18 of file ImageView.cs.
BioCore.ImageView.ImageView | ( | ) |
Initializing the ImageView class. */.
Definition at line 83 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 233 of file ImageView.cs.
void BioCore.ImageView.CopySelection | ( | ) |
It takes the selected ROIs and copies them to the clipboard.
Definition at line 2640 of file ImageView.cs.
new void BioCore.ImageView.Dispose | ( | ) |
Definition at line 3270 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 2123 of file ImageView.cs.
ZCT BioCore.ImageView.GetCoordinate | ( | ) |
It returns the coordinate of the selected image
Definition at line 224 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 1580 of file ImageView.cs.
double BioCore.ImageView.GetScale | ( | ) |
GetScale() returns the scale of the image in the viewport.
Definition at line 2216 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 3141 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 3167 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 2754 of file ImageView.cs.
void BioCore.ImageView.InitGUI | ( | ) |
It initializes the GUI
Definition at line 831 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 2656 of file ImageView.cs.
void BioCore.ImageView.RemoveImage | ( | int | i | ) |
Definition at line 1286 of file ImageView.cs.
void BioCore.ImageView.RemoveImages | ( | ) |
Definition at line 1296 of file ImageView.cs.
void BioCore.ImageView.RenderFrame | ( | ) |
It draws the images and annotations to the screen
Definition at line 956 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 207 of file ImageView.cs.
RawRectangleF BioCore.ImageView.ToRawRectF | ( | 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 2990 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 3071 of file ImageView.cs.
System.Drawing.RectangleF BioCore.ImageView.ToScreenRectF | ( | 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 2956 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 2942 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 2929 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 2916 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 2855 of file ImageView.cs.
PointF BioCore.ImageView.ToScreenSpace | ( | Point3D | p | ) |
It converts a 3D point to a 2D point
Point3D |
Definition at line 2906 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 2873 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 3047 of file ImageView.cs.
System.Drawing.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 2882 of file ImageView.cs.
System.Drawing.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 2892 of file ImageView.cs.
System.Drawing.RectangleF BioCore.ImageView.ToScreenSpace | ( | RectangleD | p | ) |
It converts a rectangle from world space to screen space
RectangleD | The rectangle to convert. |
Definition at line 3001 of file ImageView.cs.
System.Drawing.RectangleF[] 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 3019 of file ImageView.cs.
System.Drawing.RectangleF BioCore.ImageView.ToScreenSpace | ( | RectangleF | p | ) |
It converts a rectangle from world space to screen space
RectangleF | The rectangle to convert. |
Definition at line 3010 of file ImageView.cs.
System.Drawing.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 3033 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 3062 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 2844 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 2820 of file ImageView.cs.
PointD BioCore.ImageView.ToViewSpace | ( | double | x, |
double | y | ||
) |
ToViewSpace(x, y) = (ToViewSizeW(x - (pictureBox.Width / 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 2788 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 2778 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 2768 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 2834 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 1313 of file ImageView.cs.
void BioCore.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 1203 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 890 of file ImageView.cs.
void BioCore.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 765 of file ImageView.cs.
void BioCore.ImageView.UpdateSelectBoxSize | ( | float | size | ) |
This function is called 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 882 of file ImageView.cs.
void BioCore.ImageView.UpdateStatus | ( | ) |
It updates the status bar of the image viewer
Definition at line 903 of file ImageView.cs.
void BioCore.ImageView.UpdateView | ( | ) |
If hardware acceleration is enabled, render the frame. Otherwise, invalidate the picture box.
Definition at line 942 of file ImageView.cs.
void BioCore.ImageView.UpdateView | ( | bool | refresh | ) |
Update the status of the application and then render the frame
refresh | boolean |
Definition at line 1185 of file ImageView.cs.
Image BioCore.ImageView.Buf = null |
Definition at line 160 of file ImageView.cs.
|
static |
Definition at line 143 of file ImageView.cs.
Direct2D BioCore.ImageView.dx = null |
Definition at line 126 of file ImageView.cs.
string BioCore.ImageView.filepath = "" |
Definition at line 186 of file ImageView.cs.
Definition at line 164 of file ImageView.cs.
bool BioCore.ImageView.init = false |
Definition at line 161 of file ImageView.cs.
bool BioCore.ImageView.loopC = true |
Definition at line 192 of file ImageView.cs.
bool BioCore.ImageView.loopT = true |
Definition at line 191 of file ImageView.cs.
bool BioCore.ImageView.loopZ = true |
Definition at line 190 of file ImageView.cs.
int BioCore.ImageView.minSizeX = 50 |
Definition at line 188 of file ImageView.cs.
int BioCore.ImageView.minSizeY = 20 |
Definition at line 189 of file ImageView.cs.
|
static |
Definition at line 142 of file ImageView.cs.
|
static |
Definition at line 156 of file ImageView.cs.
|
static |
Definition at line 144 of file ImageView.cs.
|
static |
Definition at line 155 of file ImageView.cs.
Definition at line 123 of file ImageView.cs.
int BioCore.ImageView.serie = 0 |
Definition at line 187 of file ImageView.cs.
|
static |
Definition at line 158 of file ImageView.cs.
bool BioCore.ImageView.showBROIs = true |
Definition at line 1843 of file ImageView.cs.
bool BioCore.ImageView.showGROIs = true |
Definition at line 1842 of file ImageView.cs.
bool BioCore.ImageView.showRROIs = true |
Definition at line 1841 of file ImageView.cs.
|
static |
Definition at line 159 of file ImageView.cs.
|
static |
Definition at line 145 of file ImageView.cs.
|
get |
Definition at line 1862 of file ImageView.cs.
|
get |
Definition at line 1854 of file ImageView.cs.
|
get |
Definition at line 1846 of file ImageView.cs.
|
get |
Definition at line 1869 of file ImageView.cs.
|
get |
Getting the B channel of the image. */.
Definition at line 545 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the inverse of the fps. */.
Definition at line 815 of file ImageView.cs.
|
staticget |
Definition at line 146 of file ImageView.cs.
|
get |
A property that returns the G channel of the image. */.
Definition at line 537 of file ImageView.cs.
|
getset |
Whether or not Hardware Acceleration should be used for rendering.
Definition at line 718 of file ImageView.cs.
|
get |
Definition at line 561 of file ImageView.cs.
|
get |
Current level when viewing whole-slide and pyramidal images.
Definition at line 680 of file ImageView.cs.
|
get |
Definition at line 560 of file ImageView.cs.
|
getset |
Setting the view mode of the application. */.
Definition at line 435 of file ImageView.cs.
|
get |
Definition at line 556 of file ImageView.cs.
|
getset |
A property of the class PointD. */.
Definition at line 563 of file ImageView.cs.
|
get |
A property that returns the filepath. */.
Definition at line 521 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 415 of file ImageView.cs.
|
getset |
Only used when opening stacks.
Definition at line 401 of file ImageView.cs.
|
getset |
Definition at line 573 of file ImageView.cs.
|
get |
A property that returns the R channel of the selected image. */.
Definition at line 529 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 587 of file ImageView.cs.
|
getset |
Scale when opening image stacks.
Definition at line 695 of file ImageView.cs.
|
staticget |
Definition at line 134 of file ImageView.cs.
|
staticget |
Definition at line 127 of file ImageView.cs.
|
getset |
A property that is used to set the selected index of the image. */.
Definition at line 168 of file ImageView.cs.
|
getset |
Setting the visibility of the trackBarPanel. */.
Definition at line 305 of file ImageView.cs.
|
getset |
Definition at line 301 of file ImageView.cs.
|
getset |
Setting the value of the property ShowStatus. */.
Definition at line 365 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the timefps variable. */.
Definition at line 800 of file ImageView.cs.
|
get |
Definition at line 185 of file ImageView.cs.
|
get |
A property that returns a ContextMenuStrip object. */.
Definition at line 754 of file ImageView.cs.
|
getset |
Setting the interval of the timer to the value of the fps. */.
Definition at line 785 of file ImageView.cs.