# Deprecated API

## Contents

- Classes
- Fields
- Methods
- Constructors

Deprecated Classes
Class
Description
ij.plugin.filter.Duplicater
replaced by ij.plugin.Duplicator class
ij.plugin.filter.Info
replaced by ij.plugin.ImageInfo
ij.plugin.filter.Writer

Deprecated Fields
Field
Description
ij.gui.Plot.BOTTOM_MARGIN
Not a fixed value any more, use getDrawingFrame() to get the drawing area
ij.gui.Plot.LEFT_MARGIN
Not a fixed value any more, use getDrawingFrame() to get the drawing area
ij.gui.Plot.RIGHT_MARGIN
Not a fixed value any more, use getDrawingFrame() to get the drawing area
ij.gui.Plot.TOP_MARGIN
Not a fixed value any more, use getDrawingFrame() to get the drawing area
ij.gui.PlotWindow.BOX
ij.gui.PlotWindow.CIRCLE
ij.gui.PlotWindow.CROSS
ij.gui.PlotWindow.LINE
ij.gui.PlotWindow.TRIANGLE
ij.gui.PlotWindow.X
ij.IJ.URL
ij.measure.CurveFitter.IterFactor
now in the Minimizer class (since ImageJ 1.46f). (probably of not much value for anyone anyhow?)

Deprecated Methods
Method
Description
ij.gui.ImageCanvas.getDisplayList()
replaced by ImagePlus.getOverlay()
ij.gui.ImageCanvas.setDisplayList(Roi, Color)
replaced by ImagePlus.setOverlay(Roi, Color, int, Color)
ij.gui.ImageCanvas.setDisplayList(Shape, Color, BasicStroke)
replaced by ImagePlus.setOverlay(Shape, Color, BasicStroke)
ij.gui.ImageCanvas.setDisplayList(Vector)
replaced by ImagePlus.setOverlay(ij.gui.Overlay)
ij.gui.NewImage.createUnsignedShortImage(String, int, int, int, int)
Short images are always unsigned.
ij.gui.Plot.drawArrow(int, int, int, int, double)
Use as a public method is not supported any more because it is incompatible with rescaling
ij.gui.PlotWindow.addErrorBars(float[])
use the corresponding method of the Plot class
ij.gui.PlotWindow.addLabel(double, double, String)
use the corresponding method of the Plot class
ij.gui.PlotWindow.addPoints(double[], double[], int)
use the corresponding method of the Plot class
ij.gui.PlotWindow.addPoints(float[], float[], int)
use the corresponding method of the Plot class
ij.gui.PlotWindow.changeFont(Font)
use the corresponding method of the Plot class
ij.gui.PlotWindow.setColor(Color)
use the corresponding method of the Plot class
ij.gui.PlotWindow.setLimits(double, double, double, double)
use the corresponding method of the Plot class
ij.gui.PlotWindow.setLineWidth(int)
use the corresponding method of the Plot class
ij.gui.PointRoi.getDefaultMarkerSize()
ij.gui.PointRoi.setDefaultMarkerSize(String)
ij.gui.PointRoi.setHideLabels(boolean)
ij.gui.Roi.convertToPolygon()
ij.gui.Roi.drawPixels()
replaced by drawPixels(ImageProcessor)
ij.gui.Roi.getBoundingRect()
replaced by getBounds()
ij.gui.Roi.getDrawOffset()
Drawoffset is not used any more.
ij.gui.Roi.setDrawOffset(boolean)
This method was previously used to draw lines and polylines shifted by 0.5 pixels top the bottom and right, for better agreement with the position used by ProfilePlot, with the default taken from Prefs.subPixelResolution. Now the shift is independent of this setting and only depends on the ROI type (area or line/point ROI).
ij.gui.Roi.setInstanceColor(Color)
replaced by setStrokeColor()
ij.gui.Roi.setLineWidth(int)
replaced by setStrokeWidth(int)
ij.gui.TextRoi.getFont()
Replaced by getDefaultFontName
ij.gui.TextRoi.getSize()
Replaced by getDefaultFontSize
ij.gui.TextRoi.getStyle()
Replaced by getDefaultFontStyle
ij.gui.TextRoi.setCurrentFont(Font)
Replaced by setFont(font)
ij.gui.Toolbar.getColor()
replaced by getForegroundColor()
ij.gui.Toolbar.setColor(Color)
replaced by setForegroundColor()
ij.IJ.write(String)
replaced by IJ.log(), ResultsTable.setResult() and TextWindow.append(). There are examples at http://imagej.nih.gov/ij/plugins/sine-cosine.html
ij.ImagePlus.isStack()
Replaced by ImagePlus.hasImageStack()
ij.ImageStack.addUnsignedShortSlice(String, Object)
Short images are always unsigned.
ij.measure.ResultsTable.addLabel(String, String)
Replaced by setValue(String,int,String)
ij.measure.ResultsTable.getValue(int, int)
replaced by getValueAsDouble
ij.measure.ResultsTable.setHeading(int, String)
Replaced by addValue(String,double) and setValue(String,int,double)
ij.plugin.filter.Filler.clearOutside(ImageProcessor)
replaced by ImageProcessor.fillOutside(Roi)
ij.plugin.filter.Filler.draw(ImageProcessor)
replaced by ImageProcessor.draw(Roi)
ij.plugin.filter.Filler.fill(ImageProcessor)
replaced by ImageProcessor.fill(Roi)
ij.plugin.filter.GaussianBlur.blur(ImageProcessor, double)
ij.plugin.filter.RankFilters.makeKernel(double)
Not needed any more, use the rank(ip, ...) method, which creates the kernel
ij.plugin.frame.RoiManager.getList()
ij.plugin.frame.RoiManager.getROIs()
ij.plugin.ImageCalculator.calculate(String, ImagePlus, ImagePlus)
replaced by run(String,ImagePlus,ImagePlus)
ij.process.ImageProcessor.drawDot2(int, int)
ij.process.ImageProcessor.hideProgress()
ij.process.ImageProcessor.isKillable()
ij.process.ImageProcessor.translate(int, int, boolean)
replaced by translate(x,y)

Deprecated Constructors
Constructor
Description
ij.gui.Line(int, int, int, int, ImagePlus)
replaced by Line(int, int, int, int)
ij.gui.OvalRoi(int, int, int, int, ImagePlus)
ij.gui.Plot(String, String, String, double[], double[])
ij.gui.Plot(String, String, String, double[], double[], int)
ij.gui.Plot(String, String, String, float[], float[])
ij.gui.Plot(String, String, String, float[], float[], int)
ij.gui.Plot(String, String, String, String, float[], float[])
ij.gui.PlotWindow(String, String, String, double[], double[])
replaced by the Plot class.
ij.gui.PlotWindow(String, String, String, float[], float[])
replaced by the Plot class.
ij.gui.PolygonRoi(int[], int[], int, ImagePlus, int)
ij.gui.Roi(int, int, int, int, ImagePlus)
ij.gui.TextRoi(int, int, String, Font, Color)
ij.process.ShortProcessor(int, int, short[], ColorModel, boolean)
16 bit images are normally unsigned but signed images can be simulated by subtracting 32768 and using a calibration function to restore the original values.