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.
All Classes Namespaces Functions Enumerations Properties
BioCore.ROI Class Reference

Classes

class  Mask
 Represents a Mask layer. More...
 

Public Types

enum  Type
 

Public Member Functions

ROI Copy ()
 
ROI Copy (ZCT cord)
 
RectangleD GetSelectBound (double scaleX, double scaleY)
 
RectangleD[] GetSelectBoxes ()
 
RectangleD[] GetSelectBoxes (double s)
 
void UpdatePoint (PointD p, int i)
 
PointD GetPoint (int i)
 
PointD[] GetPoints ()
 
System.Drawing.PointF[] GetPointsF ()
 
void AddPoint (PointD p)
 
void AddPoints (PointD[] p)
 
void AddPoints (float[] xp, float[] yp)
 
void AddPoints (int[] xp, int[] yp)
 
void RemovePoints (int[] indexs)
 
int GetPointCount ()
 
PointD[] stringToPoints (string s)
 
string PointsToString (BioImage b)
 
void UpdateBoundingBox ()
 
override string ToString ()
 

Static Public Member Functions

static ROI CreatePoint (ZCT coord, double x, double y)
 
static ROI CreatePoint (int s, int z, int c, int t, double x, double y)
 
static ROI CreateLine (ZCT coord, PointD x1, PointD x2)
 
static ROI CreateRectangle (ZCT coord, double x, double y, double w, double h)
 
static ROI CreateEllipse (ZCT coord, double x, double y, double w, double h)
 
static ROI CreatePolygon (ZCT coord, PointD[] pts)
 
static ROI CreateFreeform (ZCT coord, PointD[] pts)
 
static ROI CreateMask (ZCT coord, float[] mask, int width, int height, PointD loc, double physicalX, double physicalY)
 
static ROI CreateMask (ZCT coord, byte[] mask, int width, int height, PointD loc, double physicalX, double physicalY)
 

Public Attributes

Type type
 
List< int > selectedPoints = new List<int>()
 
RectangleD BoundingBox
 
Font font = System.Drawing.SystemFonts.DefaultFont
 
ZCT coord
 
System.Drawing.Color strokeColor
 
System.Drawing.Color fillColor
 
bool isFilled = false
 
string id = ""
 
string roiID = ""
 
string roiName = ""
 
int serie = 0
 
string properties
 
double strokeWidth = 1
 
int shapeIndex = 0
 
bool closed = false
 
bool selected = false
 

Static Public Attributes

static float selectBoxSize = 8f
 

Properties

PointD Point [get, set]
 
RectangleD Rect [get, set]
 
double X [get, set]
 
double Y [get, set]
 
double W [get, set]
 
double H [get, set]
 
List< PointDPointsD [get]
 
PointD[] PointsImage [get]
 
string Text [get, set]
 
Size TextSize [get]
 
Mask roiMask [get, set]
 

Detailed Description

Definition at line 645 of file Bio.cs.

Member Enumeration Documentation

◆ Type

enum BioCore.ROI.Type

Definition at line 647 of file Bio.cs.

Constructor & Destructor Documentation

◆ ROI()

BioCore.ROI.ROI ( )

Definition at line 1062 of file Bio.cs.

Member Function Documentation

◆ AddPoint()

void BioCore.ROI.AddPoint ( PointD  p)

This function adds a point to the list of points that make up the polygon

Parameters
PointD

Definition at line 1285 of file Bio.cs.

◆ AddPoints() [1/3]

void BioCore.ROI.AddPoints ( float[]  xp,
float[]  yp 
)

‍Adds a range of float points to the Points collection and updates the bounding box

Parameters
pThe points to add to the polygon

Definition at line 1301 of file Bio.cs.

◆ AddPoints() [2/3]

void BioCore.ROI.AddPoints ( int[]  xp,
int[]  yp 
)

‍Adds a range of float points to the Points collection and updates the bounding box

Parameters
pThe points to add to the polygon

Definition at line 1312 of file Bio.cs.

◆ AddPoints() [3/3]

void BioCore.ROI.AddPoints ( PointD[]  p)

‍Adds a range of points to the Points collection and updates the bounding box

Parameters
pThe points to add to the polygon

Definition at line 1293 of file Bio.cs.

◆ Copy() [1/2]

ROI BioCore.ROI.Copy ( )

Copy() is a function that copies the values of the ROI object to a new ROI object

Returns
A copy of the ROI object.

Definition at line 814 of file Bio.cs.

◆ Copy() [2/2]

ROI BioCore.ROI.Copy ( ZCT  cord)

Copy() is a function that copies the ROI object and returns a new ROI object

Parameters
ZCTA class that contains the coordinates of the image.
Returns
A copy of the ROI object.

Definition at line 842 of file Bio.cs.

◆ CreateEllipse()

static ROI BioCore.ROI.CreateEllipse ( ZCT  coord,
double  x,
double  y,
double  w,
double  h 
)
static

Create an ellipse ROI at the specified ZCT coordinate with the specified dimensions

