EMAN2
|
Fourier space 3D reconstruction This is a modified version of the normal FourierReconstructor which is aware of the SSNR information stored in individual class-average headers as "ctf_snr_total" and "ctf_wiener_filtered". More...
#include <reconstructor.h>
Public Member Functions | |
WienerFourierReconstructor () | |
Default constructor calls load_default_settings() More... | |
virtual | ~WienerFourierReconstructor () |
Deconstructor calls free_memory() More... | |
virtual int | insert_slice (const EMData *const slice, const Transform &euler, const float weight) |
Insert a slice into a 3D volume, in a given orientation. More... | |
virtual int | determine_slice_agreement (EMData *slice, const Transform &euler, const float weight=1.0, bool sub=true) |
Compares a slice to the current reconstruction volume and computes a normalization factor and quality. More... | |
virtual EMData * | finish (bool doift=true) |
Get the reconstructed volume Normally will return the volume in real-space with the requested size. More... | |
virtual string | get_name () const |
Get the unique name of the reconstructor. More... | |
virtual string | get_desc () const |
Get the one line description of the reconstructor. More... | |
Public Member Functions inherited from EMAN::FourierReconstructor | |
FourierReconstructor () | |
Default constructor calls load_default_settings() More... | |
virtual | ~FourierReconstructor () |
Deconstructor calls free_memory() More... | |
virtual void | setup () |
Setup the Fourier reconstructor. More... | |
virtual void | setup_seed (EMData *seed, float seed_weight) |
Initialize the reconstructor with a seed volume. More... | |
virtual void | setup_seedandweights (EMData *seed, EMData *weight) |
Initialize the reconstructor with a seed volume, as above. More... | |
virtual EMData * | preprocess_slice (const EMData *const slice, const Transform &t=Transform()) |
Preprocess the slice prior to insertion into the 3D volume this Fourier tranforms the slice and make sure all the pixels are in the right position it always returns a copy of the provided slice, so it should be deleted by someone eventually. More... | |
virtual EMData * | projection (const Transform &euler, int ret_fourier) |
Generates a projection by extracting a slice in Fourier space. More... | |
virtual void | clear () |
clear the volume and tmp_data for use in Monte Carlo reconstructions More... | |
virtual TypeDict | get_param_types () const |
Get the parameter types of this object. More... | |
Public Member Functions inherited from EMAN::Reconstructor | |
Reconstructor () | |
virtual | ~Reconstructor () |
int | insert_slice (const EMData *const slice, const Transform &euler) |
void | print_params () const |
Print the current parameters to std::out. More... | |
EMObject & | operator[] (const string &key) |
Public Member Functions inherited from EMAN::FactoryBase | |
FactoryBase () | |
virtual | ~FactoryBase () |
Dict | get_params () const |
get a copy of the parameters of this class More... | |
void | set_params (const Dict &new_params) |
Set new parameters. More... | |
void | set_param (const string key, const EMObject val) |
void | insert_params (const Dict &new_params) |
Insert parameters. More... | |
Dict | copy_relevant_params (const FactoryBase *const that) const |
Public Member Functions inherited from EMAN::ReconstructorVolumeData | |
ReconstructorVolumeData () | |
Only constructor All member variables are zeroed. More... | |
virtual | ~ReconstructorVolumeData () |
Destructor safely frees memory. More... | |
const EMData * | get_emdata () |
Get the main image pointer, probably redundant (not used) More... | |
Static Public Member Functions | |
static Reconstructor * | NEW () |
Factory incorporation uses the pointer of this function. More... | |
Static Public Member Functions inherited from EMAN::FourierReconstructor | |
static Reconstructor * | NEW () |
Factory incorporation uses the pointer of this function. More... | |
Static Public Attributes | |
static const string | NAME = "wiener_fourier" |
Static Public Attributes inherited from EMAN::FourierReconstructor | |
static const string | NAME = "fourier" |
Protected Member Functions | |
virtual void | do_insert_slice_work (const EMData *const input_slice, const Transform &euler, const float weight) |
virtual void | do_compare_slice_work (EMData *input_slice, const Transform &euler, float weight) |
A function to perform the nuts and bolts of comparing an image slice. More... | |
virtual bool | pixel_at (const float &xx, const float &yy, const float &zz, float *dt) |
This is a mode-2 pixel extractor. More... | |
Protected Member Functions inherited from EMAN::FourierReconstructor | |
virtual void | load_default_settings () |
Load default settings. More... | |
virtual void | free_memory () |
Frees the memory owned by this object (but not parent objects) Deletes the FourierPixelInserter3D pointer. More... | |
virtual void | load_inserter () |
Load the pixel inserter based on the information in params. More... | |
virtual void | do_insert_slice_work (const EMData *const input_slice, const Transform &euler, const float weight, const bool corners=false) |
A function to perform the nuts and bolts of inserting an image slice. More... | |
Protected Member Functions inherited from EMAN::ReconstructorVolumeData | |
void | free_memory () |
Free allocated memorys The inherited class may have allocated image of tmp_data In either case you can safely call this function to delete either of those pointers, even if they bdb:refine_03::threed_00are NULL. More... | |
virtual void | normalize_threed (const bool sqrt_damp=false, const bool wiener=false) |
Normalize on the assumption that image is a Fourier volume and that tmp_data is a volume of weights corresponding in size to this Fourier volume. More... | |
virtual void | zero_memory () |
Sends the pixels in tmp_data and image to zero Convenience only. More... | |
Private Member Functions | |
WienerFourierReconstructor (const WienerFourierReconstructor &that) | |
A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion methods. More... | |
WienerFourierReconstructor & | operator= (const WienerFourierReconstructor &) |
Disallow assignment. More... | |
Additional Inherited Members | |
Protected Attributes inherited from EMAN::FourierReconstructor | |
FourierPixelInserter3D * | inserter |
A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion methods. More... | |
Protected Attributes inherited from EMAN::FactoryBase | |
Dict | params |
This is the dictionary the stores the parameters of the object. More... | |
Protected Attributes inherited from EMAN::ReconstructorVolumeData | |
EMData * | image |
Inheriting class allocates this, probably in setup(). More... | |
EMData * | tmp_data |
Inheriting class may allocate this, probably in setup() More... | |
int | nx |
int | nx2 |
int | ny |
int | ny2 |
int | nz |
int | nz2 |
int | subnx |
int | subny |
int | subnz |
int | subx0 |
int | suby0 |
int | subz0 |
Fourier space 3D reconstruction This is a modified version of the normal FourierReconstructor which is aware of the SSNR information stored in individual class-average headers as "ctf_snr_total" and "ctf_wiener_filtered".
It will perform a reconstruction with a nonisotropic Wiener filter applied to the final reconstruction, and will 'undo' the Wiener filter on the individual class-averages if ctf_wiener_filtered is set. This represents something which was not possible to accomplish in EMAN1, and should produce superior results, with proper anisotropic filtering. Still, the filtration makes the assumption that the original SNR estimates were accurate, and that the data will average completely coherently, which is not truly the case. This may produce models which are somewhat underfiltered in the Wiener sense, but since B-factor corrections are not applied in the ctf.auto averager, this effect is likely already more than compensated for.
Definition at line 579 of file reconstructor.h.
|
inline |
Default constructor calls load_default_settings()
Definition at line 585 of file reconstructor.h.
Referenced by NEW().
|
inlinevirtual |
|
private |
A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion methods.
Disallow copy construction
|
virtual |
Compares a slice to the current reconstruction volume and computes a normalization factor and quality.
Normalization and quality are returned via attributes set in the passed slice. You may freely mix calls to determine_slice_agreement with calls to insert_slice, but note that determine_slice_agreement can only use information from slices that have already been inserted. Attributes set in the slice are: reconstruct_norm the relative normalization factor which should be applied before inserting the slice reconstruct_qual a scaled quality factor (larger better) for this slice as compared to the existing reconstruction reconstruct_absqual the absolute (not scaled based on weight) quality factor comparing this slice to the existing reconstruction reconstruct_weight the summed weights from all voxels intersecting with the inserted slice, larger -> more overlap with other slices
input_slice | The EMData slice to be compared |
euler | The orientation of the slice as a Transform object |
weight | This is ignored except for it's sign, since the SSNR from the particle header is used instead |
sub | Flag indicating whether to subtract the slice from the volume before comparing. May be ignored by some reconstructors |
NullPointerException | if the input EMData pointer is null |
ImageFormatException | if the image is complex as opposed to real |
Reimplemented from EMAN::FourierReconstructor.
Definition at line 1734 of file reconstructor.cpp.
References do_compare_slice_work(), do_insert_slice_work(), NullPointerException, EMAN::FourierReconstructor::preprocess_slice(), EMAN::Transform::set_mirror(), EMAN::Transform::set_scale(), EMAN::Transform::set_trans(), and sub().
|
protectedvirtual |
A function to perform the nuts and bolts of comparing an image slice.
input_slice | the slice to insert into the 3D volume |
euler | a transform storing the slice euler angle |
Reimplemented from EMAN::FourierReconstructor.
Definition at line 1778 of file reconstructor.cpp.
References EMAN::dot(), EMAN::Symmetry3D::get_symmetries(), EMAN::ReconstructorVolumeData::nx, EMAN::ReconstructorVolumeData::ny, EMAN::ReconstructorVolumeData::nz, EMAN::FactoryBase::params, pixel_at(), power(), sqrt(), EMAN::ReconstructorVolumeData::subnx, EMAN::ReconstructorVolumeData::subny, EMAN::ReconstructorVolumeData::subnz, x, and y.
Referenced by determine_slice_agreement().
|
protectedvirtual |
Definition at line 1679 of file reconstructor.cpp.
References EMAN::Symmetry3D::get_symmetries(), EMAN::FourierPixelInserter3D::insert_pixel(), EMAN::FourierReconstructor::inserter, EMAN::Util::linear_interpolate(), EMAN::ReconstructorVolumeData::nx, EMAN::ReconstructorVolumeData::ny, EMAN::ReconstructorVolumeData::nz, EMAN::FactoryBase::params, sub(), x, and y.
Referenced by determine_slice_agreement(), and insert_slice().
|
virtual |
Get the reconstructed volume Normally will return the volume in real-space with the requested size.
The calling application is responsible for removing any padding.
doift | A flag indicating whether the returned object should be guaranteed to be in real-space (true) or should be left in whatever space the reconstructor generated |
Reimplemented from EMAN::FourierReconstructor.
Definition at line 1921 of file reconstructor.cpp.
References EMAN::Dict::has_key(), EMAN::ReconstructorVolumeData::image, EMAN::ReconstructorVolumeData::normalize_threed(), EMAN::FactoryBase::params, EMAN::Dict::set_default(), and EMAN::ReconstructorVolumeData::tmp_data.
|
inlinevirtual |
Get the one line description of the reconstructor.
Reimplemented from EMAN::FourierReconstructor.
Definition at line 640 of file reconstructor.h.
|
inlinevirtual |
Get the unique name of the reconstructor.
Reimplemented from EMAN::FourierReconstructor.
Definition at line 633 of file reconstructor.h.
References NAME.
|
virtual |
Insert a slice into a 3D volume, in a given orientation.
slice | the image slice to be inserted into the 3D volume |
euler | Euler angle of this image slice. |
weight | This is ignored in this reconstructor, since the SSNR from the particle header is used instead |
NullPointerException | if the input EMData pointer is null |
ImageFormatException | if the image is complex as opposed to real |
Reimplemented from EMAN::FourierReconstructor.
Definition at line 1643 of file reconstructor.cpp.
References do_insert_slice_work(), NotExistingObjectException, NullPointerException, EMAN::FourierReconstructor::preprocess_slice(), EMAN::Transform::set_mirror(), EMAN::Transform::set_scale(), and EMAN::Transform::set_trans().
|
inlinestatic |
Factory incorporation uses the pointer of this function.
Definition at line 648 of file reconstructor.h.
References WienerFourierReconstructor().
|
private |
Disallow assignment.
|
protectedvirtual |
This is a mode-2 pixel extractor.
xx,yy,zz | voxel coordinates (need not be integers) |
dt | float pointer with 3 floats allocated for returned complex value and weight sum |
Reimplemented from EMAN::FourierReconstructor.
Definition at line 1847 of file reconstructor.cpp.
References EMAN::Util::fast_exp(), EMAN::Util::hypot3sq(), EMAN::EMConsts::I2G, EMAN::ReconstructorVolumeData::image, EMAN::ReconstructorVolumeData::nx, EMAN::ReconstructorVolumeData::nx2, EMAN::ReconstructorVolumeData::ny, EMAN::ReconstructorVolumeData::ny2, EMAN::ReconstructorVolumeData::nz, EMAN::ReconstructorVolumeData::nz2, rdata, EMAN::ReconstructorVolumeData::subnx, EMAN::ReconstructorVolumeData::subx0, EMAN::ReconstructorVolumeData::suby0, EMAN::ReconstructorVolumeData::subz0, and EMAN::ReconstructorVolumeData::tmp_data.
Referenced by do_compare_slice_work().
|
static |
Definition at line 653 of file reconstructor.h.
Referenced by get_name().