project3d.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int fwdpj3 (Vec3i volsize, int nrays, int nnz, float *dm, Vec3i origin, int ri, int *ptrs, int *cord, float *x, float *y)
int bckpj3 (Vec3i volsize, int nrays, int nnz, float *dm, Vec3i origin, int ri, int *ptrs, int *cord, float *x, float *y)
int sph2cb (float *sphere, Vec3i volsize, int nrays, int ri, int nnz0, int *ptrs, int *cord, float *cube)
int cb2sph (float *cube, Vec3i volsize, int ri, Vec3i origin, int nnz0, int *ptrs, int *cord, float *sphere)
int getnnz (Vec3i volsize, int ri, Vec3i origin, int *nrays, int *nnz)
int ifix (float a)
int make_proj_mat (float phi, float theta, float psi, float *dm)


Function Documentation

int bckpj3 ( Vec3i  volsize,
int  nrays,
int  nnz,
float *  dm,
Vec3i  origin,
int  ri,
int *  ptrs,
int *  cord,
float *  x,
float *  y 
)

int cb2sph ( float *  cube,
Vec3i  volsize,
int  ri,
Vec3i  origin,
int  nnz0,
int *  ptrs,
int *  cord,
float *  sphere 
)

int fwdpj3 ( Vec3i  volsize,
int  nrays,
int  nnz,
float *  dm,
Vec3i  origin,
int  ri,
int *  ptrs,
int *  cord,
float *  x,
float *  y 
)

int getnnz ( Vec3i  volsize,
int  ri,
Vec3i  origin,
int *  nrays,
int *  nnz 
)

int ifix ( float  a  ) 

Definition at line 41 of file utilnum.cpp.

Referenced by bckpj3(), bckpj3_Cart(), fwdpj3(), and fwdpj3_Cart().

00042 {
00043     int ia = 0;
00044     if (a >= 0.0) {
00045        ia = (int)floor(a);
00046     }
00047     else {
00048        ia = (int)ceil(a);
00049     }
00050     return ia;
00051 }

int make_proj_mat ( float  phi,
float  theta,
float  psi,
float *  dm 
)

Definition at line 354 of file project3d.cpp.

00355 {
00356 //     float cphi=cos(phi);
00357 //     float sphi=sin(phi);
00358 //     float cthe=cos(theta);
00359 //     float sthe=sin(theta);
00360 //     float cpsi=cos(psi);
00361 //     float spsi=sin(psi);
00362 
00363     double cphi, sphi, cthe, sthe, cpsi, spsi;
00364     double dphi = phi;
00365     double dthe = theta;
00366     double dpsi = psi;
00367     sincos(dphi, &sphi, &cphi);
00368     sincos(dthe, &sthe, &cthe);
00369     sincos(dpsi, &spsi, &cpsi);
00370 
00371     dm[0]=cphi*cthe*cpsi-sphi*spsi;
00372     dm[1]=sphi*cthe*cpsi+cphi*spsi;
00373     dm[2]=-sthe*cpsi;
00374     dm[3]=-cphi*cthe*spsi-sphi*cpsi;
00375     dm[4]=-sphi*cthe*spsi+cphi*cpsi;
00376     dm[5]=sthe*spsi;
00377 
00378     return 0;
00379 }

int sph2cb ( float *  sphere,
Vec3i  volsize,
int  nrays,
int  ri,
int  nnz0,
int *  ptrs,
int *  cord,
float *  cube 
)


Generated on Thu Mar 18 02:20:01 2010 for EMAN2 by  doxygen 1.5.6