#include <reconstructor_tools.h>
Inheritance diagram for EMAN::FourierInserter3DMode3:
Public Member Functions | |
FourierInserter3DMode3 () | |
virtual | ~FourierInserter3DMode3 () |
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 = "gauss_3" |
Private Member Functions | |
FourierInserter3DMode3 (const FourierInserter3DMode3 &) | |
FourierInserter3DMode3 & | operator= (const FourierInserter3DMode3 &) |
Definition at line 225 of file reconstructor_tools.h.
|
Definition at line 228 of file reconstructor_tools.h. 00228 {}
|
|
Definition at line 229 of file reconstructor_tools.h. 00229 {}
|
|
|
|
Get a clear, concise description of this class.
Implements EMAN::FactoryBase. Definition at line 243 of file reconstructor_tools.h. 00244 { 00245 return "Fourier pixel insertion using a 3x3x3 Gaussian kernel"; 00246 }
|
|
Get the unique name of this class (especially for factory based instantiation access).
Implements EMAN::FactoryBase. Definition at line 238 of file reconstructor_tools.h. 00239 {
00240 return NAME;
00241 }
|
|
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 185 of file reconstructor_tools.cpp. References EMAN::EMData::add_complex_at_fast(), dt, EMAN::Util::fast_exp(), EMAN::Util::hypot3(), EMAN::Util::hypot3sq(), and weight. 00186 { 00187 int x0 = (int) floor(xx-.5); 00188 int y0 = (int) floor(yy-.5); 00189 int z0 = (int) floor(zz-.5); 00190 00191 if (subx0<0) { // normal full reconstruction 00192 if (x0<-nx2-2 || y0<-ny2-2 || z0<-nz2-2 || x0>nx2+1 || y0>ny2+1 || z0>nz2+1 ) return false; 00193 00194 // no error checking on add_complex_fast, so we need to be careful here 00195 int x1=x0+2; 00196 int y1=y0+2; 00197 int z1=z0+2; 00198 if (x0<-nx2) x0=-nx2; 00199 if (x1>nx2) x1=nx2; 00200 if (y0<-ny2) y0=-ny2; 00201 if (y1>ny2) y1=ny2; 00202 if (z0<-nz2) z0=-nz2; 00203 if (z1>nz2) z1=nz2; 00204 00205 // float h=2.0/((1.0+pow(Util::hypot3sq(xx,yy,zz),.5))*EMConsts::I2G); 00206 // float h=2.0/EMConsts::I3G; 00207 float h=32.0f/((8.0f+Util::hypot3(xx,yy,zz))*EMConsts::I3G); 00208 // float w=weight; 00209 float w=weight/(1.0f+6.0f*Util::fast_exp(-h)+12*Util::fast_exp(-h*2.0f)+8*Util::fast_exp(-h*3.0f)); // approx normalization so higer radii aren't upweighted relative to lower due to wider Gaussian 00210 //size_t idx; 00211 float r, gg; 00212 // int pc=0; 00213 for (int k = z0 ; k <= z1; k++) { 00214 for (int j = y0 ; j <= y1; j++) { 00215 for (int i = x0; i <= x1; i ++) { 00216 r = Util::hypot3sq((float) i - xx, (float)j - yy, (float)k - zz); 00217 // gg=weight; 00218 gg = Util::fast_exp(-r *h)*w; 00219 // gg = Util::fast_exp(-r / EMConsts::I2G)*weight; 00220 // gg = sqrt(Util::fast_exp(-r / EMConsts::I2G))*weight; 00221 00222 size_t off; 00223 off=data->add_complex_at_fast(i,j,k,dt*gg); 00224 norm[off/2]+=gg; 00225 } 00226 } 00227 } 00228 return true; 00229 } 00230 printf("region writing not supported in mode 3\n"); 00231 return false; 00232 }
|
|
Definition at line 233 of file reconstructor_tools.h. 00234 { 00235 return new FourierInserter3DMode3(); 00236 }
|
|
|
|
Definition at line 43 of file reconstructor_tools.cpp. |