org.shapelogic.imageprocessing
Class ColorReplacerSL

java.lang.Object
  extended by org.shapelogic.imageutil.PlugInFilterAdapter
      extended by org.shapelogic.imageprocessing.ColorReplacerSL
All Implemented Interfaces:
ij.gui.DialogListener, ij.plugin.filter.ExtendedPlugInFilter, ij.plugin.filter.PlugInFilter

public class ColorReplacerSL
extends PlugInFilterAdapter
implements ij.plugin.filter.ExtendedPlugInFilter, ij.gui.DialogListener

ColorReplacer replaces one color with another.
XXX: This class could be one generic class that could handle all PixelHanlers. It need an input parameter definition that is using reflection.
For comparison with ColorReplacer.java, this is a little longer but it is more general and pretty straightforward.

Author:
Sami Badawi

Field Summary
protected  ij.gui.GenericDialog _gd
           
protected  ColorReplacePixelHandler _handler
           
protected  ij.plugin.filter.PlugInFilterRunner _pfr
           
protected  PixelHandler _pixelHandler
           
 
Fields inherited from class org.shapelogic.imageutil.PlugInFilterAdapter
_imageOperation
 
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, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
 
Constructor Summary
ColorReplacerSL()
           
 
Method Summary
 boolean dialogItemChanged(ij.gui.GenericDialog gd, java.awt.AWTEvent e)
           
 void setNPasses(int arg0)
           
 int showDialog(ij.ImagePlus imp, java.lang.String command, ij.plugin.filter.PlugInFilterRunner pfr)
           
 
Methods inherited from class org.shapelogic.imageutil.PlugInFilterAdapter
getImageOperation, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ij.plugin.filter.PlugInFilter
run, setup
 

Field Detail

_gd

protected ij.gui.GenericDialog _gd

_pfr

protected ij.plugin.filter.PlugInFilterRunner _pfr

_pixelHandler

protected PixelHandler _pixelHandler

_handler

protected ColorReplacePixelHandler _handler
Constructor Detail

ColorReplacerSL

public ColorReplacerSL()
Method Detail

showDialog

public int showDialog(ij.ImagePlus imp,
                      java.lang.String command,
                      ij.plugin.filter.PlugInFilterRunner pfr)
Specified by:
showDialog in interface ij.plugin.filter.ExtendedPlugInFilter

setNPasses

public void setNPasses(int arg0)
Specified by:
setNPasses in interface ij.plugin.filter.ExtendedPlugInFilter

dialogItemChanged

public boolean dialogItemChanged(ij.gui.GenericDialog gd,
                                 java.awt.AWTEvent e)
Specified by:
dialogItemChanged in interface ij.gui.DialogListener


Copyright © 2009. All Rights Reserved.