![]() |
BioGTK
6.7.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
|
A GTK GLArea widget that renders pyramidal slide tiles directly on the GPU. Eliminates ReadPixels overhead by rendering to screen instead of copying to CPU. Supports SkiaSharp overlay for annotations via GRContext. More...
Public Member Functions | |
| void | DiscardCompleteFrame () |
| void | UploadTileTexture (TileIndex index, byte[] pixelData, int tileWidth, int tileHeight) |
| Upload a tile texture to the GPU. Call from the main thread. | |
| void | GetUploadedTileSize (TileIndex index, out int w, out int h) |
| Get the uploaded texture dimensions for a cached tile. Returns (0,0) if the tile is not in the cache. | |
| bool | HasTileTexture (TileIndex index) |
| Check if a tile texture is already in the GPU cache. | |
| void | ReleaseTileTexture (TileIndex index) |
| Release a specific tile texture. | |
| void | ReleaseLevelTextures (int level) |
| Release all textures for a specific pyramid level. | |
| void | ClearTextureCache () |
| Clear all cached textures. | |
| void | RequestRedraw () |
| Request a redraw of the GLArea. | |
| void | CaptureNextWholeImageFrame (Action< byte[], int, int > callback) |
| Captures the next complete fit-to-window image frame. A newer request replaces an older one because only the current image/coordinate matters. | |
| void | CancelWholeImageFrameCapture (Action< byte[], int, int > callback) |
| void | SetTilesToRender (IEnumerable< TileRenderInfo > tiles) |
| Prepare tiles for rendering. Call before RequestRedraw(). | |
| void | SetProtectedTileIndices (IEnumerable< TileIndex > indices) |
| Protects incoming visible tiles from FIFO eviction. The currently displayed set is included automatically so progressive level changes retain both the fallback frame and the target frame under construction. | |
| byte[] | ReadPixels () |
| Read pixels from the current framebuffer (for export/save operations). This is slow - only use for export, not display. | |
Properties | |
| List< TileRenderInfo > | TilesToRender = new() [get] |
| bool | NeedsRedraw = true [get, set] |
| bool | PreservePreviousFrameWhileIncomplete = false [get, set] |
| float | ImageScreenX = -1 [get, set] |
| float | ImageScreenY = -1 [get, set] |
| float | ImageScreenW = -1 [get, set] |
| float | ImageScreenH = -1 [get, set] |
| int | CachedTextureCount [get] |
Events | |
| Action< SKCanvas, int, int > | OnSkiaRender |
| Event fired during Skia rendering phase for annotation drawing. | |
A GTK GLArea widget that renders pyramidal slide tiles directly on the GPU. Eliminates ReadPixels overhead by rendering to screen instead of copying to CPU. Supports SkiaSharp overlay for annotations via GRContext.
Definition at line 19 of file SlideGLArea.cs.
| BioGTK.SlideGLArea.SlideGLArea | ( | ) |
Definition at line 141 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.CancelWholeImageFrameCapture | ( | Action< byte[], int, int > | callback | ) |
Definition at line 874 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.CaptureNextWholeImageFrame | ( | Action< byte[], int, int > | callback | ) |
Captures the next complete fit-to-window image frame. A newer request replaces an older one because only the current image/coordinate matters.
Definition at line 868 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.ClearTextureCache | ( | ) |
Clear all cached textures.
Definition at line 804 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.DiscardCompleteFrame | ( | ) |
Definition at line 562 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.GetUploadedTileSize | ( | TileIndex | index, |
| out int | w, | ||
| out int | h ) |
Get the uploaded texture dimensions for a cached tile. Returns (0,0) if the tile is not in the cache.
Definition at line 745 of file SlideGLArea.cs.
| bool BioGTK.SlideGLArea.HasTileTexture | ( | TileIndex | index | ) |
Check if a tile texture is already in the GPU cache.
Definition at line 756 of file SlideGLArea.cs.
| byte[] BioGTK.SlideGLArea.ReadPixels | ( | ) |
Read pixels from the current framebuffer (for export/save operations). This is slow - only use for export, not display.
Definition at line 910 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.ReleaseLevelTextures | ( | int | level | ) |
Release all textures for a specific pyramid level.
Definition at line 782 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.ReleaseTileTexture | ( | TileIndex | index | ) |
Release a specific tile texture.
Definition at line 764 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.RequestRedraw | ( | ) |
Request a redraw of the GLArea.
Definition at line 857 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.SetProtectedTileIndices | ( | IEnumerable< TileIndex > | indices | ) |
Protects incoming visible tiles from FIFO eviction. The currently displayed set is included automatically so progressive level changes retain both the fallback frame and the target frame under construction.
Definition at line 895 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.SetTilesToRender | ( | IEnumerable< TileRenderInfo > | tiles | ) |
Prepare tiles for rendering. Call before RequestRedraw().
Definition at line 883 of file SlideGLArea.cs.
| void BioGTK.SlideGLArea.UploadTileTexture | ( | TileIndex | index, |
| byte[] | pixelData, | ||
| int | tileWidth, | ||
| int | tileHeight ) |
Upload a tile texture to the GPU. Call from the main thread.
Definition at line 650 of file SlideGLArea.cs.
|
get |
Definition at line 904 of file SlideGLArea.cs.
|
getset |
Definition at line 78 of file SlideGLArea.cs.
|
getset |
Definition at line 77 of file SlideGLArea.cs.
|
getset |
Definition at line 75 of file SlideGLArea.cs.
|
getset |
Definition at line 76 of file SlideGLArea.cs.
|
getset |
Definition at line 68 of file SlideGLArea.cs.
|
getset |
Definition at line 69 of file SlideGLArea.cs.
|
get |
Definition at line 67 of file SlideGLArea.cs.
| Action<SKCanvas, int, int> BioGTK.SlideGLArea.OnSkiaRender |
Event fired during Skia rendering phase for annotation drawing.
Definition at line 83 of file SlideGLArea.cs.