public class Measure_MTF_Wire
extends java.lang.Object
implements ij.plugin.PlugIn
Constructor and Description |
---|
Measure_MTF_Wire() |
Modifier and Type | Method and Description |
---|---|
static double |
abs(int pos,
double[] array)
Computes the absolute value of the complex number at position pos in the array
|
static double[] |
add(double[] sum,
double toAdd)
Adds a constant to the first array
|
static void |
add(double[] sum,
double[] toAdd)
Adds one array to the first array
|
double[] |
computeComplexFrequencies(double[] fft,
double voxelsize) |
double[] |
computeModelMTF(double[] fft,
double range,
int pixelsize) |
double[] |
computeMTF(double[] pixels,
int padding) |
void |
configure() |
static double[] |
convolve(double[] input,
double[] kernel)
Performs a 1-D convolution of the input array with the kernel array.
New array will be only of size |
static ij.gui.Plot |
createPlot(double[] xValues,
double[] yValues,
java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel) |
static double[] |
divide(double[] array,
double divident)
Divides all entries of array by divident.
|
java.lang.Object |
evaluate() |
static double[] |
fft(double[] array,
int padding) |
static java.util.ArrayList<ij.ImagePlus> |
getAvailableImagePlus() |
static ij.ImagePlus[] |
getAvailableImagePlusAsArray() |
static int |
getNextPowerOfTwo(int value)
Returns the next power of 2 given a certain integer value
Code was partially taken from ij.plugin.FFT.java::pad().
|
double[] |
getPixels(ij.ImagePlus image,
double x1,
double x2,
double y1,
double y2,
double z1,
double z2,
int numberOfQuantizationSteps)
Method to perform trilinear interpolation along a line through an ImagePlus.
|
static double[] |
minAndMaxOfArray(double[] array)
Returns the minimal and the maximal value in a given array
|
static double |
queryDouble(java.lang.String message,
double initialValue)
Queries the User for a Double values using Swing.
|
static int |
queryInt(java.lang.String message,
int initialValue)
Queries the User for an Integer value using Swing.
|
void |
run(java.lang.String arg) |
java.lang.String |
toString() |
double |
trilinear(ij.ImagePlus data3D,
double x,
double y,
double z)
Trilinear Interpolation in an ImagePlus.
Adopted from Volume Viewer by Kai Uwe Barthel: barthel (at) fhtw-berlin.de This method is initialized in the first call with the volume dimensions to save computation time. If this interpolation method is used from somewhere else, please use this method only on volumes of the same dimension. |
public static java.util.ArrayList<ij.ImagePlus> getAvailableImagePlus()
public static ij.ImagePlus[] getAvailableImagePlusAsArray()
public java.lang.String toString()
toString
in class java.lang.Object
public void run(java.lang.String arg)
run
in interface ij.plugin.PlugIn
public double[] getPixels(ij.ImagePlus image, double x1, double x2, double y1, double y2, double z1, double z2, int numberOfQuantizationSteps)
image
- the ImagePlusx1
- start xx2
- end xy1
- start yy2
- end yz1
- start zz2
- end znumberOfQuantizationSteps
- public double trilinear(ij.ImagePlus data3D, double x, double y, double z)
data3D
- the ImagePlusx
- the x coordinatey
- the y coordinatez
- the z coordinatepublic static double[] minAndMaxOfArray(double[] array)
array
- the arraypublic static double[] add(double[] sum, double toAdd)
sum
- the first arraytoAdd
- the constant to addpublic static double[] convolve(double[] input, double[] kernel)
output.lenght = input.length - (2 * (kernel.length/2));(Note that integer arithmetic is used here)
input
- the array to be convolvedkernel
- the kernelpublic static int getNextPowerOfTwo(int value)
value
- the input number.public static double[] fft(double[] array, int padding)
public double[] computeMTF(double[] pixels, int padding)
public static void add(double[] sum, double[] toAdd)
sum
- the first arraytoAdd
- the array to addpublic static double[] divide(double[] array, double divident)
array
- the arraydivident
- the number used for division.public double[] computeComplexFrequencies(double[] fft, double voxelsize)
public static double abs(int pos, double[] array)
pos
- the positionarray
- the array which contains the valuespublic double[] computeModelMTF(double[] fft, double range, int pixelsize)
public static ij.gui.Plot createPlot(double[] xValues, double[] yValues, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel)
public java.lang.Object evaluate()
public static int queryInt(java.lang.String message, int initialValue) throws java.lang.Exception
message
- initialValue
- java.lang.Exception
public static double queryDouble(java.lang.String message, double initialValue) throws java.lang.Exception
message
- initialValue
- java.lang.Exception
public void configure() throws java.lang.Exception
java.lang.Exception