https://github.com/himsr-lab/cu-macrolibrary
ImageJ2 macro library with variables and functions
https://github.com/himsr-lab/cu-macrolibrary
cu-cellseg cu-iscore fiji imagej2 library macro
Last synced: 2 months ago
JSON representation
ImageJ2 macro library with variables and functions
- Host: GitHub
- URL: https://github.com/himsr-lab/cu-macrolibrary
- Owner: himsr-lab
- License: gpl-3.0
- Created: 2021-05-31T20:36:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-28T20:50:07.000Z (about 2 years ago)
- Last Synced: 2025-01-23T08:43:53.763Z (4 months ago)
- Topics: cu-cellseg, cu-iscore, fiji, imagej2, library, macro
- Homepage:
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# CU-MacroLibrary
## ImageJ2 macro library with variables and functions
[](https://doi.org/10.5281/zenodo.4885048)### Software requirements
CU-MacroLibrary requires a recent version of the [Fiji](https://fiji.sc/) image processing package:
* ImageJ2 executable (>= 1.53e)
* Bio-Formats plugin (>= 6.4.0)### Software installation
To install the CU-MacroLibrary with your copy of Fiji, simply copy the `Library.txt`
to `Fiji.app\macros\` and its content will be available to any executed or installed macro.
In addition, ImageJ2's macro editor will autocomplete function names from the library.### Available macro functions (selection)
* [**`endsWithEither`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L91): simple test if a string ends with suffixes from a list.
* [**`getFilesInFolder`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L150): returns a list of files matching a suffix patterns.
* [**`getMedian`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L176): calculates the median value within given threshold values.
* [**`getMedianValue`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L197): calculates the median value for a given array.
* [**`getRegionOverlap`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L253): calculates the relative overlap between two ROI Manager regions.
* [**`getRoisFromMasks`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L284): populates the ROI Manager with regions identified from a segmentation mask.
* [**`normalizePixelValues`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L575): normalizes the pixel intensities of an image by its median value.
* [**`readImage`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L605): reads image files with Bio-Format and labels the slices with the channel names.
* [**`rescalePixelValues`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L684): rescales pixel intensities to a custom range, including `NaN` values.
* [**`setMasksFromRois`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L753): creates a segmentation mask from available ROI Manager regions.
* [**`substractRegions`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L829): implements the missing `Substract` function for the ROI Manager.
* [**`toggleBatchMode`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L854): improves performance for image processing, selections, and ROI Manager updates.
* [**`waitForWindow`**](https://github.com/christianrickert/CU-MacroLibrary/blob/main/Library.txt#L962): halts the macro progression until a window with a specific title is available.### Copyright notices
The [ImageJ2 image](https://github.com/imagej/imagej.github.io/blob/main/media/icons/imagej-shadow.png) is part of the [GitHub Pages for ImageJ](https://github.com/imagej/imagej.github.io).