|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bijnum.BIJutil
Utilities to link BIJ things to ImageJ. Copyright (c) 1999-2004, Michael Abramoff. All rights reserved.
Constructor Summary | |
BIJutil()
|
Method Summary | |
static float[] |
center(float[] image0,
int width0,
float[] image1,
int width1,
float scaling)
Center a scaled image1 into the center of a larger image0. |
static float[] |
crop(float[] image,
int width,
int height,
int x,
int y,
int newwidth,
int newheight)
Crop a float image to the rectangular size of a ROI defined by x,y,newwidth,newheight |
static byte[] |
fit(byte[] image,
int width)
Fit a byte image into a new power of 2 size image of newwidth * newwidth. |
static float[] |
fit(float[] image,
int width)
Fit a float image into a new power of 2 size image of newwidth * newwidth. |
static float[] |
fit(float[] spectrum,
int width,
int height)
Fit a square image into a smaller image widthxheight, with the center in the center of the new image. |
protected static float[] |
getFloatPixels(java.lang.Object array)
Convert the pixels in array into a float vector. |
static float[] |
getMask(ij.gui.Roi roi,
int width,
int height)
Make a mask within an image widthxheight for Roi. |
static int |
getMatrixWidth(ij.ImagePlus imp)
Compute the width of the images in imp, or the ROI if one has been selected. |
static int |
getMatrixWidth(ij.ImagePlus imp,
double scaleFactor)
Compute the width of the images in imp, containing a stack, including scaling. |
static ij.ImageStack |
imageStackFromMatrix(float[][] a,
int width)
Create an ImageJ ImageStack out of a float matrix. |
static ij.ImageStack |
imageStackFromMatrix(short[][] a,
int width)
Create an ImageJ ImageStack out of a float matrix. |
static float[][] |
matrixFromImageStack(ij.ImagePlus imp)
Convert the data in the ImageStack in imp into a float[][] matrix for further processing. |
static float[][] |
matrixFromImageStack(ij.ImagePlus imp,
double scaleFactor)
Convert the data in the ImageStack in imp into a float[][] matrix and scale by scaleFactor on the fly. |
static float[][] |
matrixFromImageStackRoi(ij.ImagePlus imp)
Convert the data only within the rectangular Roi in the ImageStack in imp into a float[][] matrix for further processing. |
static float[] |
montage(float[][] a,
int awidth,
int columns)
Make a montage of all images in a, with columns images per row, so that the width of the returned image will be awidth*columns. |
static boolean |
saveAsText(float[] v,
java.lang.String path)
Save vector v as a text file. |
static short[][] |
shortMatrixFromImageStack(ij.ImagePlus imp)
Convert the data in the ImageStack in imp into a short [][] matrix for further processing. |
static float[] |
tile(float[] image,
int width)
Fit an image into a new image of newwidth * newwidth, where newwidth is next large power of 2 than width. |
static java.lang.String |
toString(double[] m)
|
static java.lang.String |
toString(double[][] m)
|
static java.lang.String |
toString(float[] m)
|
static java.lang.String |
toString(float[][] m)
|
static float[] |
vectorFromImageStack(ij.ImagePlus imp,
int i)
Convert the data in the ImagePlus image stack into a float[] vector for further processing. |
static float[] |
vectorFromImageStack(ij.ImagePlus imp,
int i,
float scaleFactor)
Convert the data in the ImageStack in imp into a float[][] matrix and scale by scaleFactor on the fly. |
static float[] |
vectorFromImageStackRoi(ij.ImagePlus imp)
Convert the data in the i'th ImagePlus image into a float[] vector for further processing. |
static float[] |
vectorFromImageStackRoi(ij.ImagePlus imp,
int i)
Convert the data in the i'th ImagePlus image into a float[] vector for further processing. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public BIJutil()
Method Detail |
public static ij.ImageStack imageStackFromMatrix(float[][] a, int width)
a
- a float[][] matrix with the images as column vectors.width
- the width of each image in pixels.public static ij.ImageStack imageStackFromMatrix(short[][] a, int width)
a
- a float[][] matrix with the images as column vectors.width
- the width of each image in pixels.public static int getMatrixWidth(ij.ImagePlus imp)
public static int getMatrixWidth(ij.ImagePlus imp, double scaleFactor)
scaleFactor
- the scaling factor.public static float[][] matrixFromImageStack(ij.ImagePlus imp)
public static float[] vectorFromImageStack(ij.ImagePlus imp, int i)
imp
- the imageplus containing the stack.i
- the image number in the stack, starting with 0.public static float[] vectorFromImageStack(ij.ImagePlus imp, int i, float scaleFactor)
imp
- the imageplus containing the stack.i
- the image number in the stack, starting with 0.scaleFactor
- the scaling factor.public static float[] vectorFromImageStackRoi(ij.ImagePlus imp)
public static float[] vectorFromImageStackRoi(ij.ImagePlus imp, int i)
public static float[] crop(float[] image, int width, int height, int x, int y, int newwidth, int newheight)
image
- a float[] vector imagewidth
- the width in pixels of imageheight
- the width in pixels of imagex,
- y, newwidth, newheight the ROIprotected static float[] getFloatPixels(java.lang.Object array)
public static float[][] matrixFromImageStack(ij.ImagePlus imp, double scaleFactor)
imp
- an ImagePlusscaleFactor
- the scalefactor between 100-0.01.public static float[][] matrixFromImageStackRoi(ij.ImagePlus imp)
public static short[][] shortMatrixFromImageStack(ij.ImagePlus imp)
public static float[] montage(float[][] a, int awidth, int columns)
a
- a float[][] with the images.awidth,
- the width of each image in pixels.columns
- the number of columns desired.public static float[] tile(float[] image, int width)
image
- a float[] with the imagewidth
- the width of image.public static float[] fit(float[] image, int width)
image
- a float[] with the imagewidth
- the width of image.public static float[] fit(float[] spectrum, int width, int height)
spectrum
- a square image vector.width
- the width in pixels of the new image.height
- the height of the new image.public static byte[] fit(byte[] image, int width)
image
- a byte[] with the imagewidth
- the width of image.public static float[] getMask(ij.gui.Roi roi, int width, int height)
roi
- the roi.width
- the width of the mask.height
- the height of the mask.public static float[] center(float[] image0, int width0, float[] image1, int width1, float scaling)
image0
- the base imagewidth0
- the width in pixels of the base imageimage1
- the image to be insertedwidth1
- the width in pixels of the new imagescaling
- the amount by which image1 will be scaled.public static boolean saveAsText(float[] v, java.lang.String path)
v
- the float[] vectorpath
- a String with the path to save the vector to.public static java.lang.String toString(float[][] m)
public static java.lang.String toString(double[][] m)
public static java.lang.String toString(float[] m)
public static java.lang.String toString(double[] m)
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |