Image processing functions in Image Analyst MKII
Image Analyst MKIIFunctions Glossary
HomeWorkflowImage Processing BasicsFunctions GlossaryPipelines GlossaryProtocolsQuick How ToSearch
2D DFT Filter
2D DFT Filter Butterworth BP
2D DFT Filter Butterworth BP Tiled
2D Kernel Convolution
2D Median
2D Morphological Operator
2D Nonlinear Filter
2D Savitzky-Golay filter
Absolute Value
Affine Transformation
AI Create Training Set
Align Channels
Align Series (Image Stabilizer)
Align Tiled Channels
Align Tiled Series (Image Stabilizer)
Anisotropic Diffusion Filter
Attach Intensity Gating Image
Attach Overlay Image
Automatic ROI drawing
Band Pass filter Optimization
Blind Spectral Unmix with NMF
Brightfield Color Deconvolution with PCA
Calculate Simple Crossbleed
Calculate Spatial Moments
Calibration Wizard Parameters
Clear Segmentation Classifiers (Gating)
Close
Copy
Copy ROIs from Other Image
Correct Intensity Jump
Correct Lens Distortion
Count Division and Cell Death
Count Object Colocalization
Create ROI
Create ROI Grid
Create ROIs from Segments
Create Segments from ROIs
Crop
Crop Image in Place
Crop Image to Segments
Cross-correlation data
Cross-correlation image
Detect Nuclei Convolution
Differential Evolution Optimizer
Distance from Segments
Draw Model Mitochondrion
Draw Random Position Model Mitochondria
EndIf
Erase All ROIs
Excel Window Command
Export
Fill Mask
Fill or Mask Active ROI
Find ROIs and Annotations
Fix Vignetting
FLIPR Calibration with [K+]ec steps and known [K+]ic and known kP
FLIPR Complete Calibration
FLIPR Complete Calibration with known kP
FLIPR Complete Calibration with known kP - Goldman
FLIPR Complete Calibration with known kP - Goldman with Neural Network
FLIPR Complete Iterative Calibration
FLIPR Estimate PN
FLIPR Short Calibration based on known potential during MDC and CDC
FLIPR Short Calibration between known baseline and CDC
FLIPR Short Calibration between known baseline and MDC
FLIPR Short Calibration between known baseline and separately measured fP0
FLIPR Short Calibration from Zero with fx=0
FunctionOptions
Get Image Information
Get Linked Channel
If
If Greater Than Zero
Image Arithmetic (image-image math)
Image Arithmetic In Place
Image Arithmetic Single Frame
Inpaint Mask
Input
Invert
Ion Concentration Calibration Constants
Ion Concentration Calibration Error Propagation
Ion Concentration Calibration Overrides
Ion Concentration Calibration Wizard Parameters
Lens Correction Optimization
Link
Load and Run Pipeline
Load ROIs
Mask Borders
Mask Frames by Plot Values
Mask Images
Measure Object Intensity
Measure Object Morphology
Mirror or Rotate
Mirror or Rotate in Place (clipping)
Model Out of Focus Blur
Multi-Dimensional Open Information
Multi-Dimensional Open Position
Multi-Dimensional Reload Channel
New Image
New Time Scale
Onset Image
Open File
Optical Flow
Options
Peak Bioenergetic Power Analysis
Pipeline
Pipeline Optimization
Pipeline Optimization Parameter
Plot
Plot Correlation (Colocalization)
Plot Intensities Corresponding to Segments
Plot Morphological Parameters of Segments
Plot Ratio
Plot ROI Dimensions
Plot Spectral Parameter with PCA
Plot Spectrum (Periodogram)
Plot Tracking Parameters
Potential calibration constants
Potential calibration error propagation
Potential calibration expert overrides
Projection of Vectors from a Point
Ratio
Ratiometric Ion Concentration with Grynkiewicz Equation - Complete Internal
Ratiometric ROI Classifiers (Gating)
ReCount Division and Cell Death
Reevaluate Segments (Apply Gate)
Remove Blank or Unsharp Frames
Rename
Replace or Modify ROIs
Resample Image
Resize Image
Revvity Harmony Options
ROI Classifiers (Gating)
Run EXE
Run Membrane Potential Calibration
Save ROIs
Scalar Arithmetic (image-value math)
Scalar Arithmetic Multi
Secondary Watershed Segmentation
Select
Select by Number
Sensor Noise Characteristics
Set Reference Image
Set ROI Annotation
Set Scaling/LUT
Set Segmentation Classifiers (Gating)
Set Segmentation Intensity Classifiers (Gating)
Shift Time Scale
Simple 2D Cross-correlation
Simple Segmentation
Skeletonize
Spectral Unmix
Stitch Series
Strip to Well Cell Count
Substitute Poisson Noise
Subtract Background or Normalize
T or Z-project
Template Matching
Temporal Average Filter
Temporal Block Filter
Temporal Median Filter
Temporal Rolling Projection
Temporal Savitzky-Golay Filter
Thinness Ratio Optimization
Threshold
Time Stamp and Scale Bar
TMRM Complete Calibration
TMRM Complete Calibration with known kT
TMRM Complete Calibration with known kT and K-steps
TMRM Short Calibration between known baseline and MDC or CDC
Track Objects
Truncate or Cut
Wait for All Inputs
Watershed Segmentation
Wiener filter
Window Menu Command
Write Back Scaled Values
ΔF/F0