Parameters
ZCTThe ZCT coordinates of the image you want to create the ROI on.
xx-coordinate of the top-left corner of the rectangle
yThe y-coordinate of the upper-left corner of the rectangle to create.
wwidth
hheight
Returns
A new ROI object.

Definition at line 1184 of file Bio.cs.

◆ CreateFreeform()

static ROI BioCore.ROI.CreateFreeform ( ZCT  coord,
PointD[]  pts 
)
static

‍Create a new ROI object of type Freeform, with the specified ZCT coordinates and points

Parameters
ZCTA class that contains the Z, C, and T coordinates of the ROI.
ptsan array of PointD objects, which are just a pair of doubles (x,y)
Returns
A new ROI object.

Definition at line 1214 of file Bio.cs.

◆ CreateLine()

static ROI BioCore.ROI.CreateLine ( ZCT  coord,
PointD  x1,
PointD  x2 
)
static

Create a line ROI with the specified coordinates

Parameters
ZCTZ is the Z-axis, C is the color channel, and T is the time frame.
PointDA point in the image.
PointDA point in the image.
Returns
A new ROI object.

Definition at line 1147 of file Bio.cs.

◆ CreateMask() [1/2]

static ROI BioCore.ROI.CreateMask ( ZCT  coord,
byte[]  mask,
int  width,
int  height,
PointD  loc,
double  physicalX,
double  physicalY 
)
static

Definition at line 1232 of file Bio.cs.

◆ CreateMask() [2/2]

static ROI BioCore.ROI.CreateMask ( ZCT  coord,
float[]  mask,
int  width,
int  height,
PointD  loc,
double  physicalX,
double  physicalY 
)
static

Definition at line 1223 of file Bio.cs.

◆ CreatePoint() [1/2]

static ROI BioCore.ROI.CreatePoint ( int  s,
int  z,
int  c,
int  t,
double  x,
double  y 
)
static

Create a point ROI at the specified ZCT coordinates and x,y coordinates

Parameters
sseries
zthe z-slice of the image
cchannel
ttimepoint
xx coordinate of the point
yy-coordinate of the point
Returns
A point ROI

Definition at line 1136 of file Bio.cs.

◆ CreatePoint() [2/2]

static ROI BioCore.ROI.CreatePoint ( ZCT  coord,
double  x,
double  y 
)
static

Create a new ROI object, add a point to it, and return it

Parameters
ZCTa class that contains the Z, C, and T coordinates of the image.
xx coordinate of the point
yThe y coordinate of the point
Returns
A new ROI object

Definition at line 1117 of file Bio.cs.

◆ CreatePolygon()

static ROI BioCore.ROI.CreatePolygon ( ZCT  coord,
PointD[]  pts 
)
static

‍Create a new ROI object of type Polygon, with the given coordinate system and points

Parameters
ZCTThe ZCT coordinate of the ROI.
ptsan array of PointD objects, which are just a pair of doubles (x,y)
Returns
A ROI object

Definition at line 1199 of file Bio.cs.

◆ CreateRectangle()

static ROI BioCore.ROI.CreateRectangle ( ZCT  coord,
double  x,
double  y,
double  w,
double  h 
)
static

Create a new ROI object with a rectangle shape, and add a line to the recorder

Parameters
ZCTThe ZCT coordinates of the image you want to create the ROI on.
xx coordinate of the top left corner of the rectangle
yy-coordinate of the top-left corner of the rectangle
wwidth
hheight
Returns
A new ROI object.

Definition at line 1166 of file Bio.cs.

◆ GetPoint()

PointD BioCore.ROI.GetPoint ( int  i)

This function returns the point at the specified index

Parameters
iThe index of the point to get.
Returns
The point at index i in the Points array.

Definition at line 1258 of file Bio.cs.

◆ GetPointCount()

int BioCore.ROI.GetPointCount ( )

This function returns the number of points in the polygon

Returns
The number of points in the list.

Definition at line 1343 of file Bio.cs.

◆ GetPoints()

PointD[] BioCore.ROI.GetPoints ( )

It returns an array of PointD objects

Returns
An array of PointD objects.

Definition at line 1265 of file Bio.cs.

◆ GetPointsF()

System.Drawing.PointF[] BioCore.ROI.GetPointsF ( )

It converts a list of points to an array of points

Returns
A PointF array.

Definition at line 1272 of file Bio.cs.

◆ GetSelectBound()

RectangleD BioCore.ROI.GetSelectBound ( double  scaleX,
double  scaleY 
)

‍This function returns a rectangle that is the bounding box of the object, but with a

border of half the scale

Parameters
scalethe scale of the image
Returns
A rectangle with the following properties:

Definition at line 1075 of file Bio.cs.

◆ GetSelectBoxes() [1/2]

RectangleD[] BioCore.ROI.GetSelectBoxes ( )

It creates a list of rectangles, each rectangle is a square with a side length of ROI.selectBoxSize, and the center of the square is the point in the list of points

Returns
A list of RectangleF objects.

Definition at line 1085 of file Bio.cs.

◆ GetSelectBoxes() [2/2]

RectangleD[] BioCore.ROI.GetSelectBoxes ( double  s)

