00001 /* 00002 * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu) 00003 * Copyright (c) 2000-2006 Baylor College of Medicine 00004 * 00005 * This software is issued under a joint BSD/GNU license. You may use the 00006 * source code in this file under either license. However, note that the 00007 * complete EMAN2 and SPARX software packages have some GPL dependencies, 00008 * so you are responsible for compliance with the licenses of these packages 00009 * if you opt to use BSD licensing. The warranty disclaimer below holds 00010 * in either instance. 00011 * 00012 * This complete copyright notice must be included in any revised version of the 00013 * source code. Additional authorship citations may be added, but existing 00014 * author citations must be preserved. 00015 * 00016 * This program is free software; you can redistribute it and/or modify 00017 * it under the terms of the GNU General Public License as published by 00018 * the Free Software Foundation; either version 2 of the License, or 00019 * (at your option) any later version. 00020 * 00021 * This program is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU General Public License 00027 * along with this program; if not, write to the Free Software 00028 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00029 * 00030 * */ 00031 00032 #ifndef eman_reconstructor_template_h__ 00033 #define eman_reconstructor_template_h__ 1 00034 00035 #include "reconstructor.h" 00036 00037 namespace EMAN 00038 { 00039 00047 class XYZReconstructor:public Reconstructor 00048 { 00049 public: 00050 XYZReconstructor(); 00051 ~XYZReconstructor(); 00052 00055 void setup(); 00056 00060 int insert_slice(const EMData * const slice, const Transform & euler,const float weight); 00061 00064 EMData *finish(bool doift); 00065 00066 string get_name() const 00067 { 00068 return NAME; 00069 } 00070 string get_desc() const 00071 { 00072 return "XYZ Description"; 00073 } 00074 00075 static Reconstructor *NEW() 00076 { 00077 return new XYZReconstructor(); 00078 } 00079 00089 TypeDict get_param_types() const 00090 { 00091 TypeDict d; 00092 d.put("size", EMObject::INT); 00093 d.put("padratio", EMObject::FLOAT); 00094 d.put("snr", EMObject::FLOATARRAY); 00095 return d; 00096 } 00097 00098 static const string NAME; 00099 private: 00100 EMData * image; 00101 int nx; 00102 int ny; 00103 int nz; 00104 }; 00105 00108 // class ReconstructorFactoryExt 00109 // { 00110 // public: 00111 // ReconstructorFactoryExt() 00112 // { 00113 // Factory < Reconstructor >::add<XYZReconstructor>(); 00114 // } 00115 // }; 00116 // 00117 // static ReconstructorFactoryExt rf_ext; 00118 } 00119 00120 00121 #endif