- All Known Subinterfaces:
ExtendedPlugInFilter
- All Known Implementing Classes:
Analyzer
,AVI_Writer
,BackgroundSubtracter
,Benchmark
,Binary
,Calibrator
,Convolver
,Duplicater
,EDM
,FFTCustomFilter
,FFTFilter
,Filler
,Filters
,FractalBoxCounter
,GaussianBlur
,ImageMath
,ImageProperties
,Info
,LineGraphAnalyzer
,LutApplier
,LutViewer
,MaximumFinder
,ParticleAnalyzer
,Printer
,RankFilters
,RGBStackSplitter
,RoiWriter
,Rotator
,SaltAndPepper
,ScaleDialog
,Shadows
,StackLabeler
,ThresholdToSelection
,Transformer
,Translator
,UnsharpMask
,Writer
,XYWriter
public interface PlugInFilter
ImageJ plugins that process an image should implement this interface.
For filters that have a dialog asking for options or parameters as well
as for filters that have a progress bar and process stacks the
ExtendedPlugInFilter interface is recommended.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Set this flag to have the ImageProcessor that is passed to the run() method converted to a FloatProcessor.static final int
Set this flag if the filter handles 16-bit images.static final int
Set this flag if the filter handles float images.static final int
Set this flag if the filter handles 8-bit indexed color images.static final int
Set this flag if the filter handles 8-bit grayscale images.static final int
Set this flag if the filter handles all types of images.static final int
Set this flag if the filter handles RGB images.static final int
Set this flag if the filter wants its run() method to be called for all the slices in a stack.static final int
Set this flag if the filter does not want its run method called.static final int
Set this flag if the setup method of the filter should be called again after the calls to the run(ip) have finished.static final int
Set this flag to keep the invisible binary threshold from being reset.static final int
Set this flag if the filter makes no changes to the pixel data and does not require undo.static final int
Set this flag if the filter does not require that an image be open.static final int
Set this flag if the filter does not require undo.static final int
Set this flag to prevent Undo from being reset when processing a stack.static final int
Set this flag if images may be processed in parallel threads.static final int
Set this flag if the slices of a stack may be processed in parallel threadsstatic final int
Set this flag if the filter requires an ROI.static final int
Set this flag if the filter requires a snapshot (copy of the pixels array).static final int
Set this flag if the filter requires a stack.static final int
Set this flag if the filter wants ImageJ, for non-rectangular ROIs, to restore that part of the image that's inside the bounding rectangle but outside of the ROI. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(ImageProcessor ip) Filters use this method to process the image.int
This method is called once when the filter is loaded.
-
Field Details
-
DOES_8G
static final int DOES_8GSet this flag if the filter handles 8-bit grayscale images.- See Also:
-
DOES_8C
static final int DOES_8CSet this flag if the filter handles 8-bit indexed color images.- See Also:
-
DOES_16
static final int DOES_16Set this flag if the filter handles 16-bit images.- See Also:
-
DOES_32
static final int DOES_32Set this flag if the filter handles float images.- See Also:
-
DOES_RGB
static final int DOES_RGBSet this flag if the filter handles RGB images.- See Also:
-
DOES_ALL
static final int DOES_ALLSet this flag if the filter handles all types of images.- See Also:
-
DOES_STACKS
static final int DOES_STACKSSet this flag if the filter wants its run() method to be called for all the slices in a stack.- See Also:
-
SUPPORTS_MASKING
static final int SUPPORTS_MASKINGSet this flag if the filter wants ImageJ, for non-rectangular ROIs, to restore that part of the image that's inside the bounding rectangle but outside of the ROI.- See Also:
-
NO_CHANGES
static final int NO_CHANGESSet this flag if the filter makes no changes to the pixel data and does not require undo.- See Also:
-
NO_UNDO
static final int NO_UNDOSet this flag if the filter does not require undo.- See Also:
-
NO_IMAGE_REQUIRED
static final int NO_IMAGE_REQUIREDSet this flag if the filter does not require that an image be open.- See Also:
-
ROI_REQUIRED
static final int ROI_REQUIREDSet this flag if the filter requires an ROI.- See Also:
-
STACK_REQUIRED
static final int STACK_REQUIREDSet this flag if the filter requires a stack.- See Also:
-
DONE
static final int DONESet this flag if the filter does not want its run method called.- See Also:
-
CONVERT_TO_FLOAT
static final int CONVERT_TO_FLOATSet this flag to have the ImageProcessor that is passed to the run() method converted to a FloatProcessor. With RGB images, the run() method is called three times, once for each channel.- See Also:
-
SNAPSHOT
static final int SNAPSHOTSet this flag if the filter requires a snapshot (copy of the pixels array).- See Also:
-
PARALLELIZE_STACKS
static final int PARALLELIZE_STACKSSet this flag if the slices of a stack may be processed in parallel threads- See Also:
-
FINAL_PROCESSING
static final int FINAL_PROCESSINGSet this flag if the setup method of the filter should be called again after the calls to the run(ip) have finished. The argumentarg
of setup will be "final" in that case.- See Also:
-
KEEP_THRESHOLD
static final int KEEP_THRESHOLDSet this flag to keep the invisible binary threshold from being reset.- See Also:
-
PARALLELIZE_IMAGES
static final int PARALLELIZE_IMAGESSet this flag if images may be processed in parallel threads. Overrides PARALLELIZE_STACKS. The plugin's run() method is called in parallel threads, with the ROI rectangle of the ImageProcessor set according to the area that should be processed. Use the Edit/Options/Memory & Threads command to view or set the thread count.- See Also:
-
NO_UNDO_RESET
static final int NO_UNDO_RESETSet this flag to prevent Undo from being reset when processing a stack.- See Also:
-
-
Method Details
-
setup
This method is called once when the filter is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt or in the plugins.config file of a jar archive containing the plugin. 'imp' is the currently active image. This method should return a flag word that specifies the filters capabilities.For Plugin-filters specifying the
FINAL_PROCESSING
flag, the setup method will be called again, this time with arg = "final" after all other processing is done. -
run
Filters use this method to process the image. If theDOES_STACKS
flag was set, it is called for each slice in a stack. WithCONVERT_TO_FLOAT
, the filter is called with the image data converted to a FloatProcessor (3 times per image for RGB images). ImageJ will lock the image before calling this method and unlock it when the filter is finished. For PlugInFilters specifying theNO_IMAGE_REQUIRED
flag and not theDONE
flag, run(ip) is called once with the argumentnull
. Use ip.getSliceNumber() to get the stack position (1-n).
-