mpicbg.ij.plugin
Class NormalizeLocalContrast

java.lang.Object
  extended by mpicbg.ij.plugin.AbstractBlockFilter
      extended by mpicbg.ij.plugin.NormalizeLocalContrast
All Implemented Interfaces:
DialogListener, ExtendedPlugInFilter, PlugInFilter

public class NormalizeLocalContrast
extends AbstractBlockFilter

Normalize contrast based on per-pixel mean and STD.

Author:
Stephan Saalfeld

Field Summary
protected  boolean cent
           
protected static boolean center
           
protected  NormalizeLocalContrast[] nlcs
           
protected static double standardDeviations
           
protected  double stds
           
protected  boolean stret
           
protected static boolean stretch
           
 
Fields inherited from class mpicbg.ij.plugin.AbstractBlockFilter
blockRadiusX, blockRadiusY, brx, bry, flags, fps, pip
 
Fields inherited from interface ij.plugin.filter.ExtendedPlugInFilter
KEEP_PREVIEW
 
Fields inherited from interface ij.plugin.filter.PlugInFilter
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
 
Constructor Summary
NormalizeLocalContrast()
           
 
Method Summary
protected  void copyParameters()
           
 boolean dialogItemChanged(GenericDialog gd, AWTEvent e)
           
protected  String dialogTitle()
           
protected  void init(ImagePlus imp)
           
protected  void process(int i)
           
static void run(ImageProcessor ip, int brx, int bry, float stds, boolean cent, boolean stret)
          Apply local contrast enhancement to and ImageProcessor.
 int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
           
 
Methods inherited from class mpicbg.ij.plugin.AbstractBlockFilter
run, setNPasses, setup, toByte, toRGB, toShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

standardDeviations

protected static double standardDeviations

stds

protected double stds

center

protected static boolean center

cent

protected boolean cent

stretch

protected static boolean stretch

stret

protected boolean stret

nlcs

protected NormalizeLocalContrast[] nlcs
Constructor Detail

NormalizeLocalContrast

public NormalizeLocalContrast()
Method Detail

dialogTitle

protected String dialogTitle()
Specified by:
dialogTitle in class AbstractBlockFilter

init

protected void init(ImagePlus imp)
Overrides:
init in class AbstractBlockFilter

showDialog

public int showDialog(ImagePlus imp,
                      String command,
                      PlugInFilterRunner pfr)
Specified by:
showDialog in interface ExtendedPlugInFilter
Overrides:
showDialog in class AbstractBlockFilter

dialogItemChanged

public boolean dialogItemChanged(GenericDialog gd,
                                 AWTEvent e)
Specified by:
dialogItemChanged in interface DialogListener
Overrides:
dialogItemChanged in class AbstractBlockFilter

copyParameters

protected void copyParameters()
Specified by:
copyParameters in class AbstractBlockFilter

process

protected void process(int i)
Specified by:
process in class AbstractBlockFilter

run

public static void run(ImageProcessor ip,
                       int brx,
                       int bry,
                       float stds,
                       boolean cent,
                       boolean stret)
Apply local contrast enhancement to and ImageProcessor. The method performs best when you adjust the ImageProcessors min and max range such that a region of interest in the image has optimal contrast and spans the full range.

Parameters:
ip -
brx - block width
bry - block height
stds - in case that the contrast is to be stretched, how many STDs wide should it be
cent - local contrast range at the estimated mean (the original mean is at (max-min)/2), that is mean is mapped to min+(max-min)/2.
stret - stretch contrast such that mean-stds*STD is mapped to min and mean+stds*STD is mapped to max (if cent is true) otherwise only the scaling is performed such that max-min = 2*stds*STD


Copyright © 2007-2016 Fiji. All Rights Reserved.