-
Notifications
You must be signed in to change notification settings - Fork 1
slideEMask
slideEMask
is a C++ program designed to mask the areas without tissue using an image entropy filer.
slideEMask
determines a tissue mask image by assessing image texture. This information is captured by using the standard formula for information entropy to determine the image entropy at each pixel point. This works because highly textured areas (foreground, tissue) can be considered "chaotic" in terms of entropy, and can thus be separated from non-texturized regions (background) using this measure.
To this extent, a 3x3 pixel 'neighborhood' is defined around each pixel. The center pixel's entropy value is calculated by taking the entropy of it's surrounding 3x3 neighborhood.
These values are then averaged in a 4x4 pixel neighborhood to smoothen the image (removing small gaps).
slideEMask
is available elsewhere and can be used to derive masks from virtual slide files, or to derive entropy images from CellProfiler tiles (as generated by slide2Tiles
from slideToolKit), see usage message.
slideEMask
was written in C++ and needs to be compiled to run. CentOS7+
, Rocky8
and macOS
(10.14.5+) precompiled binaries can be found in the binaries
directory.
For your convenience, we have created precompiled binaries for CentOS7+
, Rocky8
and macOS
Mojave (10.14.5+) using g++
. These are available in the binaries
folder:
slideEMask_macOS_Mojave10145
slideEMask_macOS_BigSur1152
slideEMask_macOS_Monterey1201
slideEMask_centos7
You can add slideEMask
to your path by running the code below to make a symbolic link, while making sure to choose the binary appropriate for you system (macOS or CentOS).
mkdir -pv ~/bin/ && \
ln -s -f -v ~/git/slideEMask/binaries/slideEMask[choose_version] ~/bin/slideEMask
Argument(s):
-
-f
,--file
- The filename of the TIF file to process. (Required)
Optional argument(s):
-
-l
,--layer
The layer number of the image to use for processing. (Optional, default: -1) -
-c
,--cellprofiler
- Whether to prepare the image for CellProfiler (save as BMP instead of PNG, and prepend "ENTROPY_" to the filename). Default: false
-
-t
,--threshold
- The entropy gray value threshold for masking, a number between 0 and 255. (Optional, default: -1)
1. Basic Usage:
./slideEMask -f input_image.tif
This will process the TIFF image file input_image.tif
without specifying a layer or a threshold.
2. Specify Layer and Threshold:
./slideEMask -f input_image.tif -l 3 -t 200
This will process layer 3 of the TIFF image input_image.tif
with an entropy threshold of 200.
3. Prepare Image for CellProfiler:
./slideEMask -f input_image.tif -c
This will process the TIFF image input_image.tif
, save it as a BMP file with the filename prefixed by ENTROPY_
, and set the default threshold.
Remember to replace input_image.tif
with the actual filename of the TIFF image you want to process. Adjust the layer number and threshold as needed based on your specific requirements.
Licence. The MIT License (MIT): http://opensource.org/licenses/MIT.
Copyright (c) 2014-2024, Bas G.L. Nelissen & Sander W. van der Laan, UMC Utrecht, Utrecht, the Netherlands.
Introduction
General instructions
slide2Tiles
slideAppend.sh
slideAppendGCT.sh
slideConvert
slideDirectory
slideDupIdentify.py
slideEMask
slideEntropySegmentation.py
slideExtract.py
slideExtractTiles.py
slideInfo
slideInfo.py
slideJobChecker
slideLookup
slideMacro
slideMacro.py
slideMask
slideMoveNewWSI.py
slideNormalize
slideRename
slideRename.py
slideThumb
slideThumb.py
slideQuantify_v1
slideQuantify_v1_1_expresshist_mask.sh
slideQuantify_v1_2_expresshist_tile.sh
slideQuantify_v1_3_tile_normalizing.sh
slideQuantify_v1_4_cellprofiler.sh
slideQuantify_v1_5_wrapup.sh
slideQuantify_v2
slideQuantify_v2_1_entropy_segmentation.sh
slideQuantify_v2_2_extract_tiles.sh
slideQuantify_v2_3_tile_normalizing.sh
slideQuantify_v2_4_cellprofiler.sh
slideQuantify_v2_5_wrapup.sh
slideQuantifyOSX
slideQuantify_cellprofiler.sh
slideQuantify_mask.sh
slideQuantify_normalizing.sh
slideQuantify_tiling.sh
slideQuantify_wrapup.sh
Conda version (default/preferred)
Homebrew version
Rocky 8 Conda version (default/preferred)
Ubuntu 16.04 LTS
Ubuntu 12.04
CentOS7 Conda version with modules
Administrator version