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_processor_template_h__ 00033 #define eman_processor_template_h__ 1 00034 00035 #include "processor.h" 00036 #include "emdata.h" 00037 00038 namespace EMAN 00039 { 00040 00048 class XYZProcessor:public Processor 00049 { 00050 public: 00051 void process_inplace(EMData * image); 00052 00053 string get_name() const 00054 { 00055 return "xyz"; 00056 } 00057 00058 static Processor *NEW() 00059 { 00060 return new XYZProcessor(); 00061 } 00062 00063 string get_desc() const 00064 { 00065 return "add your documentation here."; 00066 } 00067 00076 TypeDict get_param_types() const 00077 { 00078 TypeDict d; 00079 d.put("value1", EMObject::INT); 00080 d.put("value2", EMObject::FLOAT); 00081 return d; 00082 } 00083 }; 00084 00085 00086 // class SubstituteZeroPixelsProcessor:public Processor 00087 // { 00088 // public: 00089 // void process_inplace(EMData * image); 00090 // 00091 // string get_name() const 00092 // { 00093 // return "substitute.zeropixels"; 00094 // } 00095 // 00096 // static Processor *NEW() 00097 // { 00098 // return new SubstituteZeroPixelsProcessor(); 00099 // } 00100 // 00101 // string get_desc() const 00102 // { 00103 // return "Replaces zero pixels in the image with corresponding (coordinate-wise) pixel values in the EMData object specified in the parameters."; 00104 // } 00105 // 00106 // TypeDict get_param_types() const 00107 // { 00108 // TypeDict d; 00109 // d.put("image", EMObject::EMDATA, "EMData object that contains useful image data"); 00110 // return d; 00111 // } 00112 // }; 00113 00116 class FilterFactoryExt 00117 { 00118 public: 00119 FilterFactoryExt() 00120 { 00121 //Factory < Processor >::add(&XYZProcessor::NEW); 00122 // Factory < Processor >::add(&SubstituteZeroPixelsProcessor::NEW); 00123 } 00124 }; 00125 00126 static FilterFactoryExt filter_factory_ext; 00127 00128 } 00129 00130 00131 #endif //eman_processor_template_h__
1.5.6