![]() |
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.
|
Public Member Functions | |
| ushort | GetValueRGB (int x, int y, int RGBChannel) |
| ColorS | GetPixel (int ix, int iy) |
| void | SetPixel (int ix, int iy, ColorS col) |
| void | SetValue (int x, int y, ushort value) |
| void | SetValueRGB (int ix, int iy, int RGBChannel, ushort value) |
| void | SetColorRGB (int ix, int iy, ColorS value) |
| void | SetImage (Bitmap bitmap, bool switchRGB) |
| Bitmap | GetFiltered (IntRange rr, IntRange rg, IntRange rb) |
| void | Crop (Rectangle r) |
| Bitmap | GetCropBitmap (Rectangle r) |
| BufferInfo | GetCropBuffer (Rectangle r) |
| BufferInfo (int w, int h, PixelFormat px) | |
| BufferInfo (string file, int w, int h, PixelFormat px, byte[] bts, ZCT coord, int index) | |
| BufferInfo (string file, int w, int h, PixelFormat px, byte[] bts, ZCT coord, int index, Plane plane) | |
| BufferInfo (string file, int w, int h, PixelFormat px, byte[] byts, ZCT coord, int index, bool littleEndian=true, bool interleaved=true) | |
| BufferInfo (string file, int w, int h, PixelFormat px, byte[] byts, ZCT coord, int index, Plane plane, bool littleEndian=true, bool interleaved=true) | |
| BufferInfo (string file, Image im, ZCT coord, int index) | |
| BufferInfo (string file, Image im, ZCT coord, int index, Plane pl) | |
| BufferInfo (int w, int h, PixelFormat px, byte[] bts, ZCT coord, string id) | |
| void | SwitchRedBlue () |
| byte[] | GetSaveBytes (bool littleEndian) |
| void | RGBTo32Bit () |
| BufferInfo | Copy () |
| BufferInfo | CopyInfo () |
| void | To8Bit () |
| void | To16Bit () |
| Convert the image to 16 bit. More... | |
| void | ToRGB () |
| void | RotateFlip (RotateFlipType rot) |
| override string | ToString () |
| void | Dispose () |
| It's a function that disposes of the object's memory. More... | |
Static Public Member Functions | |
| static string | CreateID (string filepath, int index) |
| static BufferInfo[] | RGB48To16 (string file, int w, int h, int stride, byte[] bts, ZCT coord, int index, Plane plane) |
| static BufferInfo | RGB16To48 (BufferInfo[] bfs) |
| static BufferInfo | RGB16To48 (BufferInfo bfs) |
| static Bitmap | GetRGBBitmap (BufferInfo[] bfs, IntRange rr, IntRange rg, IntRange rb) |
| static Bitmap | GetEmissionBitmap (BufferInfo bfs, IntRange rr, System.Drawing.Color col) |
| static Bitmap | GetEmissionBitmap (BufferInfo[] bfs, Channel[] chans) |
| static BufferInfo | RGB8To24 (BufferInfo[] bfs) |
| static BufferInfo | RGB8To24 (BufferInfo bfs) |
| static Bitmap[] | RGB24To8 (Bitmap info) |
| static unsafe Bitmap | GetBitmap (int w, int h, int stride, PixelFormat px, byte[] bts) |
| static unsafe Bitmap | GetBitmapRGB (int w, int h, PixelFormat px, byte[] bts) |
| static unsafe IntPtr | GetRGBData (int w, int h, PixelFormat px, byte[] bts) |
| static unsafe byte[] | GetRGBBuffer (int w, int h, PixelFormat px, byte[] bts) |
| static Bitmap | GetFiltered (int w, int h, int stride, PixelFormat px, byte[] bts, IntRange rr, IntRange rg, IntRange rb) |
| static Bitmap | SwitchRedBlue (Bitmap image) |
| static byte[] | GetBuffer (Bitmap bmp, int stride) |
| static Bitmap | To24Bit (Bitmap b) |
| static Bitmap | To32Bit (Bitmap b) |
| static Bitmap | SwitchChannels (Bitmap image, int c1, int c2) |
| static BufferInfo | operator/ (BufferInfo a, BufferInfo b) |
| static BufferInfo | operator* (BufferInfo a, BufferInfo b) |
| static BufferInfo | operator+ (BufferInfo a, BufferInfo b) |
| static BufferInfo | operator- (BufferInfo a, BufferInfo b) |
| static BufferInfo | operator/ (BufferInfo a, float b) |
| static BufferInfo | operator* (BufferInfo a, float b) |
| static BufferInfo | operator+ (BufferInfo a, float b) |
| static BufferInfo | operator- (BufferInfo a, float b) |
| static BufferInfo | operator/ (BufferInfo a, ColorS b) |
| static BufferInfo | operator* (BufferInfo a, ColorS b) |
| static BufferInfo | operator+ (BufferInfo a, ColorS b) |
| static BufferInfo | operator- (BufferInfo a, ColorS b) |
Public Attributes | |
| string | ID |
| int | SizeX |
| int | SizeY |
| ZCT | Coordinate |
Properties | |
| string | File [get, set] |
| int | HashID [get] |
| int | Stride [get] |
| int | PaddedStride [get] |
| byte[] | PaddedBuffer [get] |
| bool | LittleEndian [get, set] |
| long | Length [get] |
| int | RGBChannelsCount [get] |
| int | BitsPerPixel [get] |
| PixelFormat | PixelFormat [get, set] |
| byte[] | Bytes [get, set] |
| byte[] | PaddedBytes [get] |
| Image | Image [get, set] |
| Image | ImageRGB [get, set] |
| IntPtr | RGBData [get] |
| Plane | Plane [get, set] |
| int | PixelFormatSize [get] |
| Statistics[] | Stats [get, set] |
| byte[] | RGBBytes [get] |
| bool | isRGB [get] |
| BioCore.BufferInfo.BufferInfo | ( | int | w, |
| int | h, | ||
| PixelFormat | px | ||
| ) |
| BioCore.BufferInfo.BufferInfo | ( | string | file, |
| int | w, | ||
| int | h, | ||
| PixelFormat | px, | ||
| byte[] | bts, | ||
| ZCT | coord, | ||
| int | index | ||
| ) |
| BioCore.BufferInfo.BufferInfo | ( | string | file, |
| int | w, | ||
| int | h, | ||
| PixelFormat | px, | ||
| byte[] | byts, | ||
| ZCT | coord, | ||
| int | index, | ||
| bool | littleEndian = true, |
||
| bool | interleaved = true |
||
| ) |
| BioCore.BufferInfo.BufferInfo | ( | string | file, |
| Image | im, | ||
| ZCT | coord, | ||
| int | index | ||
| ) |
| BioCore.BufferInfo.BufferInfo | ( | int | w, |
| int | h, | ||
| PixelFormat | px, | ||
| byte[] | bts, | ||
| ZCT | coord, | ||
| string | id | ||
| ) |
| BufferInfo BioCore.BufferInfo.Copy | ( | ) |
It creates a new byte array, copies the bytes from the original array into the new array, and then creates a new BufferInfo object with the new byte array
| BufferInfo BioCore.BufferInfo.CopyInfo | ( | ) |
It creates a new BufferInfo object, copies the values of the current object into the new object, and returns the new object
|
static |
| void BioCore.BufferInfo.Crop | ( | Rectangle | r | ) |
| void BioCore.BufferInfo.Dispose | ( | ) |
|
static |
If the stride is not a multiple of 4, then pad the buffer with zeros and create a new bitmap with the padded buffer
| w | width of the image |
| h | height of the image |
| stride | The stride of the image. |
| PixelFormat | Format24bppRgb |
| bts | the byte array of the image |
|
static |
|
static |
It takes a bitmap, locks it, copies the bytes into a byte array, reverses the byte array, and then unlocks the bitmap
| Bitmap | The bitmap to convert to a byte array. |
| stride | The stride is the width of a single row of pixels (a scan line), rounded up to a four-byte boundary. If the stride is positive, the bitmap is top-down. If the stride is negative, the bitmap is bottom-up. (In Windows GDI, the |
| Bitmap BioCore.BufferInfo.GetCropBitmap | ( | Rectangle | r | ) |
| BufferInfo BioCore.BufferInfo.GetCropBuffer | ( | Rectangle | r | ) |
It takes a rectangle and returns a BufferInfo object that contains the cropped image
| Rectangle | The rectangle to crop the image to. |
|
static |
It takes a buffer, a color, and a range, and returns a bitmap with the color applied to the buffer
| BufferInfo | This is a class that contains the following properties: |
| IntRange | This is a struct that contains a min and max value. |
| col | The color to use for the emission. |
|
static |
It takes a list of buffer info objects and a list of channel objects and returns a bitmap of the emission data
| bfs | an array of BufferInfo objects, each of which contains a buffer of data (a float[]) and the size of the buffer (SizeX and SizeY). |
| chans | an array of Channel objects, which are defined as: |
|
static |
It takes a byte array of image data, and returns a bitmap
| w | width of the image |
| h | height of the image |
| stride | the number of bytes per row of the image. |
| PixelFormat | The pixel format of the image. |
| bts | the byte array of the image |
| IntRange | This is a struct that contains a min and max value. |
| IntRange | This is a struct that contains a min and max value. |
| IntRange | This is a struct that contains a min and max value. |
| Bitmap BioCore.BufferInfo.GetFiltered | ( | IntRange | rr, |
| IntRange | rg, | ||
| IntRange | rb | ||
| ) |
|
static |
It takes a buffer of RGB data, and returns a bitmap
| bfs | BufferInfo[] - this is an array of BufferInfo objects. Each BufferInfo object represents a single image buffer. In this case, we're only using one image buffer, but you can use multiple image buffers to create a single image. For example, you can use a red image |
| IntRange | |
| IntRange | |
| IntRange |
|
static |
|
static |
| byte[] BioCore.BufferInfo.GetSaveBytes | ( | bool | littleEndian | ) |
| ushort BioCore.BufferInfo.GetValueRGB | ( | int | x, |
| int | y, | ||
| int | RGBChannel | ||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
It takes a 16 bit image and converts it to a 48 bit image by copying the red value to the green and blue values
| BufferInfo | This is a class that contains the following properties: |
|
static |
It takes a list of BufferInfo objects, each of which contains a byte array of 16-bit pixel data, and returns a single BufferInfo object containing a byte array of 48-bit pixel data
| bfs | an array of BufferInfo objects. |
|
static |
|
static |
It takes a byte array of RGB48 data, converts it to RGB16, and returns a BufferInfo array of 3 BufferInfo objects, each containing a Bitmap of the RGB16 data
| file | the file name |
| w | width of the image |
| h | height of the image |
| stride | the number of bytes per row |
| bts | byte array of the image data |
| ZCT | Z, C, T coordinates |
| index | the index of the image in the file |
| Plane | enum with values XY, XZ, YZ |
|
static |
It takes a buffer of bytes, and converts it from 8-bit grayscale to 24-bit RGB
| BufferInfo | This is a class that contains the following properties: |
|
static |
It takes an array of BufferInfo objects, each of which contains a byte array of 8-bit pixel data, and returns a single BufferInfo object containing a byte array of 24-bit pixel data
| bfs | an array of BufferInfo objects. |
| void BioCore.BufferInfo.RGBTo32Bit | ( | ) |
| void BioCore.BufferInfo.RotateFlip | ( | RotateFlipType | rot | ) |
| void BioCore.BufferInfo.SetColorRGB | ( | int | ix, |
| int | iy, | ||
| ColorS | value | ||
| ) |
| void BioCore.BufferInfo.SetImage | ( | Bitmap | bitmap, |
| bool | switchRGB | ||
| ) |
| void BioCore.BufferInfo.SetPixel | ( | int | ix, |
| int | iy, | ||
| ColorS | col | ||
| ) |
| void BioCore.BufferInfo.SetValue | ( | int | x, |
| int | y, | ||
| ushort | value | ||
| ) |
| void BioCore.BufferInfo.SetValueRGB | ( | int | ix, |
| int | iy, | ||
| int | RGBChannel, | ||
| ushort | value | ||
| ) |
The function takes a pixel coordinate (ix, iy) and a color channel (RGBChannel) and a value (value) and sets the pixel value to the value
| ix | x coordinate of the pixel |
| iy | The y coordinate of the pixel to set. |
| RGBChannel | 0 = Red, 1 = Green, 2 = Blue |
| value | the value to set the pixel to |
|
static |
It takes an image, extracts the two channels you want to switch, replaces the channels in the original image, and returns the original image with the channels switched
| Bitmap | The image to be processed |
| c1 | The channel to be replaced |
| c2 | The channel to be replaced |
| void BioCore.BufferInfo.SwitchRedBlue | ( | ) |
|
static |
It takes a Bitmap image, extracts the red and blue channels, replaces the red channel with the blue channel and the blue channel with the red channel, and returns the modified image
| Bitmap | The image to be processed |
| void BioCore.BufferInfo.To16Bit | ( | ) |
|
static |
|
static |
| void BioCore.BufferInfo.To8Bit | ( | ) |
| void BioCore.BufferInfo.ToRGB | ( | ) |
| override string BioCore.BufferInfo.ToString | ( | ) |
|
getset |