public final class MatlabUtil extends Object
Modifier and Type | Method and Description |
---|---|
static FlatField |
evaluate(String func,
FlatField field,
double[] params,
RealType[] rangeTypes)
Evaluates the given MATLAB function for the specified field, passing the
given extra parameters to the function.
|
static Object |
exec(String func,
FlatField field,
double[] params)
Executes the given MATLAB function, with the specified field and parameters
as arguments.
|
static int[] |
getDimensions(String func,
int y,
int x,
int n,
double[] params)
Gets output pixel dimensions for the given input dimensions and parameter
values.
|
static double[][][] |
getImagePixels(FlatField field)
Gets pixel values from the given field, converting the result to a 3D array
of double-precision floating point values.
|
static String |
getMatlabVersion()
Gets the version of MATLAB available, or null if none.
|
static FunctionParam[] |
getParameters(String func)
Gets the list of parameters for the given MATLAB function.
|
static double[] |
prepend(int y,
int x,
int n,
double[] params)
Prepends the given dimensions to the specified parameter list.
|
static double[][] |
raster1Dto2D(double[] d,
int lenx,
int leny)
Converts a double[n*x*y] into a double[n][y*x].
|
static double[][][] |
raster2Dto3D(double[][] d,
int lenx,
int leny)
Converts a double[n][y*x] into a double[y][x][n].
|
static double[][] |
raster3Dto2D(double[][][] d)
Converts a double[y][x][n] into a double[n][y*x].
|
public static String getMatlabVersion()
public static FlatField evaluate(String func, FlatField field, double[] params, RealType[] rangeTypes)
public static FunctionParam[] getParameters(String func)
public static int[] getDimensions(String func, int y, int x, int n, double[] params)
public static Object exec(String func, FlatField field, double[] params)
public static double[][][] getImagePixels(FlatField field)
public static double[][][] raster2Dto3D(double[][] d, int lenx, int leny)
public static double[][] raster3Dto2D(double[][][] d)
public static double[][] raster1Dto2D(double[] d, int lenx, int leny)
public static double[] prepend(int y, int x, int n, double[] params)
Copyright © 2015–2022 SciJava. All rights reserved.