EMAN2
reconstructor.h
Go to the documentation of this file.
1/*
2 * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu)
3 * Copyright (c) 2000-2006 Baylor College of Medicine
4 *
5 * This software is issued under a joint BSD/GNU license. You may use the
6 * source code in this file under either license. However, note that the
7 * complete EMAN2 and SPARX software packages have some GPL dependencies,
8 * so you are responsible for compliance with the licenses of these packages
9 * if you opt to use BSD licensing. The warranty disclaimer below holds
10 * in either instance.
11 *
12 * This complete copyright notice must be included in any revised version of the
13 * source code. Additional authorship citations may be added, but existing
14 * author citations must be preserved.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 *
30 * */
31
32//#define RECONDEBUG // This is used to add some data objects for debugging reconstructors, it should normally be commented out!
33
34#ifndef eman_reconstructor_h__
35#define eman_reconstructor_h__ 1
36#include <fstream>
37#include <memory>
38#include "emdata.h"
39#include "exception.h"
40#include "emobject.h"
41#include "interp.h"
42
43using std::vector;
44using std::map;
45using std::string;
46using std::shared_ptr;
47
48using std::cout;
49using std::cerr;
50using std::endl;
51
52#include <utility>
53using std::pair;
54
55#include "reconstructor_tools.h"
56
57namespace EMAN
58{
59
60 class Transform;
61 class EMData;
62
109 {
110 public:
112 virtual ~Reconstructor() {}
115 virtual void setup() = 0;
116
122 virtual void setup_seed(EMData* seed,float seed_weight) {throw;}
123
126 virtual void setup_seedandweights(EMData* seed,EMData* weight) {throw;}
127
128
137 virtual EMData* preprocess_slice( const EMData* const slice, const Transform& t = Transform() ) { EMData *ret=slice->copy(); ret->set_attr("reconstruct_preproc",(int)1); return ret; }
138
147 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight) {throw;}
148 int insert_slice(const EMData* const slice, const Transform & euler) { return this->insert_slice(slice, euler, 1.0f); }
149
163 virtual int determine_slice_agreement(EMData* slice, const Transform &euler, const float weight=1.0, bool sub=true ) { throw; }
164
173 virtual EMData* projection(const Transform &euler, int ret_fourier = 1) { throw; }
174
175
180 virtual EMData *finish(bool doift=true) { throw; }
181
184 virtual void clear() {throw; }
185
188 void print_params() const
189 {
190 std::cout << "Printing reconstructor params" << std::endl;
191 for ( Dict::const_iterator it = params.begin(); it != params.end(); ++it )
192 {
193 std::cout << (it->first) << " " << (it->second).to_str() << std::endl;
194 }
195 std::cout << "Done printing reconstructor params" << std::endl;
196 }
197
198
199 EMObject& operator[]( const string& key ) { return params[key]; }
200
201 private:
202 // Disallow copy construction
205
206 };
207
220 {
221 public:
225 inline ReconstructorVolumeData() : image(0), tmp_data(0), nx(0), ny(0), nz(0), subnx(0), subny(0), subnz(0), subx0(0), suby0(0), subz0(0) {}
226
230
233 const EMData* get_emdata() { return image; }
234 protected:
235 //These EMData pointers will most probably be allocated in setup() and released in finish()
240
241 // nx,ny,nz generally will store the dimensions of image
242 int nx,nx2;
243 int ny,ny2;
244 int nz,nz2;
245
246 // Note that subvolume capabilities may not be 100% functional
247 // subvolume size
248 int subnx;
249 int subny;
250 int subnz;
251
252 // subvolume origin
253 int subx0;
254 int suby0;
255 int subz0;
256
257#ifdef RECONDEBUG
258 double *ddata,*dnorm;
259#endif
260
261 protected:
268 {
269 if (image != 0) {delete image; image = 0;}
270 if ( tmp_data != 0 ) { delete tmp_data; tmp_data = 0; }
271 }
272
278 virtual void normalize_threed(const bool sqrt_damp=false,const bool wiener=false);
279
283 virtual void zero_memory()
284 {
285 if (tmp_data != 0 ) tmp_data->to_zero();
286 if (image != 0 ) image->to_zero();
287 }
288
289 private:
294
295 };
296
303 {
304 public:
306
308
309 virtual void setup();
310
311 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
312
313 virtual EMData *finish(bool doift=true);
314
315 virtual string get_name() const { return NAME; }
316
317 virtual string get_desc() const { return "performs 2D reconstruction"; }
318
320 {
321 return new FourierReconstructorSimple2D();
322 }
323
324
325 virtual TypeDict get_param_types() const
326 {
327 TypeDict d;
328 d.put("nx", EMObject::INT, "Necessary. The x dimension of the input images.");
329// d.put("sym", EMObject::STRING, "Symmetry - assumed to be C1 if not specified");
330 return d;
331 }
332
333 static const string NAME;
334 };
335
336
337
389 {
390 public:
395
400
404 virtual void setup();
405
414 virtual void setup_seed(EMData* seed,float seed_weight);
415
416 virtual void setup_seedandweights(EMData* seed,EMData* weight);
417
426 virtual EMData* preprocess_slice( const EMData* const slice, const Transform& t = Transform() );
427
437 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
438
443 virtual EMData* projection(const Transform &euler, int ret_fourier);
444
445
462 virtual int determine_slice_agreement(EMData* slice, const Transform &euler, const float weight=1.0, bool sub=true );
463
470 virtual EMData *finish(bool doift=true);
471
474 virtual void clear();
475
478 virtual string get_name() const
479 {
480 return NAME;
481 }
482
485 virtual string get_desc() const
486 {
487 return "Reconstruction via direct Fourier methods using one of a variety of different kernels, most of which are Gaussian based";
488 }
489
494 {
495 return new FourierReconstructor();
496 }
497
501 virtual TypeDict get_param_types() const
502 {
503 TypeDict d;
504 d.put("size", EMObject::INTARRAY, "Required. The dimensions of the real-space output volume, including any padding (must be handled by the calling application). Assumed that apix x/y/z identical.");
505 d.put("sym", EMObject::STRING, "Required. The symmetry of the reconstructed volume, c?, d?, oct, tet, icos, h?. Default is c1, ie - an asymmetric object");
506 d.put("mode", EMObject::STRING, "Optional. Fourier pixel insertion mode name (nearest_neighbor, gauss_2, gauss_3, gauss_5, gauss_5_slow, gypergeom_5, experimental) gauss_2 is the default.");
507 d.put("corners", EMObject::BOOL, "Optional. If not set, then reconstruction will cover a spherical volume with a radius of nx/2. If set, the full Fourier volume will be reconstructed, but will be ~2x slower.");
508 d.put("sqrtnorm", EMObject::BOOL, "Optional. When normalizing, additionally divides by the sqrt of the normalization factor to damp exaggerated features. Is this justifyable ? No idea (yet). Default is false.");
509 d.put("usessnr", EMObject::BOOL, "Optional. Looks for and uses the class_ssnr header parameter from each slice to weight each voxel during insertion to the reconstruction.");
510 d.put("verbose", EMObject::BOOL, "Optional. Toggles writing useful information to standard out. Default is false.");
511 d.put("quiet", EMObject::BOOL, "Optional. If false, print verbose information.");
512 d.put("subvolume",EMObject::INTARRAY, "Optional. (xorigin,yorigin,zorigin,xsize,ysize,zsize) all in Fourier pixels. Useful for parallelism.");
513 d.put("savenorm",EMObject::STRING, "Debug. Will cause the normalization volume to be written directly to the specified file when finish() is called.");
514
515 d.put("normout",EMObject::EMDATA, "Will write the normalization volume to the given EMData object file when finish() is called.");
516 return d;
517 }
518
519 static const string NAME;
520
521 protected:
524 virtual void load_default_settings();
525
529 virtual void free_memory();
530
533 virtual void load_inserter();
534
540 virtual void do_insert_slice_work(const EMData* const input_slice, const Transform & euler,const float weight, const bool corners=false);
541
546 virtual void do_compare_slice_work(EMData* input_slice, const Transform & euler,float weight);
547
552 virtual bool pixel_at(const float& xx, const float& yy, const float& zz, float *dt);
553
556
557 private:
564
565 };
566
567
568
580 {
581 public:
586
591
592
602 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
603
604
621 virtual int determine_slice_agreement(EMData* slice, const Transform &euler, const float weight=1.0, bool sub=true );
622
629 virtual EMData *finish(bool doift=true);
630
633 virtual string get_name() const
634 {
635 return NAME;
636 }
637
640 virtual string get_desc() const
641 {
642 return "Reconstruction via direct Fourier methods using one of a variety of different kernels, most of which are Gaussian based. This version also incorporates a nonisotropic Wiener filter based on SNR estimates stored in the class-average headers by the ctf.auto averager.";
643 }
644
649 {
650 return new WienerFourierReconstructor();
651 }
652
653 static const string NAME;
654
655 protected:
656
657 virtual void do_insert_slice_work(const EMData* const input_slice, const Transform & euler,const float weight);
658
663 virtual void do_compare_slice_work(EMData* input_slice, const Transform & euler,float weight);
664
669 virtual bool pixel_at(const float& xx, const float& yy, const float& zz, float *dt);
670
672// FourierPixelInserter3D* inserter;
673
674 private:
681
682 };
683
699 {
700 public:
704
709
713 virtual void setup();
714
723 virtual void setup_seed(EMData* seed,float seed_weight);
724 virtual void setup_seedandweights(EMData* seed,EMData* weight);
725
734 virtual EMData* preprocess_slice( const EMData* const slice, const Transform& t = Transform() );
735
745 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
746
747
764 virtual int determine_slice_agreement(EMData* slice, const Transform &euler, const float weight=1.0, bool sub=true );
765
772 virtual EMData *finish(bool doift=true);
773
776 virtual void clear();
777
780 virtual string get_name() const
781 {
782 return NAME;
783 }
784
787 virtual string get_desc() const
788 {
789 return "Reconstruction via Fourier interpolation using an iterative strategy to define the interpolation kernel";
790 }
791
796 {
797 return new FourierIterReconstructor();
798 }
799
803 virtual TypeDict get_param_types() const
804 {
805 TypeDict d;
806 d.put("size", EMObject::INTARRAY, "Required. The dimensions of the real-space output volume, including any padding (must be handled by the calling application). Assumed that apix x/y/z identical.");
807 d.put("sym", EMObject::STRING, "Optional. The symmetry of the reconstructed volume, c?, d?, oct, tet, icos, h?. Default is c1, ie - an asymmetric object");
808 d.put("verbose", EMObject::BOOL, "Optional. Toggles writing useful information to standard out. Default is false.");
809 return d;
810 }
811
812 static const string NAME;
813
814 protected:
815
819 virtual void free_memory();
820
822
823 private:
830
831 };
832
833
842 {
843 public:
845
847
848 virtual void setup();
849
858 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
859
869 virtual int determine_slice_agreement(EMData* slice, const Transform &euler, const float weight=1.0, bool sub=true );
870
871 virtual EMData *finish(bool doift=true);
872
873 virtual string get_name() const
874 {
875 return NAME;
876 }
877
878 virtual string get_desc() const
879 {
880 return "Simple (unfiltered) back-projection reconstruction. Weighting by contributing particles in the class average is optional and default behaviour";
881 }
882
884 {
885 return new BackProjectionReconstructor();
886 }
887
888 virtual TypeDict get_param_types() const
889 {
890 TypeDict d;
891 d.put("size", EMObject::INTARRAY, "Required. The dimensions of the real-space output volume, including any padding (must be handled by the calling application). Assumed that apix x/y/z identical.");
892 d.put("weight", EMObject::FLOAT, "Optional. A temporary value set prior to slice insertion, indicative of the inserted slice's weight. Default sis 1.");
893 d.put("sym", EMObject::STRING, "Optional. The symmetry to impose on the final reconstruction. Default is c1");
894 d.put("verbose", EMObject::BOOL, "Optional. Toggles writing useful information to standard out. Default is false.");
895 return d;
896 }
897
898 static const string NAME;
899
900 private:
901 // Disallow copy construction
903 // Disallow assignment
905
907 {
908 params["weight"] = 1.0;
909 params["use_weights"] = true;
910 params["sym"] = "c1";
911 params["verbose"] = false;
912 }
913
914 EMData* preprocess_slice(const EMData* const slice, const Transform& t);
915 };
916
922 {
923 public:
925
927
928 virtual void setup();
929
938 virtual EMData* preprocess_slice( const EMData* const slice, const Transform& t = Transform() );
939
948 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
949
959 virtual int determine_slice_agreement(EMData* slice, const Transform &euler, const float weight=1.0, bool sub=true );
960
961 virtual EMData *finish(bool doift=true);
962
963 virtual string get_name() const
964 {
965 return NAME;
966 }
967
968 virtual string get_desc() const
969 {
970 return "A back projection reconstructor with alternative statistics. mode:\n\
9710 - median rather than mean per voxel (default)\n\
9721 - similar to a mode. progressive subdivision of numeric axis to find dense value cluster\n\
9732 - median with a bias towands zero (postive and negative)\n\
9743 - median with a bias towards the 1/2 of the values spanning a narrower range\n\
9754 - specifically for tomography, requires slices to be in order by tilt\n\
976";
977 }
978
980 {
981 return new RealMedianReconstructor();
982 }
983
984 virtual TypeDict get_param_types() const
985 {
986 TypeDict d;
987 d.put("mode", EMObject::INT, "Default is 0, median. 1 - compute estimated statistical mode.");
988 d.put("size", EMObject::INTARRAY, "Required. The dimensions of the real-space output volume, including any padding (must be handled by the calling application). Assumed that apix x/y/z identical.");
989 d.put("weight", EMObject::FLOAT, "Optional. A temporary value set prior to slice insertion, indicative of the inserted slice's weight. Default sis 1.");
990 d.put("sym", EMObject::STRING, "Optional. The symmetry to impose on the final reconstruction. Default is c1");
991 d.put("verbose", EMObject::INT, "Optional. Toggles writing diagnostic information to standard out. Default is 0.");
992 return d;
993 }
994
995 static const string NAME;
996
997 private:
998 // Disallow copy construction
1000 // Disallow assignment
1002
1003 vector<EMData *> slices;
1004 vector<Transform> xforms;
1005 };
1006
1010 EMData* padfft_slice( const EMData* const slice, const Transform& t, int npad );
1011
1013 {
1014 public:
1016
1017 nn4Reconstructor( const string& symmetry, int size, int npad );
1018
1019 virtual ~nn4Reconstructor();
1020
1021 virtual void setup();
1022
1031 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
1032
1033 virtual EMData *finish(bool doift=true);
1034
1035 virtual string get_name() const
1036 {
1037 return NAME;
1038 }
1039
1040 virtual string get_desc() const
1041 {
1042 return "Direct Fourier inversion routine";
1043 }
1044
1046 {
1047 return new nn4Reconstructor();
1048 }
1049
1051 {
1052 TypeDict d;
1053 d.put("size", EMObject::INT);
1054 d.put("npad", EMObject::INT);
1055 d.put("sign", EMObject::INT);
1056 d.put("ndim", EMObject::INT);
1057 d.put("snr", EMObject::FLOAT);
1058 d.put("symmetry", EMObject::STRING);
1059 d.put("snr", EMObject::FLOAT);
1060 d.put("fftvol", EMObject::EMDATA);
1061 d.put("weight", EMObject::EMDATA);
1062 d.put("weighting", EMObject::INT);
1063 return d;
1064 }
1065
1066 void setup( const string& symmetry, int size, int npad );
1067
1068 int insert_padfft_slice( EMData* padded, const Transform& trans, float mult=1 );
1069
1070 static const string NAME;
1071
1072 private:
1083 void buildFFTVolume();
1084 void buildNormVolume();
1085 float m_wghta;
1086 float m_wghtb;
1087 float m_osnr;
1089 {
1090 //params["use_weights"] = false;
1091 }
1092 };
1093
1094
1101 {
1102 public:
1104
1105 nn4_rectReconstructor( const string& symmetry, int size, int npad );
1106
1107 virtual ~nn4_rectReconstructor();
1108
1109 virtual void setup();
1110
1119 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
1120
1121 virtual EMData *finish(bool doift=true);
1122
1123 virtual string get_name() const
1124 {
1125 return NAME;
1126 }
1127
1128 virtual string get_desc() const
1129 {
1130 return "Direct Fourier inversion routine";
1131 }
1132
1134 {
1135 return new nn4_rectReconstructor();
1136 }
1137
1139 {
1140 TypeDict d;
1141 d.put("sizeprojection", EMObject::INT);
1142 d.put("sizex", EMObject::INT);
1143 d.put("sizey", EMObject::INT);
1144 d.put("sizez", EMObject::INT);
1145 d.put("xratio", EMObject::FLOAT);
1146 d.put("yratio", EMObject::FLOAT);
1147 d.put("zratio", EMObject::FLOAT);
1148 d.put("npad", EMObject::INT);
1149 d.put("sign", EMObject::INT);
1150 d.put("ndim", EMObject::INT);
1151 d.put("snr", EMObject::FLOAT);
1152 d.put("symmetry", EMObject::STRING);
1153 d.put("snr", EMObject::FLOAT);
1154 d.put("fftvol", EMObject::EMDATA);
1155 d.put("weight", EMObject::EMDATA);
1156 d.put("weighting", EMObject::INT);
1157 return d;
1158 }
1159
1160 void setup( const string& symmetry, int size, int npad );
1161
1162 int insert_padfft_slice( EMData* padded, const Transform& trans, float mult=1 );
1163
1164 static const string NAME;
1165
1166 private:
1178 float m_xratio,m_yratio,m_zratio;//ratio of x,y,z direction in the 3d volume comparing to the cubic case
1179 float m_xscale,m_yscale;//ratio of x,y direction of 2D FFT after scaling and roatating operations
1181 void buildFFTVolume();
1182 void buildNormVolume();
1183 float m_wghta;
1184 float m_wghtb;
1185 float m_osnr;
1187 {
1188 //params["use_weights"] = false;
1189 }
1190 };
1191
1192
1193 /* Fourier Reconstruction by nearest neighbor with 3D SSNR
1194 Added by Zhengfan Yang on 03/16/07
1195 */
1196
1198 {
1199
1200 public:
1202
1203 nnSSNR_Reconstructor( const string& symmetry, int size, int npad);
1204
1206
1207 virtual void setup();
1208
1217 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
1218
1219 virtual EMData *finish(bool doift=true);
1220
1221 virtual string get_name() const
1222 {
1223 return NAME;
1224 }
1225
1226 virtual string get_desc() const
1227 {
1228 return "Reconstruction by nearest neighbor with 3D SSNR";
1229 }
1230
1232 {
1233 return new nnSSNR_Reconstructor();
1234 }
1235
1237 {
1238 TypeDict d;
1239 d.put("size", EMObject::INT);
1240 d.put("npad", EMObject::INT);
1241 d.put("symmetry", EMObject::STRING);
1242 d.put("fftvol", EMObject::EMDATA);
1243 d.put("weight", EMObject::EMDATA);
1244 d.put("weight2", EMObject::EMDATA);
1245 d.put("SSNR", EMObject::EMDATA);
1246 d.put("vol_ssnr", EMObject::EMDATA);
1247 d.put("w", EMObject::FLOAT);
1248 return d;
1249 }
1250
1251 void setup( const string& symmetry, int size, int npad);
1252
1253 int insert_padfft_slice( EMData* padded, const Transform& trans, float mult=1 );
1254
1255 static const string NAME;
1256
1257 private:
1268 void buildFFTVolume();
1269 void buildNormVolume();
1270 void buildNorm2Volume();
1271 float m_wghta;
1272 float m_wghtb;
1273 };
1274
1275
1280 {
1281 public:
1283
1284 nn4_ctfReconstructor( const string& symmetry, int size, int npad, float snr, int sign );
1285
1286 virtual ~nn4_ctfReconstructor();
1287
1288 virtual void setup();
1289
1299 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
1300
1301 virtual EMData *finish(bool doift=true);
1302
1303 virtual string get_name() const
1304 {
1305 return NAME;
1306 }
1307
1308 virtual string get_desc() const
1309 {
1310 return "Direct Fourier inversion reconstruction routine";
1311 }
1312
1314 {
1315 return new nn4_ctfReconstructor();
1316 }
1317
1318
1320 {
1321 TypeDict d;
1322 d.put("size", EMObject::INT);
1323 d.put("npad", EMObject::INT);
1324 d.put("sign", EMObject::INT);
1325 d.put("symmetry", EMObject::STRING);
1326 d.put("snr", EMObject::FLOAT);
1327 d.put("fftvol", EMObject::EMDATA);
1328 d.put("weight", EMObject::EMDATA);
1329 d.put("weighting", EMObject::INT);
1330 d.put("varsnr", EMObject::INT);
1331 return d;
1332 }
1333
1334 void setup( const string& symmetry, int size, int npad, float snr, int sign );
1335
1336 int insert_padfft_slice( EMData* padfft, EMData* ctf2d2, const Transform& trans, float mult=1);
1337
1338 int insert_buffed_slice( const EMData* buffer, float mult );
1339
1340 static const string NAME;
1341
1342 private:
1353 float m_snr;
1356
1357 void buildFFTVolume();
1358 void buildNormVolume();
1359
1360 };
1361
1362
1363
1368 {
1369 public:
1371
1372 nn4_ctfwReconstructor( const string& symmetry, int size, int npad, float snr, int sign, int do_ctf );
1373
1374 virtual ~nn4_ctfwReconstructor();
1375
1376 virtual void setup();
1377
1387 virtual int insert_slice(const EMData* const slice, const Transform & euler, const float weight);
1388
1389 virtual EMData *finish(bool compensate=true);
1390
1391 virtual string get_name() const
1392 {
1393 return NAME;
1394 }
1395
1396 virtual string get_desc() const
1397 {
1398 return "Direct Fourier inversion reconstruction routine";
1399 }
1400
1402 {
1403 return new nn4_ctfwReconstructor();
1404 }
1405
1406
1408 {
1409 TypeDict d;
1410 d.put("size", EMObject::INT);
1411 d.put("npad", EMObject::INT);
1412 d.put("sign", EMObject::INT);
1413 d.put("symmetry", EMObject::STRING);
1414 d.put("snr", EMObject::FLOAT);
1415 d.put("fftvol", EMObject::EMDATA);
1416 d.put("weight", EMObject::EMDATA);
1417 d.put("refvol", EMObject::EMDATA);
1418 d.put("weighting", EMObject::INT);
1419 d.put("varsnr", EMObject::INT);
1420 d.put("do_ctf", EMObject::INT);
1421 return d;
1422 }
1423
1424 void setup( const string& symmetry, int size, int npad, float snr, int sign, int do_ctf );
1425
1426 int insert_padfft_slice_weighted( EMData* padfft, EMData* ctf2d2, vector<float> bckgnoise, const Transform& trans, const float weight);
1427
1428 // It appears here one could add extra functions int insert_buffed_slice( const EMData* buffer, float mult );
1429 //int insert_buffed_slice( const EMData* buffer, float mult );
1430
1431 static const string NAME;
1432
1433 private:
1445 float m_snr;
1449
1450 void buildFFTVolume();
1451 void buildNormVolume();
1452
1453 };
1454
1455
1460 {
1461 public:
1463
1464 nn4_ctfwsReconstructor( const string& symmetry, int size, int npad, float snr, int sign, int do_ctf );
1465
1466 virtual ~nn4_ctfwsReconstructor();
1467
1468 virtual void setup();
1469
1479 virtual int insert_slice(const EMData* const slice, const Transform & euler, const float weight);
1480
1481 virtual EMData *finish(bool compensate=true);
1482
1483 virtual string get_name() const
1484 {
1485 return NAME;
1486 }
1487
1488 virtual string get_desc() const
1489 {
1490 return "Direct Fourier inversion reconstruction routine";
1491 }
1492
1494 {
1495 return new nn4_ctfwsReconstructor();
1496 }
1497
1498
1500 {
1501 TypeDict d;
1502 d.put("size", EMObject::INT);
1503 d.put("npad", EMObject::INT);
1504 d.put("sign", EMObject::INT);
1505 d.put("symmetry", EMObject::STRING);
1506 d.put("snr", EMObject::FLOAT);
1507 d.put("fftvol", EMObject::EMDATA);
1508 d.put("weight", EMObject::EMDATA);
1509 d.put("refvol", EMObject::EMDATA);
1510 d.put("weighting", EMObject::INT);
1511 d.put("varsnr", EMObject::INT);
1512 d.put("do_ctf", EMObject::INT);
1513 return d;
1514 }
1515
1516 void setup( const string& symmetry, int size, int npad, float snr, int sign, int do_ctf );
1517
1518 int insert_padfft_slice_weighted( EMData* padfft, EMData* ctf2d2, vector<float> bckgnoise, const Transform& trans, const float weight);
1519
1520 // It appears here one could add extra functions int insert_buffed_slice( const EMData* buffer, float mult );
1521 //int insert_buffed_slice( const EMData* buffer, float mult );
1522
1523 static const string NAME;
1524
1525 private:
1537 float m_snr;
1541
1542 void buildFFTVolume();
1543 void buildNormVolume();
1544
1545 };
1546
1551 {
1552 public:
1554
1555 nn4_ctf_rectReconstructor( const string& symmetry, int size, int npad, float snr, int sign );
1556
1558
1559 virtual void setup();
1560
1570 virtual int insert_slice(const EMData* const slice, const Transform & euler, const float weight);
1571
1572 virtual EMData *finish(bool doift=true);
1573
1574 virtual string get_name() const
1575 {
1576 return NAME;
1577 }
1578
1579 virtual string get_desc() const
1580 {
1581 return "Direct Fourier inversion reconstruction routine";
1582 }
1583
1585 {
1586 return new nn4_ctf_rectReconstructor();
1587 }
1588
1589
1591 {
1592 TypeDict d;
1593 d.put("size", EMObject::INT);
1594 d.put("npad", EMObject::INT);
1595 d.put("sign", EMObject::INT);
1596 d.put("symmetry", EMObject::STRING);
1597 d.put("snr", EMObject::FLOAT);
1598 d.put("fftvol", EMObject::EMDATA);
1599 d.put("weight", EMObject::EMDATA);
1600 d.put("refvol", EMObject::EMDATA);
1601 d.put("weighting", EMObject::INT);
1602 d.put("varsnr", EMObject::INT);
1603 return d;
1604 }
1605
1606 void setup( const string& symmetry, int sizeprojection, int npad, float snr, int sign );
1607
1608 int insert_padfft_slice( EMData* padfft, const Transform& trans, float mult=1);
1609
1610 int insert_buffed_slice( const EMData* buffer, float mult );
1611
1612 static const string NAME;
1613
1614 private:
1621 float m_xratio, m_yratio, m_zratio;//ratio of x,y,z direction in the 3d volume comparing to the cubic case
1628 float m_snr;
1631
1632 void buildFFTVolume();
1633 void buildNormVolume();
1634 };
1635
1636
1637
1638 /* Fourier Reconstruction by nearest neighbor with 3D SSNR and CTF
1639 Added by Zhengfan Yang on 04/11/07
1640 */
1641
1643 {
1644
1645 public:
1647
1648 nnSSNR_ctfReconstructor( const string& symmetry, int size, int npad, float snr, int sign);
1649
1651
1652 virtual void setup();
1653
1663 virtual int insert_slice(const EMData* const slice, const Transform & euler,const float weight);
1664
1665
1666 virtual EMData *finish(bool doift=true);
1667
1668 virtual string get_name() const
1669 {
1670 return NAME;
1671 }
1672
1673 virtual string get_desc() const
1674 {
1675 return "Reconstruction by nearest neighbor with 3D SSNR with CTF";
1676 }
1677
1679 {
1680 return new nnSSNR_ctfReconstructor();
1681 }
1682
1684 {
1685 TypeDict d;
1686 d.put("size", EMObject::INT);
1687 d.put("npad", EMObject::INT);
1688 d.put("symmetry", EMObject::STRING);
1689 d.put("fftvol", EMObject::EMDATA);
1690 d.put("fftwvol", EMObject::EMDATA);
1691 d.put("weight", EMObject::EMDATA);
1692 d.put("weight2", EMObject::EMDATA);
1693 d.put("weight3", EMObject::EMDATA);
1694 d.put("SSNR", EMObject::EMDATA);
1695 d.put("vol_ssnr", EMObject::EMDATA);
1696 d.put("w", EMObject::FLOAT);
1697 d.put("sign", EMObject::INT);
1698 d.put("snr", EMObject::FLOAT);
1699 return d;
1700 }
1701 void setup( const string& symmetry, int size, int npad, float snr, int sign);
1702
1703 int insert_padfft_slice( EMData* padded, const Transform& trans, float mult=1 );
1704
1705 static const string NAME;
1706
1707 private:
1719 void buildFFTVolume();
1720 void buildNormVolume();
1721 void buildNorm2Volume();
1722 void buildNorm3Volume();
1723 float m_wghta;
1724 float m_wghtb;
1726 float m_snr;
1728 };
1729
1731
1732 void dump_reconstructors();
1733 map<string, vector<string> > dump_reconstructors_list();
1734
1735
1736 struct point_t
1737 {
1738 int pos2;
1739 float real;
1740 float imag;
1741 float ctf2;
1742 };
1743
1744
1746 {
1747 public:
1748 newfile_store( const string& prefix, int npad, bool ctf );
1749
1750 virtual ~newfile_store();
1751
1752 void add_image( EMData* data, const Transform& tf );
1753
1754 void add_tovol( EMData* fftvol, EMData* wgtvol, const vector<int>& mults, int pbegin, int pend );
1755
1756 void get_image( int id, EMData* buf );
1757
1758 void read( int nprj );
1759
1760 void restart( );
1761
1762 private:
1764
1765 bool m_ctf;
1766
1769
1770 shared_ptr<std::ofstream> m_bin_of;
1771 shared_ptr<std::ofstream> m_txt_of;
1772 shared_ptr<std::ifstream> m_bin_if;
1773 vector< std::istream::off_type > m_offsets;
1774
1775 vector< point_t > m_points;
1776 };
1777
1779 {
1780 public:
1781 file_store(const string& filename, int npad, int write, bool CTF);
1782
1783 virtual ~file_store();
1784
1785 void add_image(EMData* data, const Transform& tf);
1786
1787 void get_image(int id, EMData* padfft);
1788
1789 void restart();
1790 private:
1791 shared_ptr<std::ifstream> m_ihandle;
1792 shared_ptr<std::ofstream> m_bin_ohandle;
1793 shared_ptr<std::ofstream> m_txt_ohandle;
1803 std::istream::off_type m_totsize;
1804 float m_Cs;
1805 float m_pixel;
1809 vector< float > m_defocuses;
1810 vector< float > m_phis;
1811 vector< float > m_thetas;
1812 vector< float > m_psis;
1813 };
1814
1815}
1816
1817#endif
Real space 3D reconstruction using back projection.
static Reconstructor * NEW()
BackProjectionReconstructor & operator=(const BackProjectionReconstructor &)
virtual string get_desc() const
Get a clear, concise description of this class.
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
EMData * preprocess_slice(const EMData *const slice, const Transform &t)
While you can just insert unprocessed slices, if you call preprocess_slice yourself,...
BackProjectionReconstructor(const BackProjectionReconstructor &that)
virtual void setup()
Initialize the reconstructor.
virtual TypeDict get_param_types() const
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual int determine_slice_agreement(EMData *slice, const Transform &euler, const float weight=1.0, bool sub=true)
Dummy function which always returns the same values.
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
Const iterator support for the Dict object This is just a wrapper, everything is inherited from the m...
Definition: emobject.h:674
iterator end()
Definition: emobject.cpp:1061
iterator begin()
Definition: emobject.cpp:1045
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
EMObject is a wrapper class for types including int, float, double, etc as defined in ObjectType.
Definition: emobject.h:123
A class one may inherit from to ensure that the responsibilities of being incorporated into an EMAN2:...
Definition: emobject.h:893
Dict params
This is the dictionary the stores the parameters of the object.
Definition: emobject.h:953
Factory is used to store objects to create new instances.
Definition: emobject.h:725
Fourier space 3D reconstruction The Fourier reconstructor is designed to work in an iterative fashion...
virtual string get_desc() const
Get the one line description of the reconstructor.
virtual ~FourierIterReconstructor()
Deconstructor calls free_memory()
FourierIterReconstructor & operator=(const FourierIterReconstructor &)
Disallow assignment.
virtual void setup()
Setup the Fourier reconstructor.
virtual EMData * finish(bool doift=true)
Get the reconstructed volume Normally will return the volume in real-space with the requested size.
virtual void clear()
clear the volume and tmp_data for use in Monte Carlo reconstructions
virtual string get_name() const
Get the unique name of the reconstructor.
FourierIterReconstructor(const FourierIterReconstructor &that)
Disallow copy construction.
virtual TypeDict get_param_types() const
Get the parameter types of this object.
virtual void free_memory()
Frees the memory owned by this object (but not parent objects) Deletes the FourierPixelInserter3D poi...
FourierIterReconstructor()
Default constructor.
virtual void setup_seed(EMData *seed, float seed_weight)
Initialize the reconstructor with a seed volume.
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.
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...
static Reconstructor * NEW()
Factory incorporation uses the pointer of this function.
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 ...
virtual void setup_seedandweights(EMData *seed, EMData *weight)
Initialize the reconstructor with a seed volume, as above.
FourierPixelInserter3D class defines a way a continuous pixel in 3D is inserted into the discrete 3D ...
This class originally added for 2D experimentation and prototying.
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual void setup()
Initialize the reconstructor.
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
static Reconstructor * NEW()
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
virtual string get_desc() const
Get a clear, concise description of this class.
virtual TypeDict get_param_types() const
Fourier space 3D reconstruction The Fourier reconstructor is designed to work in an iterative fashion...
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.
static const string NAME
virtual void clear()
clear the volume and tmp_data for use in Monte Carlo reconstructions
virtual void load_default_settings()
Load default settings.
virtual void setup_seed(EMData *seed, float seed_weight)
Initialize the reconstructor with a seed volume.
virtual ~FourierReconstructor()
Deconstructor calls free_memory()
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.
virtual void load_inserter()
Load the pixel inserter based on the information in params.
virtual TypeDict get_param_types() const
Get the parameter types of this object.
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.
static Reconstructor * NEW()
Factory incorporation uses the pointer of this function.
virtual void setup()
Setup the Fourier reconstructor.
virtual void free_memory()
Frees the memory owned by this object (but not parent objects) Deletes the FourierPixelInserter3D poi...
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 ...
virtual EMData * finish(bool doift=true)
Get the reconstructed volume Normally will return the volume in real-space with the requested size.
FourierReconstructor & operator=(const FourierReconstructor &)
Disallow assignment.
virtual void setup_seedandweights(EMData *seed, EMData *weight)
Initialize the reconstructor with a seed volume, as above.
virtual EMData * projection(const Transform &euler, int ret_fourier)
Generates a projection by extracting a slice in Fourier space.
virtual string get_desc() const
Get the one line description of the reconstructor.
FourierPixelInserter3D * inserter
A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion ...
FourierReconstructor(const FourierReconstructor &that)
Disallow copy construction.
FourierReconstructor()
Default constructor calls load_default_settings()
virtual bool pixel_at(const float &xx, const float &yy, const float &zz, float *dt)
This is a mode-2 pixel extractor.
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...
virtual string get_name() const
Get the unique name of the reconstructor.
Real space 3D reconstruction using per-voxel median.
RealMedianReconstructor(const RealMedianReconstructor &that)
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
virtual TypeDict get_param_types() const
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
static Reconstructor * NEW()
vector< Transform > xforms
virtual void setup()
Initialize the reconstructor.
static const string NAME
virtual EMData * preprocess_slice(const EMData *const slice, const Transform &t=Transform())
While you can just insert unprocessed slices, if you call preprocess_slice yourself,...
virtual string get_desc() const
Get a clear, concise description of this class.
RealMedianReconstructor & operator=(const RealMedianReconstructor &)
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual int determine_slice_agreement(EMData *slice, const Transform &euler, const float weight=1.0, bool sub=true)
Dummy function which always returns the same values.
This is a Mixin class A class object encapsulating the volume data required by Reconstructors It basi...
void free_memory()
Free allocated memorys The inherited class may have allocated image of tmp_data In either case you ca...
ReconstructorVolumeData(const ReconstructorVolumeData &that)
Disallow copy construction.
virtual void zero_memory()
Sends the pixels in tmp_data and image to zero Convenience only.
virtual ~ReconstructorVolumeData()
Destructor safely frees memory.
const EMData * get_emdata()
Get the main image pointer, probably redundant (not used)
EMData * image
Inheriting class allocates this, probably in setup().
ReconstructorVolumeData()
Only constructor All member variables are zeroed.
EMData * tmp_data
Inheriting class may allocate this, probably in setup()
ReconstructorVolumeData & operator=(const ReconstructorVolumeData &)
Disallow assignment.
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 c...
Reconstructor class defines a way to do 3D recontruction.
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...
EMObject & operator[](const string &key)
int insert_slice(const EMData *const slice, const Transform &euler)
virtual void setup_seed(EMData *seed, float seed_weight)
Initialize the reconstructor with a seed volume.
virtual void setup_seedandweights(EMData *seed, EMData *weight)
Initialize the reconstructor with a seed volume, as above.
virtual EMData * preprocess_slice(const EMData *const slice, const Transform &t=Transform())
While you can just insert unprocessed slices, if you call preprocess_slice yourself,...
Reconstructor & operator=(const Reconstructor &)
void print_params() const
Print the current parameters to std::out.
virtual void setup()=0
Initialize the reconstructor.
virtual void clear()
set the volume and tmp_volume data to zero, for use in Monte Carlo reconstructors
virtual EMData * projection(const Transform &euler, int ret_fourier=1)
This will create a projection from the current reconstruction.
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
Reconstructor(const Reconstructor &that)
virtual ~Reconstructor()
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of ...
Definition: transform.h:75
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305
void put(const string &key, EMObject::ObjectType o, const string &desc="")
Definition: emobject.h:330
Fourier space 3D reconstruction This is a modified version of the normal FourierReconstructor which i...
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.
static Reconstructor * NEW()
Factory incorporation uses the pointer of this function.
WienerFourierReconstructor(const WienerFourierReconstructor &that)
A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion ...
virtual string get_name() const
Get the unique name of the reconstructor.
virtual bool pixel_at(const float &xx, const float &yy, const float &zz, float *dt)
This is a mode-2 pixel extractor.
virtual string get_desc() const
Get the one line description of the reconstructor.
virtual EMData * finish(bool doift=true)
Get the reconstructed volume Normally will return the volume in real-space with the requested size.
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...
WienerFourierReconstructor()
Default constructor calls load_default_settings()
virtual ~WienerFourierReconstructor()
Deconstructor calls free_memory()
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.
WienerFourierReconstructor & operator=(const WienerFourierReconstructor &)
Disallow assignment.
virtual void do_insert_slice_work(const EMData *const input_slice, const Transform &euler, const float weight)
shared_ptr< std::ofstream > m_bin_ohandle
shared_ptr< std::ofstream > m_txt_ohandle
vector< float > m_defocuses
std::istream::off_type m_totsize
vector< float > m_thetas
void get_image(int id, EMData *padfft)
shared_ptr< std::ifstream > m_ihandle
vector< float > m_phis
vector< float > m_psis
void add_image(EMData *data, const Transform &tf)
file_store(const string &filename, int npad, int write, bool CTF)
vector< point_t > m_points
void add_tovol(EMData *fftvol, EMData *wgtvol, const vector< int > &mults, int pbegin, int pend)
shared_ptr< std::ifstream > m_bin_if
shared_ptr< std::ofstream > m_txt_of
vector< std::istream::off_type > m_offsets
newfile_store(const string &prefix, int npad, bool ctf)
void add_image(EMData *data, const Transform &tf)
void get_image(int id, EMData *buf)
shared_ptr< std::ofstream > m_bin_of
virtual string get_desc() const
Get a clear, concise description of this class.
static Reconstructor * NEW()
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual TypeDict get_param_types() const
virtual void setup()
Initialize the reconstructor.
static const string NAME
int insert_padfft_slice(EMData *padded, const Transform &trans, float mult=1)
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
nn4_ctf Direct Fourier Inversion Reconstructor
static Reconstructor * NEW()
TypeDict get_param_types() const
virtual string get_desc() const
Get a clear, concise description of this class.
int insert_padfft_slice(EMData *padfft, EMData *ctf2d2, const Transform &trans, float mult=1)
static const string NAME
virtual void setup()
Initialize the reconstructor.
int insert_buffed_slice(const EMData *buffer, float mult)
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 int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert a slice into a 3D volume, in a given orientation.
nn4_ctf_rectDirect Fourier Inversion Reconstructor
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
int insert_buffed_slice(const EMData *buffer, float mult)
static Reconstructor * NEW()
virtual void setup()
Initialize the reconstructor.
int insert_padfft_slice(EMData *padfft, const Transform &trans, float mult=1)
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.
virtual string get_desc() const
Get a clear, concise description of this class.
nn4_ctfw Direct Fourier Weighted Inversion Reconstructor
static const string NAME
virtual void setup()
Initialize the reconstructor.
int insert_padfft_slice_weighted(EMData *padfft, EMData *ctf2d2, vector< float > bckgnoise, const Transform &trans, const float weight)
virtual EMData * finish(bool compensate=true)
Finish reconstruction and return the complete model.
virtual string get_desc() const
Get a clear, concise description of this class.
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.
static Reconstructor * NEW()
TypeDict get_param_types() const
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
nn4_ctfws Direct Fourier Weighted Inversion Reconstructor for sorting
int insert_padfft_slice_weighted(EMData *padfft, EMData *ctf2d2, vector< float > bckgnoise, const Transform &trans, const float weight)
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.
static Reconstructor * NEW()
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual void setup()
Initialize the reconstructor.
virtual string get_desc() const
Get a clear, concise description of this class.
virtual EMData * finish(bool compensate=true)
Finish reconstruction and return the complete model.
TypeDict get_param_types() const
static const string NAME
Direct Fourier inversion Reconstructor for extremly rectangular object.
virtual void setup()
Initialize the reconstructor.
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
static Reconstructor * NEW()
static const string NAME
virtual TypeDict get_param_types() const
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
virtual string get_desc() const
Get a clear, concise description of this class.
int insert_padfft_slice(EMData *padded, const Transform &trans, float mult=1)
virtual int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
Insert an image slice to the reconstructor.
virtual EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
virtual void setup()
Initialize the reconstructor.
static Reconstructor * NEW()
static const string NAME
virtual string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
virtual TypeDict get_param_types() const
int insert_padfft_slice(EMData *padded, const Transform &trans, float mult=1)
virtual string get_desc() const
Get a clear, concise description of this class.
static Reconstructor * NEW()
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.
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 EMData * finish(bool doift=true)
Finish reconstruction and return the complete model.
virtual void setup()
Initialize the reconstructor.
int insert_padfft_slice(EMData *padded, const Transform &trans, float mult=1)
TypeDict get_param_types() const
void mult(int n)
multiply an integer number to each pixel value of the image.
Definition: emdata_core.h:97
void sub(float f)
subtract a float number to each pixel value of the image.
E2Exception class.
Definition: aligner.h:40
EMData * padfft_slice(const EMData *const slice, const Transform &t, int npad)
Direct Fourier inversion Reconstructor.
void dump_reconstructors()
map< string, vector< string > > dump_reconstructors_list()