public final class PlotTools extends Object
| Modifier and Type | Field and Description |
|---|---|
private static PointFinderPlotFrame |
currPeakPlot |
private static Vector<Double> |
currPlotDataX
The current plot data (X-axis).
|
private static Vector<Double> |
currPlotDataY
The current plot data (Y-axis).
|
private static String |
currPlotTitle
The title for the plot to be displayed.
|
private static String |
currPlotTitleX
The title for the X-axis of the plot to be displayed.
|
private static String |
currPlotTitleY
The title for the Y-axis of the plot to be displayed.
|
private static RegressionPlotFrame |
currRegPlot
The current
IqmRegressionPlot. |
| Constructor and Description |
|---|
PlotTools() |
| Modifier and Type | Method and Description |
|---|---|
static org.jfree.data.xy.XYDataset |
createHistogramDataset(javax.media.jai.Histogram histo)
Creates an
XYDataset, consisting of the histogram. |
static org.jfree.data.xy.XYDataset |
createHistogramDataset(List<PlotModel> plotModels)
Creates an
XYDataset, consisting of the histogram. |
static void |
deleteExistingPlot()
This method deletes an exisitng plot
|
static void |
displayPlotXY(Vector<Double> dataY,
boolean isLineVisible,
String plotTitle,
String xTitle,
String yTitle)
This method plots XY Values in an separate window without the x data
|
static void |
displayPlotXY(Vector<Double> dataX,
Vector<Double> dataY,
boolean isLineVisible,
String plotTitle,
String xTitle,
String yTitle)
This method plots XY Values in an separate window
|
static void |
displayPointFinderPlotXY(double[] x,
double[] y,
double[] x2,
double[] y2,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle)
2017-07 This method plots XY Values in a separate window by Adam Dolgos
for displaying additional plus signs defined in a second vector
|
static void |
displayPointFinderPlotXY(Vector<Double> dataX,
Vector<Double> dataY,
Vector<Double> dataX2,
Vector<Double> dataY2,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle)
2017-07 This method plots XY Values in a separate window by Adam Dolgos
for displaying additional plus signs defined in a second vector
|
static void |
displayRegressionPlotXY(double[] x,
double[] y,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle,
int regStart,
int regEnd,
boolean deleteExistingPlot)
This method converts double array data to vector data and calls the
display routine
|
static void |
displayRegressionPlotXY(Vector<Double> dataX,
Vector<Double>[] dataY,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle,
int regStart,
int regEnd,
boolean deleteExistingPlot)
This method plots several XY Values in an separate window
|
static void |
displayRegressionPlotXY(Vector<Double> dataX,
Vector<Double> dataY,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle,
int regStart,
int regEnd,
boolean deleteExistingPlot)
This method plots XY Values in an separate window
|
private static PointFinderPlotFrame |
getCurrPeakFinderPlot() |
static Vector<Double> |
getCurrPlotDataX()
This method gets current plot data
|
static Vector<Double> |
getCurrPlotDataY()
This method gets current plot data
|
static String |
getCurrPlotTitle()
This method gets current plot data
|
static String |
getCurrPlotTitleX()
This method gets current plot data
|
static String |
getCurrPlotTitleY()
This method gets current plot data
|
private static RegressionPlotFrame |
getCurrRegPlot() |
static javax.media.jai.Histogram |
getHistogram(javax.media.jai.PlanarImage pi)
This method creates the histogram of a given image and returns the
reference to the
Histogram object. |
static javax.media.jai.Histogram |
getHistogram(RenderedImage image)
This method creates the histogram of a given image and returns the
reference to the
Histogram object. |
static List<PlotModel> |
getIntensityProfile(Raster r,
int direction,
int index)
Extracts the intensity profile of a given row or column index.
|
static double[] |
getLinearRegression(Vector<Double> dataX,
Vector<Double> dataY,
int regStart,
int regEnd)
this method calculates the linear Regression parameters Y = p[0] + p[1].X
|
static double[] |
getMaxLikeliHoodEstimate(Vector<Double> dataX,
Vector<Double> dataY,
int regStart,
int regEnd)
This method calculates the Maximum Likelihood Estimation instead of a
linear regression.
|
static void |
projectImage(javax.media.jai.PlanarImage pi,
int direction)
Project a given image to a selected direction of the Cartesian coordinate
system.
|
private static void |
setCurrPeakFinderPlot(PointFinderPlotFrame pl) |
static void |
setCurrPlotXYData(Vector<Double> dataX,
Vector<Double> dataY,
String plotTitle,
String titleX,
String titleY)
This method sets the current plot data
|
private static void |
setCurrRegPlot(RegressionPlotFrame pl) |
static javax.media.jai.Histogram |
showHistogram(javax.media.jai.PlanarImage pi)
This method plots the histogram in a new
HistogramPlotFrame and
returns the reference to the Histogram object. |
static javax.media.jai.PlanarImage |
toPlanarImage(List<PlotModel> plotModels)
|
static javax.media.jai.PlanarImage |
toPlanarImage(PlotModel plotModel,
boolean showAxes)
This method creates a
PlanarImage from a single PlotModel
. |
static List<PlotModel> |
toPlotModel(org.jfree.data.xy.XYDataset dataSet)
Creates a list of
PlotModels out of an XYDataset. |
static List<PlotModel> |
toPlotModels(DefaultTableModel tableModel,
int direction)
Creates a list of
PlotModels out of a DefaultTableModel. |
private static PointFinderPlotFrame currPeakPlot
private static RegressionPlotFrame currRegPlot
IqmRegressionPlot. Default is 'null'.private static Vector<Double> currPlotDataX
private static Vector<Double> currPlotDataY
private static String currPlotTitle
private static String currPlotTitleX
private static String currPlotTitleY
public static void deleteExistingPlot()
public static void displayRegressionPlotXY(double[] x,
double[] y,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle,
int regStart,
int regEnd,
boolean deleteExistingPlot)
public static void displayRegressionPlotXY(Vector<Double> dataX, Vector<Double> dataY, boolean isLineVisible, String frameTitle, String plotTitle, String xTitle, String yTitle, int regStart, int regEnd, boolean deleteExistingPlot)
public static void displayPointFinderPlotXY(Vector<Double> dataX, Vector<Double> dataY, Vector<Double> dataX2, Vector<Double> dataY2, boolean isLineVisible, String frameTitle, String plotTitle, String xTitle, String yTitle)
public static void displayPointFinderPlotXY(double[] x,
double[] y,
double[] x2,
double[] y2,
boolean isLineVisible,
String frameTitle,
String plotTitle,
String xTitle,
String yTitle)
public static void displayRegressionPlotXY(Vector<Double> dataX, Vector<Double>[] dataY, boolean isLineVisible, String frameTitle, String plotTitle, String xTitle, String yTitle, int regStart, int regEnd, boolean deleteExistingPlot)
public static double[] getLinearRegression(Vector<Double> dataX, Vector<Double> dataY, int regStart, int regEnd)
public static double[] getMaxLikeliHoodEstimate(Vector<Double> dataX, Vector<Double> dataY, int regStart, int regEnd)
public static void displayPlotXY(Vector<Double> dataY, boolean isLineVisible, String plotTitle, String xTitle, String yTitle)
public static void displayPlotXY(Vector<Double> dataX, Vector<Double> dataY, boolean isLineVisible, String plotTitle, String xTitle, String yTitle)
public static void setCurrPlotXYData(Vector<Double> dataX, Vector<Double> dataY, String plotTitle, String titleX, String titleY)
dataX - dataY - plotTitle - titleX - titleY - public static Vector<Double> getCurrPlotDataX()
public static Vector<Double> getCurrPlotDataY()
public static String getCurrPlotTitle()
public static String getCurrPlotTitleX()
public static String getCurrPlotTitleY()
public static javax.media.jai.Histogram showHistogram(javax.media.jai.PlanarImage pi)
HistogramPlotFrame and
returns the reference to the Histogram object.pi - the image to create the histogram frompublic static org.jfree.data.xy.XYDataset createHistogramDataset(javax.media.jai.Histogram histo)
XYDataset, consisting of the histogram.public static org.jfree.data.xy.XYDataset createHistogramDataset(List<PlotModel> plotModels)
XYDataset, consisting of the histogram.public static javax.media.jai.Histogram getHistogram(RenderedImage image)
Histogram object.image - the image to create the histogram fromHistogramgetHistogram(PlanarImage)public static javax.media.jai.Histogram getHistogram(javax.media.jai.PlanarImage pi)
Histogram object.pi - the image to create the histogram fromHistogramprivate static void setCurrRegPlot(RegressionPlotFrame pl)
private static RegressionPlotFrame getCurrRegPlot()
private static void setCurrPeakFinderPlot(PointFinderPlotFrame pl)
private static PointFinderPlotFrame getCurrPeakFinderPlot()
public static javax.media.jai.PlanarImage toPlanarImage(List<PlotModel> plotModels) throws Exception
PlanarImage from a List of
PlotModels. This list of PlotModels are separate
data series in a JFreeChart.
The standard dimension for the generated image are 150x100
px.
plotModels - the list of 1...n plot modelsnull if
the parameter is null, or the list is emptyException - if any error occurs in the conversionpublic static javax.media.jai.PlanarImage toPlanarImage(PlotModel plotModel, boolean showAxes) throws Exception
PlanarImage from a single PlotModel
.
The standard dimension for the generated image are 150x100
px.
public static void projectImage(javax.media.jai.PlanarImage pi,
int direction)
pi - direction - must not be null, must, either be 0 (x-axis) or 1
(y-axis), see also IQMConstantspublic static List<PlotModel> toPlotModel(org.jfree.data.xy.XYDataset dataSet)
PlotModels out of an XYDataset.
The series count of the XYDataSet determines the number of
list elements, such as the list may just contain a single element.
dataSet - the data setList of PlotModels of the data set that is
displayable in the IPlotPanelIllegalArgumentException - if the data set is null or does not contain any
data seriespublic static List<PlotModel> toPlotModels(DefaultTableModel tableModel, int direction)
PlotModels out of a DefaultTableModel.tableModel - the DefaultTableModeldirection - an integer indicating whether the rows (vertical) or columns
(horizontal) contain the values of a single signal, see also
IQMConstantsIPlotPanelIllegalArgumentException - if the table model is null or does not contain
any elementsCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.