EMAN2
reconstructor_template.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#ifndef eman_reconstructor_template_h__
33#define eman_reconstructor_template_h__ 1
34
35#include "reconstructor.h"
36
37namespace EMAN
38{
39
48 {
49 public:
52
55 void setup();
56
60 int insert_slice(const EMData * const slice, const Transform & euler,const float weight);
61
64 EMData *finish(bool doift);
65
66 string get_name() const
67 {
68 return NAME;
69 }
70 string get_desc() const
71 {
72 return "XYZ Description";
73 }
74
76 {
77 return new XYZReconstructor();
78 }
79
90 {
91 TypeDict d;
92 d.put("size", EMObject::INT);
93 d.put("padratio", EMObject::FLOAT);
94 d.put("snr", EMObject::FLOATARRAY);
95 return d;
96 }
97
98 static const string NAME;
99 private:
101 int nx;
102 int ny;
103 int nz;
104 };
105
108// class ReconstructorFactoryExt
109// {
110// public:
111// ReconstructorFactoryExt()
112// {
113// Factory < Reconstructor >::add<XYZReconstructor>();
114// }
115// };
116//
117// static ReconstructorFactoryExt rf_ext;
118}
119
120
121#endif
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
Reconstructor class defines a way to do 3D recontruction.
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
XYZReconstructor is a reconstructor template for defining new reconstructors.
TypeDict get_param_types() const
Add your reconstructor parameter names and types in get_param_types().
string get_name() const
Get the unique name of this class (especially for factory based instantiation access)
static Reconstructor * NEW()
int insert_slice(const EMData *const slice, const Transform &euler, const float weight)
insert each image slice to the reconstructor.
EMData * finish(bool doift)
finish reconstruction and return the complete model.
string get_desc() const
Get a clear, concise description of this class.
void setup()
initialize the reconstructor
E2Exception class.
Definition: aligner.h:40