![]() |
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.
|
Classes | |
class | ImageJDesc |
class | WellPlate |
Public Types | |
enum | ImageType |
Public Member Functions | |
BioImage | Copy (bool rois) |
BioImage | Copy () |
double | GetLevelDownsample (int level) |
Get the downsampling factor of a given level. More... | |
int | LevelFromResolution (double Resolution) |
Returns the level of a given resolution. More... | |
double | GetUnitPerPixel (int level) |
Get Unit Per Pixel for pyramidal images. More... | |
async void | UpdateBuffersPyramidal () |
Updates the Buffers based on current pyramidal origin and resolution. More... | |
void | To8Bit () |
void | To16Bit () |
void | To24Bit () |
void | To32Bit () |
void | To48Bit () |
void | RotateFlip (RotateFlipType rot) |
void | Bake (int rmin, int rmax, int gmin, int gmax, int bmin, int bmax) |
void | Bake (IntRange rf, IntRange gf, IntRange bf) |
void | UpdateCoords () |
void | UpdateCoords (int sz, int sc, int st) |
void | UpdateCoords (int sz, int sc, int st, string order) |
double | ToImageSizeX (double d) |
double | ToImageSizeY (double d) |
double | ToImageSpaceX (double x) |
double | ToImageSpaceY (double y) |
PointD | ToImageSpace (PointD p) |
PointD[] | ToImageSpace (List< PointD > p) |
PointF[] | ToImageSpace (PointF[] p) |
System.Drawing.RectangleF | ToImageSpace (RectangleD p) |
PointD | ToStageSpace (PointD p) |
RectangleD | ToStageSpace (RectangleD p) |
PointD[] | ToStageSpace (PointD[] p) |
PointD | ToStageSpace (PointD p, int resolution) |
BioImage (string file) | |
BioImage[] | SplitChannels () |
Image | GetImageByCoord (int z, int c, int t) |
Bitmap | GetBitmap (int z, int c, int t) |
int | GetIndex (int ix, int iy) |
int | GetIndexRGB (int ix, int iy, int index) |
ushort | GetValue (ZCTXY coord) |
ushort | GetValueRGB (ZCTXY coord, int index) |
ushort | GetValue (ZCT coord, int x, int y) |
ushort | GetValue (int z, int c, int t, int x, int y) |
ushort | GetValueRGB (ZCT coord, int x, int y, int RGBindex) |
ushort | GetValueRGB (int z, int c, int t, int x, int y, int RGBindex) |
void | SetValue (ZCTXY coord, ushort value) |
void | SetValue (int x, int y, int ind, ushort value) |
void | SetValue (int x, int y, ZCT coord, ushort value) |
void | SetValueRGB (ZCTXY coord, int RGBindex, ushort value) |
Bitmap | GetBitmap (ZCT coord) |
Bitmap | GetFiltered (ZCT coord, IntRange r, IntRange g, IntRange b) |
Bitmap | GetFiltered (int ind, IntRange r, IntRange g, IntRange b) |
Bitmap | GetChannelImage (int ind, RGB rGB) |
Bitmap | GetEmission (ZCT coord, IntRange rf, IntRange gf, IntRange bf) |
Bitmap | GetRGBBitmap (ZCT coord, IntRange rf, IntRange gf, IntRange bf) |
List< ROI > | GetAnnotations (ZCT coord) |
List< ROI > | GetAnnotations (int Z, int C, int T) |
Bitmap | GetTileRGB (ZCT coord, int serie, int tilex, int tiley, int tileSizeX, int tileSizeY) |
void | StackThreshold (bool bit16) |
void | Update () |
It updates the current object. More... | |
void | Dispose () |
override string | ToString () |
Static Public Member Functions | |
static BioImage | Copy (BioImage b, bool rois) |
static BioImage | Copy (BioImage b) |
static BioImage | CopyInfo (BioImage b, bool copyAnnotations, bool copyChannels) |
static void | OpenVips (BioImage b, int pagecount) |
static void | OpenVip (BioImage b, int pagenumber, int x, int y, int w, int h) |
static PointD | ToStageSpace (PointD p, double physicalSizeX, double physicalSizeY, double volumeX, double volumeY) |
static RectangleD | ToStageSpace (RectangleD p, double physicalSizeX, double physicalSizeY, double volumeX, double volumeY) |
static PointD[] | ToStageSpace (PointD[] p, double physicalSizeX, double physicalSizeY, double volumeX, double volumeY) |
static BioImage | Substack (BioImage orig, int ser, int zs, int ze, int cs, int ce, int ts, int te) |
static BioImage | MergeChannels (BioImage b2, BioImage b) |
static BioImage | MergeChannels (string bname, string b2name) |
static BioImage | MergeZ (BioImage b) |
static BioImage | MergeT (BioImage b) |
static BioImage[] | SplitChannels (BioImage bb) |
static BioImage[] | SplitChannels (string name) |
static void | Initialize () |
static void | SaveFile (string file, string ID) |
static void | SaveSeries (string[] files, string ID) |
static BioImage[] | OpenSeries (string file) |
static BioImage | OpenFile (string file) |
static BioImage | OpenFile (string file, int series, bool newTab) |
static BioImage | OpenFile (string file, int series, bool newTab, bool addToImages, bool tile, int x, int y, int w, int h) |
static bool | isTiffSeries (string file) |
static bool | isOME (string file) |
static bool | isOMESeries (string file) |
static void | SaveOME (string file, string ID) |
static void | SaveOMESeries (string[] files, string f, bool planes) |
static void | SaveOMESeries (BioImage[] bms, string f, bool planes) |
static void | SaveOMEStiched (BioImage[] bms, string file, string compression) |
static void | SaveOMEPyramidal (BioImage[] bms, string file, Enums.ForeignTiffCompression compression, int compressionLevel) |
The function SaveOMEPyramidal saves a collection of BioImages as a pyramidal OME-TIFF file. More... | |
static BioImage | OpenOME (string file) |
static BioImage | OpenOME (string file, int serie, bool newTab, bool addToImages) |
static BioImage | FilesToStack (string[] files, int sizeZ, int sizeC, int sizeT) |
static BioImage | FolderToStack (string path) |
static BioImage | OpenOME (string file, int serie, bool tab, bool addToImages, bool tile, int tilex, int tiley, int tileSizeX, int tileSizeY, bool useOpenSlide=true) |
static int | FindFocus (BioImage im, int Channel, int Time) |
static BufferInfo | ExtractRegionFromTiledTiff (BioImage b, int x, int y, int width, int height, int res) |
static BufferInfo | GetTile (BioImage b, ZCT coord, int serie, int tilex, int tiley, int tileSizeX, int tileSizeY, bool OpenSlide=true) |
static BufferInfo | GetTile (BioImage b, int index, int serie, int tilex, int tiley, int tileSizeX, int tileSizeY, bool OpenSlide=true) |
static bool | VipsSupport (string file) |
static int | GetBitsPerPixel (int bt) |
static int | GetBitMaxValue (int bt) |
static PixelFormat | GetPixelFormat (int rgbChannelCount, int bitsPerPixel) |
static PixelFormat | GetPixelFormat (int rgbChannelCount, ome.xml.model.enums.PixelType px) |
static BioImage[] | OpenOMESeries (string file, bool newTab, bool addToImages) |
static async Task | OpenAsync (string file, bool OME, bool newtab, bool images, int series) |
static async Task | OpenAsync (string[] files, bool OME, bool tab, bool images) |
static BioImage | OpenFile (string file, int series, bool tab, bool addToImages) |
static async Task | SaveAsync (string file, string id, int serie, bool ome) |
The SaveAsync function saves data to a file asynchronously. More... | |
static async Task | SaveSeriesAsync (BioImage[] imgs, string file, bool ome) |
The function SaveSeriesAsync saves a series of BioImage objects to a file asynchronously. More... | |
static async Task | SavePyramidalAsync (BioImage[] imgs, string file, Enums.ForeignTiffCompression com, int compLevel) |
The function SavePyramidalAsync saves an array of BioImage objects as a pyramidal TIFF file asynchronously. More... | |
static void | Open (string file) |
static void | Open (string[] files) |
static void | Save (string file, string ID) |
static BioImage | ImagesToStack (string[] files) |
static void | Update (BioImage b) |
static int | GetSeriesCount (string file) |
static string | OpenXML (string file) |
static List< ROI > | OpenOMEROIs (string file, int series) |
static string | ROIsToString (List< ROI > Annotations) |
static string | ROIToString (ROI an) |
static ROI | StringToROI (string sts) |
static void | ExportROIsCSV (string filename, List< ROI > Annotations) |
static List< ROI > | ImportROIsCSV (string filename) |
static void | ExportROIFolder (string path, string filename) |
static void | AutoThreshold (BioImage b, bool updateImageStats) |
static void | AutoThreshold () |
static void | AutoThresholdThread (BioImage b) |
static BioImage | operator/ (BioImage a, float b) |
static BioImage | operator* (BioImage a, float b) |
static BioImage | operator+ (BioImage a, float b) |
static BioImage | operator- (BioImage a, float b) |
static BioImage | operator/ (BioImage a, ColorS b) |
static BioImage | operator* (BioImage a, ColorS b) |
static BioImage | operator+ (BioImage a, ColorS b) |
static BioImage | operator- (BioImage a, ColorS b) |
Public Attributes | |
int[,,] | Coords |
WellPlate | Plate = null |
List< Channel > | Channels = new List<Channel>() |
List< Resolution > | Resolutions = new List<Resolution>() |
List< BufferInfo > | Buffers = new List<BufferInfo>() |
List< ROI > | Annotations = new List<ROI>() |
OpenSlideImage | openSlideImage |
OpenSlideBase | openSlideBase |
SlideBase | slideBase |
SlideImage | slideImage |
string | filename = "" |
string | script = "" |
int[] | rgbChannels = new int[3] |
int | bitsPerPixel |
int | imagesPerSeries = 0 |
int | seriesCount = 1 |
double | frameInterval = 0 |
bool | littleEndian = false |
bool | isGroup = false |
long | loadTimeMS = 0 |
long | loadTimeTicks = 0 |
bool | selected = false |
List< NetVips.Image > | vipPages = new List<NetVips.Image>() |
Stopwatch | watch = new Stopwatch() |
string | file |
bool | Loading = false |
ImageReader | imRead = null |
Static Public Attributes | |
static bool | Planes = false |
static LevelsLinear | filter8 = new LevelsLinear() |
static LevelsLinear16bpp | filter16 = new LevelsLinear16bpp() |
static Stopwatch | swatch = new Stopwatch() |
const char | NewLine = '\n' |
const string | columns = "ROIID,ROINAME,TYPE,ID,SHAPEINDEX,TEXT,S,C,Z,T,X,Y,W,H,POINTS,STROKECOLOR,STROKECOLORW,FILLCOLOR,FONTSIZE\n" |
Properties | |
ZCT | Coordinate [get, set] |
ImageType | Type [get, set] |
VolumeD | Volume [get, set] |
string | Filename [get, set] |
int | RGBChannelCount [get] |
int? | MacroResolution [get, set] |
int? | LabelResolution [get, set] |
double | Resolution [get, set] |
Statistics | Statistics [get, set] |
string | ID [get, set] |
int | ImageCount [get] |
double | PhysicalSizeX [get] |
double | PhysicalSizeY [get] |
double | PhysicalSizeZ [get] |
int | TileX [get] |
int | TileY [get] |
double | StageSizeX [get, set] |
double | StageSizeY [get, set] |
double | StageSizeZ [get, set] |
Size | PyramidalSize [get, set] |
PointD | PyramidalOrigin [get, set] |
int | Level [get, set] |
int | series [get, set] |
Channel | RChannel [get] |
Channel | GChannel [get] |
Channel | BChannel [get] |
int | SizeX [get] |
int | SizeY [get] |
int | SizeZ [get] |
int | SizeC [get] |
int | SizeT [get] |
IntRange | RRange [get] |
IntRange | GRange [get] |
IntRange | BRange [get] |
BufferInfo | SelectedBuffer [get] |
bool | isRGB [get] |
bool | isTime [get] |
bool | isSeries [get] |
bool | isPyramidal [get] |
static bool | Initialized [get] |
|
static |
|
static |
|
static |
"This function creates a new thread and starts it, and the thread calls the AutoThreshold function."
The AutoThreshold function is the function that actually does the work.
BioImage | This is a class that contains the image data and some other information. |
void BioCore.BioImage.Bake | ( | int | rmin, |
int | rmax, | ||
int | gmin, | ||
int | gmax, | ||
int | bmin, | ||
int | bmax | ||
) |
Bake(int rmin, int rmax, int gmin, int gmax, int bmin, int bmax)
rmin | The minimum value of the red channel. |
rmax | The maximum value of the red channel. |
gmin | The minimum value of the green channel. |
gmax | The maximum value of the green channel. |
bmin | The minimum value of the blue channel. |
bmax | The maximum value of the blue channel. |
void BioCore.BioImage.Bake | ( | IntRange | rf, |
IntRange | gf, | ||
IntRange | bf | ||
) |
void BioCore.BioImage.Dispose | ( | ) |
|
static |
|
static |
|
static |
|
static |
It takes a list of files, and creates a new BioImage object with the first file in the list, then adds the buffers from the rest of the files to the new BioImage object
files | an array of file paths |
sizeZ | number of images in the stack |
sizeC | number of channels |
sizeT | number of time points |
|
static |
|
static |
List< ROI > BioCore.BioImage.GetAnnotations | ( | int | Z, |
int | C, | ||
int | T | ||
) |
Bitmap BioCore.BioImage.GetBitmap | ( | int | z, |
int | c, | ||
int | t | ||
) |
Bitmap BioCore.BioImage.GetBitmap | ( | ZCT | coord | ) |
|
static |
|
static |
If the number is less than or equal to 255, then it's 8 bits. If it's less than or equal
to 512, then it's 9 bits. If it's less than or equal to 1023, then it's 10 bits. If it's less than or equal to 2047, then it's 11 bits. If it's less than or equal to 4095, then it's 12 bits. If it's less than or equal to 8191, then it's 13 bits. If it's less than or equal to 16383, then it's 14 bits. If it's less than or equal to 32767, then it's 15 bits. If it's less than or equal to 65535, then it's 16 bits
bt | The number of bits per pixel. |
Bitmap BioCore.BioImage.GetChannelImage | ( | int | ind, |
RGB | rGB | ||
) |
Bitmap BioCore.BioImage.GetEmission | ( | ZCT | coord, |
IntRange | rf, | ||
IntRange | gf, | ||
IntRange | bf | ||
) |
Bitmap BioCore.BioImage.GetFiltered | ( | int | ind, |
IntRange | r, | ||
IntRange | g, | ||
IntRange | b | ||
) |
Bitmap BioCore.BioImage.GetFiltered | ( | ZCT | coord, |
IntRange | r, | ||
IntRange | g, | ||
IntRange | b | ||
) |
Image BioCore.BioImage.GetImageByCoord | ( | int | z, |
int | c, | ||
int | t | ||
) |
int BioCore.BioImage.GetIndex | ( | int | ix, |
int | iy | ||
) |
int BioCore.BioImage.GetIndexRGB | ( | int | ix, |
int | iy, | ||
int | index | ||
) |
double BioCore.BioImage.GetLevelDownsample | ( | int | level | ) |
|
static |
If the bits per pixel is 8, then the pixel format is either 8bppIndexed, 24bppRgb, or 32bppArgb. If the bits per pixel is 16, then the pixel format is either 16bppGrayScale or 48bppRgb
rgbChannelCount | The number of channels in the image. For example, a grayscale image has 1 channel, a color image has 3 channels (red, green, blue). |
bitsPerPixel | 8 or 16 |
|
static |
Bitmap BioCore.BioImage.GetRGBBitmap | ( | ZCT | coord, |
IntRange | rf, | ||
IntRange | gf, | ||
IntRange | bf | ||
) |
|
static |
|
static |
|
static |
It reads a tile from a file, and returns a bitmap
BioImage | This is a class that contains the image file name, the image reader, and the coordinates of the image. |
ZCT | Z, C, T |
serie | the series number (0-based). |
tilex | the x coordinate of the tile. |
tiley | the y coordinate of the tile. |
tileSizeX | the width of the tile. |
tileSizeY | the height of the tile. |
OpenSlide | whether the tile should be opened with OpenSlide. |
Bitmap BioCore.BioImage.GetTileRGB | ( | ZCT | coord, |
int | serie, | ||
int | tilex, | ||
int | tiley, | ||
int | tileSizeX, | ||
int | tileSizeY | ||
) |
double BioCore.BioImage.GetUnitPerPixel | ( | int | level | ) |
ushort BioCore.BioImage.GetValue | ( | int | z, |
int | c, | ||
int | t, | ||
int | x, | ||
int | y | ||
) |
ushort BioCore.BioImage.GetValue | ( | ZCT | coord, |
int | x, | ||
int | y | ||
) |
ushort BioCore.BioImage.GetValue | ( | ZCTXY | coord | ) |
ushort BioCore.BioImage.GetValueRGB | ( | int | z, |
int | c, | ||
int | t, | ||
int | x, | ||
int | y, | ||
int | RGBindex | ||
) |
This function returns the value of the pixel at the specified Z, C, T, X, Y, and RGBindex
z | The Z-plane index |
c | channel |
t | time index |
x | x coordinate of the pixel |
y | The y coordinate of the pixel |
RGBindex | 0 = Red, 1 = Green, 2 = Blue |
ushort BioCore.BioImage.GetValueRGB | ( | ZCT | coord, |
int | x, | ||
int | y, | ||
int | RGBindex | ||
) |
ushort BioCore.BioImage.GetValueRGB | ( | ZCTXY | coord, |
int | index | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int BioCore.BioImage.LevelFromResolution | ( | double | Resolution | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void BioCore.BioImage.RotateFlip | ( | RotateFlipType | rot | ) |
|
static |
|
static |
The SaveAsync function saves data to a file asynchronously.
file | The file parameter is a string that represents the file path or name where the data will be saved. |
id | The "id" parameter is a string that represents an identifier for the save operation. It could be used to uniquely identify the saved data or to specify a specific location or format for the saved file. |
serie | The "serie" parameter is an integer that represents a series or sequence number. It is used as a parameter in the SaveAsync method. |
ome | The "ome" parameter is a boolean value that determines whether or not to perform a specific action in the saving process. |
|
static |
|
static |
|
static |
The function SaveOMEPyramidal
saves a collection of BioImages as a pyramidal OME-TIFF file.
bms | An array of BioImage objects representing the images to be saved. |
file | The file parameter is a string that represents the file path where the OME Pyramidal TIFF file will be saved. |
compression | The compression parameter is of type Enums.ForeignTiffCompression and it specifies the compression method to be used when saving the TIFF file. |
|
static |
|
static |
|
static |
|
static |
The function SavePyramidalAsync
saves an array of BioImage
objects as a pyramidal TIFF file asynchronously.
imgs | imgs is an array of BioImage objects. |
file | The "file" parameter is a string that represents the file path where the pyramidal image will be saved. |
com | The parameter "com" is of type Enums.ForeignTiffCompression, which is an enumeration representing different compression options for the TIFF file. |
compLevel | The compLevel parameter is an integer that represents the compression level for the TIFF file. It is used to specify the level of compression to be applied to the image data when saving the pyramidal image. The higher the compression level, the smaller the file size but potentially lower image quality. |
|
static |
|
static |
The function SaveSeriesAsync
saves a series of BioImage
objects to a file asynchronously.
imgs | imgs is an array of BioImage objects. |
file | The "file" parameter is a string that represents the file path where the series of BioImages will be saved. |
ome | The "ome" parameter is a boolean flag that indicates whether the images should be saved in OME-TIFF format or not. If "ome" is set to true, the images will be saved in OME-TIFF format. If "ome" is set to false, the images will be |
void BioCore.BioImage.SetValue | ( | int | x, |
int | y, | ||
int | ind, | ||
ushort | value | ||
) |
void BioCore.BioImage.SetValue | ( | int | x, |
int | y, | ||
ZCT | coord, | ||
ushort | value | ||
) |
void BioCore.BioImage.SetValue | ( | ZCTXY | coord, |
ushort | value | ||
) |
void BioCore.BioImage.SetValueRGB | ( | ZCTXY | coord, |
int | RGBindex, | ||
ushort | value | ||
) |
BioImage[] BioCore.BioImage.SplitChannels | ( | ) |
|
static |
void BioCore.BioImage.StackThreshold | ( | bool | bit16 | ) |
|
static |
|
static |
void BioCore.BioImage.To16Bit | ( | ) |
It converts the image to 16 bit, and then calculates the threshold for the image
void BioCore.BioImage.To24Bit | ( | ) |
void BioCore.BioImage.To32Bit | ( | ) |
void BioCore.BioImage.To48Bit | ( | ) |
It converts the image to 48 bit RGB
void BioCore.BioImage.To8Bit | ( | ) |
It converts a 16-bit image to an 8-bit image
double BioCore.BioImage.ToImageSizeX | ( | double | d | ) |
double BioCore.BioImage.ToImageSizeY | ( | double | d | ) |
PointF[] BioCore.BioImage.ToImageSpace | ( | PointF[] | p | ) |
System.Drawing.RectangleF BioCore.BioImage.ToImageSpace | ( | RectangleD | p | ) |
Convert a rectangle in physical space to a rectangle in image space
RectangleD |
double BioCore.BioImage.ToImageSpaceX | ( | double | x | ) |
double BioCore.BioImage.ToImageSpaceY | ( | double | y | ) |
|
static |
The function takes a point in the volume space and converts it to a point in the stage
space
PointD | A custom class that holds an X and Y coordinate. |
physicalSizeX | The width of the stage in mm |
physicalSizeY | The height of the stage in mm |
volumeX | The X coordinate of the top left corner of the volume in stage space. |
volumeY | The Y position of the top left corner of the volume in stage space. |
|
static |
It takes a list of points, and converts them from a coordinate system where the origin is in the center of the image, to a coordinate system where the origin is in the top left corner of the image
p | the array of points to convert |
physicalSizeX | The width of the image in microns |
physicalSizeY | The height of the image in microns |
volumeX | The X position of the volume in stage space. |
volumeY | The Y position of the top left corner of the volume in stage space. |
RectangleD BioCore.BioImage.ToStageSpace | ( | RectangleD | p | ) |
Convert a rectangle from the coordinate space of the image to the coordinate space of the
stage
RectangleD | A rectangle with double precision coordinates. |
|
static |
This function takes a rectangle in the coordinate space of the image and converts it to the
coordinate space of the stage
RectangleD | A rectangle with double precision. |
physicalSizeX | The width of the stage in pixels |
physicalSizeY | The height of the stage in pixels |
volumeX | The X position of the volume in stage space. |
volumeY | The Y position of the top of the volume in stage space. |
override string BioCore.BioImage.ToString | ( | ) |
void BioCore.BioImage.Update | ( | ) |
|
static |
async void BioCore.BioImage.UpdateBuffersPyramidal | ( | ) |
void BioCore.BioImage.UpdateCoords | ( | int | sz, |
int | sc, | ||
int | st | ||
) |
void BioCore.BioImage.UpdateCoords | ( | int | sz, |
int | sc, | ||
int | st, | ||
string | order | ||
) |
|
static |
List<BufferInfo> BioCore.BioImage.Buffers = new List<BufferInfo>() |
|
static |
|
static |
|
static |
List<Resolution> BioCore.BioImage.Resolutions = new List<Resolution>() |
SlideImage BioCore.BioImage.slideImage |
List<NetVips.Image> BioCore.BioImage.vipPages = new List<NetVips.Image>() |
|
get |
|
getset |