#include <reconstructor.h>
Inheritance diagram for EMAN::BackProjectionReconstructor:
Public Member Functions | |
BackProjectionReconstructor () | |
virtual | ~BackProjectionReconstructor () |
virtual void | setup () |
Initialize the reconstructor. | |
virtual int | insert_slice (const EMData *const slice, const Transform &euler, const float weight=1.0) |
Insert an image slice to the reconstructor. | |
virtual EMData * | finish (bool doift=true) |
Finish reconstruction and return the complete model. | |
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. | |
virtual TypeDict | get_param_types () const |
Static Public Member Functions | |
Reconstructor * | NEW () |
Static Public Attributes | |
const string | NAME = "back_projection" |
Private Member Functions | |
BackProjectionReconstructor (const BackProjectionReconstructor &that) | |
BackProjectionReconstructor & | operator= (const BackProjectionReconstructor &) |
void | load_default_settings () |
EMData * | preprocess_slice (const EMData *const slice, const Transform &t) |
While you can just insert unprocessed slices, if you call preprocess_slice yourself, and insert the returned slice instead, repeatedly, it can save a fair bit of computation. |
Back-projection is a method of 3D reconstruction from 2D projections. It is based on superposing 3D functions ("back-projection bodies") obtained by translating the 2D projections along the directions of projection.
Definition at line 658 of file reconstructor.h.
|
Definition at line 661 of file reconstructor.h. 00661 { load_default_settings(); }
|
|
Definition at line 663 of file reconstructor.h. 00663 {}
|
|
|
|
Finish reconstruction and return the complete model.
Reimplemented from EMAN::Reconstructor. Definition at line 1916 of file reconstructor.cpp. References EMAN::EMData::add(), EMAN::Factory< T >::get(), EMAN::Symmetry3D::get_nsym(), EMAN::Symmetry3D::get_syms(), EMAN::EMData::mult(), and EMAN::EMData::transform(). 01917 { 01918 01919 Symmetry3D* sym = Factory<Symmetry3D>::get((string)params["sym"]); 01920 vector<Transform> syms = sym->get_syms(); 01921 01922 for ( vector<Transform>::const_iterator it = syms.begin(); it != syms.end(); ++it ) { 01923 01924 EMData tmpcopy(*image); 01925 tmpcopy.transform(*it); 01926 image->add(tmpcopy); 01927 } 01928 01929 image->mult(1.0f/(float)sym->get_nsym()); 01930 delete sym; 01931 return image; 01932 }
|
|
Get a clear, concise description of this class.
Implements EMAN::FactoryBase. Definition at line 684 of file reconstructor.h. 00685 { 00686 return "Simple (unfiltered) back-projection reconstruction. Weighting by contributing particles in the class average is optional and default behaviour"; 00687 }
|
|
Get the unique name of this class (especially for factory based instantiation access).
Implements EMAN::FactoryBase. Definition at line 679 of file reconstructor.h. 00680 {
00681 return NAME;
00682 }
|
|
Implements EMAN::FactoryBase. Definition at line 694 of file reconstructor.h. References EMAN::TypeDict::put(). 00695 { 00696 TypeDict d; 00697 d.put("size", EMObject::INT, "Necessary. The x and y dimensions of the input images."); 00698 d.put("weight", EMObject::FLOAT, "Optional. A temporary value set prior to slice insertion, indicative of the inserted slice's weight. Default sis 1."); 00699 d.put("sym", EMObject::STRING, "Optional. The symmetry to impose on the final reconstruction. Default is c1"); 00700 d.put("zsample", EMObject::INT, "Optional. The z dimensions of the reconstructed volume."); 00701 return d; 00702 }
|
|
Insert an image slice to the reconstructor. To insert multiple image slices, call this function multiple times.
Reimplemented from EMAN::Reconstructor. |
|
Definition at line 712 of file reconstructor.h. 00713 { 00714 params["weight"] = 1.0; 00715 params["use_weights"] = true; 00716 params["size"] = 0; 00717 params["sym"] = "c1"; 00718 params["zsample"] = 0; 00719 }
|
|
Definition at line 689 of file reconstructor.h. 00690 { 00691 return new BackProjectionReconstructor(); 00692 }
|
|
|
|
While you can just insert unprocessed slices, if you call preprocess_slice yourself, and insert the returned slice instead, repeatedly, it can save a fair bit of computation. The default operation just returns a copy of the image, as the preprocessing is reconstructor-specific.
Reimplemented from EMAN::Reconstructor. Definition at line 1846 of file reconstructor.cpp. References EMAN::Transform::get_mirror(), EMAN::Transform::get_scale(), EMAN::Transform::get_trans_2d(), EMAN::EMData::process(), EMAN::EMData::process_inplace(), EMAN::Transform::set_rotation(), t, EMAN::EMData::transform(), and EMAN::Vec2f. 01847 { 01848 01849 EMData* return_slice = slice->process("normalize.edgemean"); 01850 return_slice->process_inplace("filter.linearfourier"); 01851 01852 Transform tmp(t); 01853 tmp.set_rotation(Dict("type","eman")); // resets the rotation to 0 implicitly 01854 Vec2f trans = tmp.get_trans_2d(); 01855 float scale = tmp.get_scale(); 01856 bool mirror = tmp.get_mirror(); 01857 if (trans[0] != 0 || trans[1] != 0 || scale != 1.0 ) { 01858 return_slice->transform(tmp); 01859 } else if ( mirror == true ) { 01860 return_slice = slice->process("xform.flip",Dict("axis","x")); 01861 } 01862 01863 return return_slice; 01864 }
|
|
Initialize the reconstructor.
Implements EMAN::Reconstructor. Definition at line 1835 of file reconstructor.cpp. References EMAN::EMData::set_size(). 01836 { 01837 int size = params["size"]; 01838 image = new EMData(); 01839 nx = size; 01840 ny = size; 01841 if ( (int) params["zsample"] != 0 ) nz = params["zsample"]; 01842 else nz = size; 01843 image->set_size(nx, ny, nz); 01844 }
|
|
Definition at line 80 of file reconstructor.cpp. |