It returns an array of RectangleF objects that are used to draw the selection boxes around the points of the polygon

Parameters
sthe size of the select box
Returns
A list of RectangleF objects.

Definition at line 1100 of file Bio.cs.

◆ PointsToString()

string BioCore.ROI.PointsToString ( BioImage  b)

This function takes a BioImage object and returns a string of the points in the image space

Parameters
BioImageThe image that the ROI is on
Returns
The points of the polygon in the image space.

Definition at line 1374 of file Bio.cs.

◆ RemovePoints()

void BioCore.ROI.RemovePoints ( int[]  indexs)

It removes points from a list of points based on an array of indexes

Parameters
indexsan array of integers that represent the indexes of the points to be removed

Definition at line 1323 of file Bio.cs.

◆ stringToPoints()

PointD[] BioCore.ROI.stringToPoints ( string  s)

It takes a string of points and returns an array of PointD objects

Parameters
sThe string to convert to points.
Returns
A list of points.

Definition at line 1352 of file Bio.cs.

◆ ToString()

override string BioCore.ROI.ToString ( )

It returns a string that contains the type of the object, the text, the width and height, and the coordinates of the object

Returns
The type of the object, the text, the width, the height, the point, and the coordinates.

Definition at line 1432 of file Bio.cs.

◆ UpdateBoundingBox()

void BioCore.ROI.UpdateBoundingBox ( )

It takes the minimum and maximum X and Y values of the points in the shape and uses them to create a bounding box

Definition at line 1389 of file Bio.cs.

◆ UpdatePoint()

void BioCore.ROI.UpdatePoint ( PointD  p,
int  i 
)

This function updates the point at the specified index

Parameters
PointDA class that contains an X and Y coordinate.
iThe index of the point to update

Definition at line 1245 of file Bio.cs.

Member Data Documentation

◆ BoundingBox

RectangleD BioCore.ROI.BoundingBox

Definition at line 788 of file Bio.cs.

◆ closed

bool BioCore.ROI.closed = false

Definition at line 802 of file Bio.cs.

◆ coord

ZCT BioCore.ROI.coord

Definition at line 790 of file Bio.cs.

◆ fillColor

System.Drawing.Color BioCore.ROI.fillColor

Definition at line 792 of file Bio.cs.

◆ font

Font BioCore.ROI.font = System.Drawing.SystemFonts.DefaultFont

Definition at line 789 of file Bio.cs.

◆ id

string BioCore.ROI.id = ""

Definition at line 794 of file Bio.cs.

◆ isFilled

bool BioCore.ROI.isFilled = false

Definition at line 793 of file Bio.cs.

◆ properties

string BioCore.ROI.properties

Definition at line 799 of file Bio.cs.

◆ roiID

string BioCore.ROI.roiID = ""

Definition at line 795 of file Bio.cs.

◆ roiName

string BioCore.ROI.roiName = ""

Definition at line 796 of file Bio.cs.

◆ selectBoxSize

float BioCore.ROI.selectBoxSize = 8f
static

Definition at line 777 of file Bio.cs.

◆ selected

bool BioCore.ROI.selected = false

Definition at line 803 of file Bio.cs.

◆ selectedPoints

List<int> BioCore.ROI.selectedPoints = new List<int>()

Definition at line 787 of file Bio.cs.

◆ serie

int BioCore.ROI.serie = 0

Definition at line 797 of file Bio.cs.

◆ shapeIndex

int BioCore.ROI.shapeIndex = 0

Definition at line 801 of file Bio.cs.

◆ strokeColor

System.Drawing.Color BioCore.ROI.strokeColor

Definition at line 791 of file Bio.cs.

◆ strokeWidth

double BioCore.ROI.strokeWidth = 1

Definition at line 800 of file Bio.cs.

◆ type

Type BioCore.ROI.type

Definition at line 776 of file Bio.cs.

Property Documentation

◆ H

double BioCore.ROI.H
getset

Definition at line 761 of file Bio.cs.

◆ Point

PointD BioCore.ROI.Point
getset

Definition at line 660 of file Bio.cs.

◆ PointsD

List<PointD> BioCore.ROI.PointsD
get

Definition at line 779 of file Bio.cs.

◆ PointsImage

PointD [] BioCore.ROI.PointsImage
get

Definition at line 804 of file Bio.cs.

◆ Rect

RectangleD BioCore.ROI.Rect
getset

Definition at line 682 of file Bio.cs.

◆ roiMask

Mask BioCore.ROI.roiMask
getset

Definition at line 888 of file Bio.cs.

◆ Text

string BioCore.ROI.Text
getset

Definition at line 866 of file Bio.cs.

◆ TextSize

Size BioCore.ROI.TextSize
get

Definition at line 881 of file Bio.cs.

◆ W

double BioCore.ROI.W
getset

Definition at line 746 of file Bio.cs.

◆ X

double BioCore.ROI.X
getset

Definition at line 721 of file Bio.cs.

◆ Y

double BioCore.ROI.Y
getset

Definition at line 734 of file Bio.cs.


The documentation for this class was generated from the following file: