-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 86-add-roi-analysis-tutorial
- Loading branch information
Showing
30 changed files
with
2,552 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
sidebar_position: 20 | ||
--- | ||
|
||
_Finds extreme pixel values in the image._ | ||
|
||
`getExtrema`, as the name suggests, finds extreme intensity values of the image. If user looks for minimum values it finds the darkest points, when maximum - the brightest. | ||
|
||
The principle is straight-forward: the function iterates through each point and compares values around it. If all the values around point in question is smaller then the point is considered a minimum. Same algorithm for maximum values. | ||
|
||
:::info | ||
By choosing different algorithm option you can change the size of the neighboring area where the extrema is search. | ||
::: | ||
:::tip | ||
You can add a mask as an option to specify locations where to look for extrema. | ||
::: | ||
|
||
| Minimum | Maximum | | ||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | | ||
| ![Minimum](./images/extremaOutput/CellsOutputcrossMinISODATA5.jpg) | ![Maximum](./images/extremaOutput/CellsOutputcrossMaxISODATA5.jpg) | | ||
|
||
### Parameters and default values | ||
|
||
- `image` | ||
|
||
- `options` | ||
|
||
#### Options | ||
|
||
| Property | Required | Default value | | ||
| --------------------------------------------------------------------------------------------------------------- | -------- | ------------- | | ||
| [`kind`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#distance) | no | `'maximum'` | | ||
| [`mask`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#distance) | no | - | | ||
| [`algorithm`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#distance) | no | `star` | | ||
| [`maxEquals`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#distance) | no | `2` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_position: 0 | ||
--- | ||
|
||
Operations section is dedicated to elements of ImageJS that are mostly used to help with or to transition from one image data type to another. | ||
For instance, threshold is used to go from Image to Mask, while watershed is used to create ROI map. | ||
|
||
### Methods | ||
|
||
| Can be applied on | Images | Masks | | ||
| ------------------------------------------------------------------------------------- | ------- | -------- | | ||
| [Get extrema(`getExtrema`)](./Get%20extrema.md 'internal link on getExtrema') | ✅ | ❌ | | ||
| [Filter points(`filterPoints`)](./Remove%20points.md 'internal link on filterPoints') | ✅ | ❌ | | ||
| [Threshold(`erode`)](./Threshold.md 'internal link on threshold') | ✅ | ❌ | | ||
| [Watershed(`dilate`)](./Watershed.md 'internal link on watershed') | ✅ | ❌ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
sidebar_position: 30 | ||
--- | ||
|
||
_Filters close points by minimum distance between each other._ | ||
|
||
`removeClosePoints` function is used for filtering points that are close to each other. | ||
|
||
This function sorts an array of points by intensity and then calculates euclidean distance between the points. If the distance between points is smaller than the `removeClosePoints` option the compared point gets removed. | ||
|
||
| Extrema without `removeClosePoints` | Extrema with `removeClosePoints` | | ||
| ---------------------------------------------------------------------- | --------------------------------------------------------------------------- | | ||
| ![Image Input](./images/extremaOutput/CellsOutputcrossMinISODATA5.jpg) | ![Image Output](./images/filterPointsOutput/CellsOutputcross17ISODATA5.jpg) | | ||
|
||
### Parameters and default values | ||
|
||
- `points` | ||
|
||
- `image` | ||
|
||
- `options` | ||
|
||
#### Options | ||
|
||
| Property | Required | Default value | | ||
| -------------------------------------------------------------------------------------------------------------- | -------- | ------------- | | ||
| [`distance`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#distance) | yes | - | | ||
| [`kind`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#distance) | yes | - | | ||
| [`channel`](https://image-js.github.io/image-js-typescript/interfaces/RemoveClosePointsOptions.html#channel) | no | `0` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
sidebar_position: 40 | ||
--- | ||
|
||
_Separates and identifies distinct regions or objects within an image through gradient information and marker-based segmentation._ | ||
|
||
[🖼️ Image options and parameters of `waterShed` function](https://image-js.github.io/image-js-typescript/functions/waterShed.html 'github io link') | ||
|
||
[Watershed filter](<https://en.wikipedia.org/wiki/Watershed_(image_processing)> 'wikipedia link on watershed') is a way of identifying objects by finding image's extreme points (minima or maxima) in terms of intensity and filling these spaces with color (label). The process reminds geological [watershed](https://en.wikipedia.org/wiki/Drainage_divide 'wikipedia link on drainage divide'), which is the origin of algorithm's name. In order for the "water" not to go overboard and stay within the limits of the region, these limits must be set. | ||
|
||
There are two ways to do so. One way is to limit the [intensity](../../Glossary.md#intensity 'internal link on glossary') by threshold value. Another way is to apply a mask which can set the area where watershed will be implemented. | ||
|
||
The watershed algorithm is particularly useful for segmenting objects in images, especially when objects are close to each other. | ||
|
||
:::caution | ||
If you look for bright-colored ROIs, then either look for maximum points or invert image before applying watershed. | ||
::: | ||
|
||
| Input image with given minima | What watershed finds | | ||
| -------------------------------------------------------------------------- | ----------------------------------------------------------------- | | ||
| ![Image Input](./images/filterPointsOutput/CellsOutputcross17ISODATA5.jpg) | ![Image Output](./images/watershedOutput/CellsOutputISODATA5.jpg) | | ||
|
||
### Parameters and default values | ||
|
||
- `image` | ||
|
||
- `options` | ||
|
||
#### Options | ||
|
||
| Property | Required | Default value | | ||
| -------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------ | | ||
| [`mask`](https://image-js.github.io/image-js-typescript/interfaces/WaterShedOptions.html#mask) | no | - | | ||
| [`points`](https://image-js.github.io/image-js-typescript/interfaces/WaterShedOptions.html#points) | no | minimum points from [`getExtrema()`](./Get%20extrema.md 'internal link on get extrema') function | | ||
| [`threshold`](https://image-js.github.io/image-js-typescript/interfaces/WaterShedOptions.html#threshold) | no | `1` | |
Binary file added
BIN
+45.7 KB
docs/Features/Operations/images/extremaOutput/CellsOutputcrossMaxISODATA5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.5 KB
docs/Features/Operations/images/extremaOutput/CellsOutputcrossMinISODATA5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.5 KB
docs/Features/Operations/images/filterPointsOutput/CellsOutputcross17ISODATA5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.6 KB
docs/Features/Operations/images/watershedOutput/CellsOutputISODATA5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.