EMAN2
aligner_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_aligner_template_h__
33#define eman_aligner_template_h__ 1
34
35#include "aligner.h"
36
37namespace EMAN
38{
39
47 class XYZAligner:public Aligner
48 {
49 public:
50 EMData * align(EMData * this_img, EMData * to_img,
51 const string & cmp_name, const Dict& cmp_params) const;
52
53 EMData * align(EMData * this_img, EMData * to_img) const
54 {
55 return align(this_img, to_img);
56 }
57
58 string get_name() const
59 {
60 return NAME;
61 }
62
63 string get_desc() const
64 {
65 return "XYZ description";
66 }
67
68 static Aligner *NEW()
69 {
70 return new XYZAligner();
71 }
72
83 {
84 TypeDict d;
85
86 d.put("param1", EMObject::INT);
87 d.put("param2", EMObject::FLOAT);
88 return d;
89 }
90
91 static const string NAME;
92 };
93
94
97// class AlignerFactoryExt
98// {
99// public:
100// AlignerFactoryExt()
101// {
102// Factory < Aligner >::add<XYZAligner>();
103// }
104// };
105//
106// static AlignerFactoryExt aligner_factory_ext;
107}
108
109#endif
Aligner class defines image alignment method.
Definition: aligner.h:81
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
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
XYZAligner is an aligner template for defining new aligners.
static Aligner * NEW()
EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name, const Dict &cmp_params) const
To align 'this_img' with another image passed in through its parameters.
TypeDict get_param_types() const
Add your aligner parameter names and types in get_param_types().
string get_name() const
Get the Aligner's name.
string get_desc() const
EMData * align(EMData *this_img, EMData *to_img) const
static const string NAME
E2Exception class.
Definition: aligner.h:40