EMAN2
projector_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_projector_template_h__
33#define eman_projector_template_h__ 1
34
35#include "projector.h"
36
37
38namespace EMAN
39{
40
49 {
50 public:
51 EMData * project3d(EMData * em) const;
52// chao added
53 EMData * backproject3d(EMData * em) const;
54
55 string get_name() const
56 {
57 return NAME;
58 }
59
60 string get_desc() const
61 {
62 return "XYZ Description";
63 }
64
65 static Projector *NEW()
66 {
67 return new XYZProjector();
68 }
78 {
79 TypeDict d;
80 d.put("param1", EMObject::FLOAT);
81 d.put("param2", EMObject::INT);
82 return d;
83 }
84
85 static const string NAME;
86 };
87
90// class ProjectorFactoryExt
91// {
92// public:
93// ProjectorFactoryExt()
94// {
95// Factory < Projector >::add<XYZProjector>();
96// }
97// };
98//
99//
100// static ProjectorFactoryExt pf_ext;
101}
102
103#endif
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
Projector class defines a method to generate 2D projections from a 3D model.
Definition: projector.h:78
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
XYZProjector is an projector template for defining new projectors.
EMData * backproject3d(EMData *em) const
Back-project a 2D image into a 3D image.
string get_name() const
Get the projector's name.
EMData * project3d(EMData *em) const
Project an 3D image into a 2D image.
string get_desc() const
TypeDict get_param_types() const
Add your projector parameter names and types in get_param_types().
static Projector * NEW()
static const string NAME
E2Exception class.
Definition: aligner.h:40