Brightfield Color Deconvolution with PCA ( IAColorDeconvolution )

Parameters:
Name Short Name Type Description
Method method string Which algorithm to use.
Staining staining string Type of staining, and whether OD and RGB coefficients are calculated and stored or used for normalization or concentration to color conversion.
Multi frame operation for PCA operation string Which frame is the source of color deconvolution coefficient calculation.
Reference OD matrix ODmatrix string Maximal OD values for hematoxylin and eosin, written as ={{ODhematoxylin,ODeosin}}, or use a built-in kernel name.
Reference RGB matrix RGBmatrix string R, G, B coefficients to convert hematoxylin and eosin concentrations to colors, written as ={{R,G,B},{R,G,B}}, where the first set is for hematoxylin and the second is for eosin.
Minimum OD for PCA minOD real The color deconvolution coefficient will be calculated only over pixels darker than this OD value (for any channels).
Maximum OD for PCA maxOD real The color deconvolution coefficient will be calculated only over pixels lighter than this OD value (for all channels).
Two passes PCA secondpass boolean A second pass of PCA is performed to prevent using pixels for stain vector determination that return negative concentrations after unmixing.
Automatic white level autowhitelevel boolean White level is calculated from the image for each channel. Use this if large background area is visible around the tissue.
White level whitelevel real This value will be uniformly used as white level in each channel if the "Automatic white level" is off, and this value will be used as the white level of the resulting normalized, white balanced or converted color images.
Automatic mask level automasklevel boolean Mask level is calculated from the image for each channel. Automatic masking will detect black (zero pixels values) or white regions at the edge of the image.
Mask level masklevel real If no automatic masking is used, these values mark empty areas of the image. Set -1 to disable.
Fill mask with white fillmask boolean Empty areas will be filled with background white.
Projection sensitivity for 2-stains (percentile) projectionsensitivity real This percentile and 100- this percentile will be used to determine the two major components of the stain.
Max concentration and color clipping percentile cliplevel real Values smaller than this percentile or larger than 100- this percentile will be cilpped or saturated in the results, using the minimum and maximum image scaling values.
Clip results to original scaling clipresults boolean Using the above percentiles, pixels dimmer or brighter than the scaling boundaries will be clipped in the resultant raw data.
Scale OD images identically scaleODidentical boolean OD images will use fixed scaling to the maximal and minimal percentiles within all 3 channels. If No, each channels are independently scaled. This does not affect image data.
Stain vector file (*.bin, 32-bit floating point values) filename string Stain vector file for "Multi frame operation"="Use random stain vectors for each frame". This is a binary file of 32-bit floating point values dumped. For H&E 6 values R,R,G,G,B,B represent the two stains. Each repeat of these 6 values is a different staining color, that will be randomly chosen.
Description:
Brightfield Color Deconvolution using principal component analysis (PCA) to convert RGB images to stain concentrations, stain concentrations to RGB images, normalize staining to standard and perform white balance adjustment. Select between these operations using the "Method" parameter. Select only one channel to run this function, the function automatically looks up all overlaid channels. It requires 3 channels with red, green and blue LUTs for both color to concentration or concentration to color operations.

