#include <reconstructor_tools.h>
Inheritance diagram for EMAN::FourierInserter3DMode7:
Public Member Functions | |
FourierInserter3DMode7 () | |
virtual | ~FourierInserter3DMode7 () |
virtual bool | insert_pixel (const float &xx, const float &yy, const float &zz, const std::complex< float > dt, const float &weight=1.0) |
Insert a complex pixel [dt[0]+dt[1]i] at (float) coordinate [xx,yy,zz] with weighting into a discrete 3D volume. | |
virtual string | get_name () const |
Get the unique name of this class (especially for factory based instantiation access). | |
virtual string | get_desc () const |
Get a clear, concise description of this class. | |
Static Public Member Functions | |
FourierPixelInserter3D * | NEW () |
Static Public Attributes | |
const string | NAME = "hypergeom_5" |
Private Member Functions | |
FourierInserter3DMode7 (const FourierInserter3DMode7 &) | |
FourierInserter3DMode7 & | operator= (const FourierInserter3DMode7 &) |
Definition at line 341 of file reconstructor_tools.h.
|
Definition at line 344 of file reconstructor_tools.h. 00344 {}
|
|
Definition at line 345 of file reconstructor_tools.h. 00345 {}
|
|
|
|
Get a clear, concise description of this class.
Implements EMAN::FactoryBase. Definition at line 359 of file reconstructor_tools.h. 00360 { 00361 return "Hypergeometric kernel 5x5x5"; 00362 }
|
|
Get the unique name of this class (especially for factory based instantiation access).
Implements EMAN::FactoryBase. Definition at line 354 of file reconstructor_tools.h. 00355 {
00356 return NAME;
00357 }
|
|
Insert a complex pixel [dt[0]+dt[1]i] at (float) coordinate [xx,yy,zz] with weighting into a discrete 3D volume.
Implements EMAN::FourierPixelInserter3D. Definition at line 315 of file reconstructor_tools.cpp. References EMAN::EMData::add_complex_at(), dt, EMAN::Interp::hyperg(), and sqrt(). 00316 { 00317 int x0 = 2 * (int) floor(xx + 0.5f); 00318 int y0 = (int) floor(yy + 0.5f); 00319 int z0 = (int) floor(zz + 0.5f); 00320 00321 if (x0 >= nx - 4 || y0 > ny - 3 || z0 > nz - 3 || y0 < 2 || z0 < 2) 00322 return false; 00323 00324 int l = x0 - 4; 00325 if (x0 <= 2) 00326 l = 0; 00327 00328 //size_t ii; 00329 float r, gg; 00330 for (int k = z0 - 2; k <= z0 + 2; k++) { 00331 for (int j = y0 - 2; j <= y0 + 2; j++) { 00332 for (int i = l; i <= x0 + 4; i += 2) { 00333 r = sqrt(Util::hypot3sq((float) i / 2 - xx, (float) j - yy, (float) k - zz)); 00334 gg = Interp::hyperg(r)*weight; 00335 00336 size_t off; 00337 if (subx0<0) off=data->add_complex_at(i,j,k,dt*gg); 00338 else off=data->add_complex_at(i,j,k,subx0,suby0,subz0,fullnx,fullny,fullnz,dt*gg); 00339 if (static_cast<int>(off)!=nxyz) norm[off/2]+=gg; 00340 00341 } 00342 } 00343 } 00344 00345 if (x0 <= 2) { 00346 float xx_b = -xx; 00347 float yy_b = -(yy - ny / 2) + ny / 2; 00348 float zz_b = -(zz - nz / 2) + nz / 2; 00349 x0 = 2 * (int) floor(xx_b + 0.5f); 00350 y0 = (int) floor(yy_b + 0.5f); 00351 z0 = (int) floor(zz_b + 0.5f); 00352 00353 if (y0 > ny - 3 || z0 > nz - 3 || y0 < 2 || z0 < 2) 00354 return false; 00355 00356 //size_t ii; 00357 float r, gg; 00358 for (int k = z0 - 2; k <= z0 + 2; k++) { 00359 for (int j = y0 - 2; j <= y0 + 2; j++) { 00360 for (int i = 0; i <= x0 + 4; i += 2) { 00361 r = sqrt(Util::hypot3sq((float) i / 2 - xx_b, (float) j - yy_b, 00362 (float) k - zz_b)); 00363 gg = Interp::hyperg(r)*weight; 00364 00365 size_t off; 00366 if (subx0<0) off=data->add_complex_at(i,j,k,dt*gg); 00367 else off=data->add_complex_at(i,j,k,subx0,suby0,subz0,fullnx,fullny,fullnz,dt*gg); 00368 if (static_cast<int>(off)!=nxyz) norm[off/2]+=gg; 00369 00370 } 00371 } 00372 } 00373 } 00374 00375 return true; 00376 }
|
|
Definition at line 349 of file reconstructor_tools.h. 00350 { 00351 return new FourierInserter3DMode7(); 00352 }
|
|
|
|
Definition at line 47 of file reconstructor_tools.cpp. |