|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--volume.Transformer
This class implements static methods for transforming images and volumes.
for transformation matrix operations.
Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.
Constructor Summary | |
Transformer()
|
Method Summary | |
static float |
bilinear(float[] image,
int width,
float x,
float y)
Bilinearly interpolate the pixel at x,y. |
static float |
bilinearExtend(float[] image,
int width,
int height,
float x,
float y)
Interpolate the pixel at x,y in image, extend if x,y not in image . |
static float[][] |
convertParametersIntoTransformationMatrix(double[] p)
Convert a bunch of double transformation parameters into a transformation matrix. |
static float[][] |
convertParametersIntoTransformationMatrix(float[] p)
Convert a bunch of float transformation parameters into a transformation matrix. |
static float[][] |
convertParametersIntoTransformationMatrix(float[] p,
float xcenter,
float ycenter)
Convert a bunch of float transformation parameters into a transformation matrix. |
static float[] |
extract(float[] image,
int width,
int newx,
int newy,
int newwidth,
int newheight)
Extract a new float [] image from an image. |
static float[] |
quick(float[] image,
int width,
int xshift,
int yshift)
Quickly transform an image for whole pixel shifts. |
static float[] |
transform(float[] image,
int width,
float[] p)
Transform image using the transformation parameters in p. |
static float[] |
transform(float[] image,
int width,
float[][] m)
Bilinearly transform an image using a 2-D transformation matrix m. |
static float[] |
transform(float[] image,
int width,
float[] p,
float xcenter,
float ycenter)
Transform image using the transformation parameters in p. |
static ij.process.ImageProcessor |
transform(ij.process.ImageProcessor ip,
float[] p)
Transform the image in fp by translation parameters p |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Transformer()
Method Detail |
public static float[] transform(float[] image, int width, float[] p) throws java.lang.Exception
the
- image to be transformed.width
- the width of the image.p
- a float[] with the transformation parameters:convertParametersIntoTransformationMatrix
public static float[] transform(float[] image, int width, float[] p, float xcenter, float ycenter) throws java.lang.Exception
the
- image to be transformed.width
- the width of the image.p
- a float[] with the transformation parameters:xcenter
- the x center for rotation.ycenter
- the ycenter for rotation.convertParametersIntoTransformationMatrix
public static float[] transform(float[] image, int width, float[][] m) throws java.lang.Exception
image
- a float[] imagewidth
- the width of imagem
- the transformation matrix, a homogenuous matrix.public static float[][] convertParametersIntoTransformationMatrix(float[] p, float xcenter, float ycenter)
p
- the parameters (either first 2, first 3 or 5).
p[0] translation x-dir p[1] translation y-dir p[2] rotation (degrees) p[3] scaling x p[4] scaling y
xcenter,
- ycenter the x and y center for rotation if any.public static float[][] convertParametersIntoTransformationMatrix(float[] p)
p
- the parameters (either first 2, first 3 or 5).
p[0] translation x-dir p[1] translation y-dir p[2] rotation (degrees) p[3] scaling x p[4] scaling y
public static float[][] convertParametersIntoTransformationMatrix(double[] p)
p
- the parameters
p[0] translation x-dir p[1] translation y-dir p[2] rotation (degrees) p[3] scaling x p[4] scaling y
public static float bilinearExtend(float[] image, int width, int height, float x, float y)
x
- y
- image
- public static float bilinear(float[] image, int width, float x, float y)
image
- the image in which to interpolatewidth
- the width of the image.x,y
- the position at which to interpolate.public static ij.process.ImageProcessor transform(ij.process.ImageProcessor ip, float[] p)
fp
- and ImageProcessorp
- the transformation parameters (translation only).
p[0] translation x-dir p[1] translation y-dir
public static float[] quick(float[] image, int width, int xshift, int yshift)
image
- a float[] imagewidth
- the width of imagex
- the x shifty
- the y-shift.public static float[] extract(float[] image, int width, int newx, int newy, int newwidth, int newheight)
image
- the imagewidth
- the original width of the imagenewx
- the x location of the part to be extractednewy
- the y location of the part to be extractednewwidth
- the the width of the part to be extractednewheight
- the the width of the part to be extracted
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |