public class OpenCLForwardProjector extends java.lang.Object implements GUIConfigurable, Citeable
Constructor and Description |
---|
OpenCLForwardProjector() |
Modifier and Type | Method and Description |
---|---|
void |
computeCanonicalProjectionMatrix(float[] canonicalProjMatrix,
float[] invARmatrix,
float[] srcPoint,
Jama.Matrix projectionMatrix)
Method: computeCanonicalProjectionMatrix
Author: Sungwon Yoon Description: |
void |
configure()
Start GUI configuration.
|
java.lang.String |
getBibtexCitation()
Returns a reference to literature describing this algorithm in Bibtex format
|
java.lang.String |
getMedlineCitation()
Returns a reference to literature describing this algorithm in Medline
|
com.jogamp.opencl.CLProgram |
getOpenCLForwardProjectorInstance()
Get the current OpenCL program instance
|
ij.ImagePlus |
getTex3D()
Gets the volume to project
|
boolean |
isConfigured()
returns whether the projector was already configured or not.
|
static void |
main(java.lang.String[] args)
Main method checks different computation methods and compares to a reference implementation.
|
ij.ImagePlus |
project()
Starts projection and returns Projection Data, as ImagePlus
|
ij.process.ImageProcessor |
project(int projectionNumber)
loads the actual OpenCL kernel and performs the projection
|
void |
setTex3D(ij.ImagePlus tex3d)
Sets the volume to project
|
public ij.ImagePlus getTex3D()
public void setTex3D(ij.ImagePlus tex3d)
tex3d
- public void computeCanonicalProjectionMatrix(float[] canonicalProjMatrix, float[] invARmatrix, float[] srcPoint, Jama.Matrix projectionMatrix)
W -> W projection matrix = [ AR t ] C -> C projection matrix = T0 * [AR t] * T4 [ [ du(0) dv(0) ]^-1 -0.5 ] where T0 = [ [ du(1) dv(1) ] -0.5 ] [ 0 0 1 ] , [ dx 0 0 -(L-1)/2*dx ] T4 = [ 0 dy 0 -(M-1)/2*dy ] [ 0 0 dz -(N-1)/2*dz ] [ 0 0 0 1 ]C -> C projection matrix can be written as
C -> C projection matrix = [ T0 * AR * T4(1:3,1:3) T0 * (AR * T4(1:3,4) + t) ] Therefore, the new invARmatrix = T4(1:3,1:3)^-1 * (AR)^-1 * T0^-1 [ 1/dx 0 0 ] [du(0) dv(0) 0] = [ 0 1/dy 0 ] * (AR)^-1 * [du(1) dv(1) 0] [ 0 0 1/dz ] [ 0 0 1] and the new srcPoint = -T4(1:3,1:3)^-1 * T4(1:3,4) - T4(1:3,1:3)^-1 * (AR)^-1 * t [[ -0.5 * (L-1) ] [ 1/dx 0 0 ] ] = - [[ -0.5 * (M-1) ] + [ 0 1/dy 0 ] * srcPoint^{W} ] [[ -0.5 * (N-1) ] [ 0 0 1/dz ] ]
canonicalProjMatrix
- is filled with a 3x4 projection matrix in this canonical formatinvARmatrix
- is filled with the inverse of AR in canonical formatsrcPoint
- is filled with the 3x1 source point in canonical formatprojectionMatrix
- the Matrix on which the conversion is based.public com.jogamp.opencl.CLProgram getOpenCLForwardProjectorInstance()
public static void main(java.lang.String[] args)
args
- public ij.process.ImageProcessor project(int projectionNumber)
projectionNumber
- the projection number.public ij.ImagePlus project()
public void configure() throws java.lang.Exception
configure
in interface GUIConfigurable
java.lang.Exception
- may happenpublic boolean isConfigured()
isConfigured
in interface GUIConfigurable
public java.lang.String getBibtexCitation()
getBibtexCitation
in interface Citeable
public java.lang.String getMedlineCitation()
getMedlineCitation
in interface Citeable