* Converting H&E to concentrations:
Use "Method"="Color to Concentrations using PCA".
Use "Staining"="H&E" or "Two Stains...". The reference matrices do not affect conversion to concentrations, the stain vectors are automatically generated using PCA. When "Staining"="Two Stains - Calculate Referene" is used the Reference stain matrices will be saved as function parameter, so the "Method"="Concentrations to Color" and "Staining"="Two Stains - Calculate Reference" may be used for reverse operation, restoring the original brightfield image. The result replaces the original images, and the hematoxylin channel will be in the original red channel given in OD values, and the eosin in the green channel. The blue channel will return zeros.

* Converting Concentrations to bright field:
This is the reverse operation of converting brightfield to concentrations. Use "Method"="Concentrations to Color". Depending on the setting in the "Staining" parameter, a standard H&E vector, or the reference given in the "Reference OD matrix" or "Reference RGB matrix" will be used to create the colors. As input, 3 channels are needed, hematoxylin in the red channel given in OD values, and the eosin in the green channel, and the blue channel filled with zeros. The staining matrix can be saved from the original or another brightfield image using "Staining"="Two Stains - Calculate Reference" parameter, either with the normalization or color to concentration methods. Depending on the "White level" result images will be 8-bit or 16-bit per channel RGB images.

* Normalizing/standardizing H&E images:
Use "Method"="Normalize using PCA" and "Staining"="H&E" to recolor H&E stains to a built-in standard. Alternatively use the "Staining"="Two Stains - Calculate Reference" to calculate OD and RGB matrices using an image with the desired color, and then use "Two Stains - Use Reference" to normalize other images. The former operation writes the reference matrix parameters, the latter uses them.

"Reference OD matrix": maximal OD values for hematoxylin and eosin, written as ={{ODhematoxylin,ODeosin}}, or use a built-in kernel name.
"Reference RGB matrix": R, G, B coefficients to convert hematoxylin and eosin concentrations to colors, written as ={{R,G,B},{R,G,B}}, where the first set is for hematoxylin and the second is for eosin.

* Correcting white balance of bright field images:
Use "Method"="Auto white balance" and "Automatic white level"=Yes.
This method is applicable to RGB bright field images, where substantial amount of background, empty area is visible. The method will distort color if no enough background area is present. The image may have black or white empty (no data) areas at the edges, this will be detected as mask and optionally eliminated. Provide a new white level, that will be applied to each RGB channel in “White level”. “Automatic mask level” will decide if 0 or the bit-depth maximal value is used as no data points, and mask these areas during white balancing. Alternatively, manually apply mask level in “Mask level”. “Fill mask with white” will blend the masked area into the empty background area.

Based on: Marini N, Otalora S, Wodzinski M, Tomassini S, Dragoni AF, Marchand-Maillet S, Morales JPD, Duran-Lopez L, Vatrano S, Muller H, Atzori M. Data-driven color augmentation for H&E stained images in computational pathology. J Pathol Inform. 2023;14:100183.The "Stain vector file" is in R,R,G,G,B,B format with coefficients for H and E alternating for compatibility with the data in the above paper. Use data.astype(np.float32).tofile("HEref.bin") in Python to export stain vector database to binary format.