Skip to content

Commit 871bb4c

Browse files
committed
docs: document changes in RoiMap
1 parent 126ade4 commit 871bb4c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

blog/release.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ The new `Mask` class uses 1 byte per pixel (vs 8 pixels per byte), trading ~8x m
114114
### Regions of Interest
115115

116116
API for handling of regions of interest has also been changed.
117-
ROI creation methods like `fromMask()` and `fromWatershed()` are now standalone functions `fromMask()` and `watershed()`.
117+
ROI map creation methods like `fromMask()` and `fromWatershed()` are now standalone functions `fromMask()` and `watershed()`.
118118

119119
```ts
120120
//Before
@@ -135,6 +135,21 @@ const rois = roiManager.getRois();
135135

136136
This simplifies the process of creating a map of regions of interest and eliminates the need for a separate initialization step, providing a more direct and functional approach to ROI creation.
137137

138+
The `RoiMap` data structure has also been modernized with clearer property names:
139+
140+
```ts
141+
// Before
142+
const colsData = roiMap.colsInfo();
143+
const rowsData = roiMap.rowsInfo();
144+
// Provide information about ROIs per column and per row.
145+
// After
146+
const blackRegions = roiMap.blackRois;
147+
const whiteRegions = roiMap.whiteRois;
148+
// Provide information based on ROI's value.
149+
```
150+
151+
The new `blackRois` and `whiteRois` properties provide more intuitive access to region data based on pixel values rather than geometric dimensions.
152+
138153
For more information, please, visit these tutorials:
139154

140155
- [Image segmentation with `threshold()` and `fromMask()`](../docs/Tutorials/Image%20segmentation%20with%20threshold)

0 commit comments

Comments
 (0)