fundamentals.h

Go to the documentation of this file.
00001 
00005 /*
00006  * Author: Pawel A.Penczek, 09/09/2006 (Pawel.A.Penczek@uth.tmc.edu)
00007  * Copyright (c) 2000-2006 The University of Texas - Houston Medical School
00008  *
00009  * This software is issued under a joint BSD/GNU license. You may use the
00010  * source code in this file under either license. However, note that the
00011  * complete EMAN2 and SPARX software packages have some GPL dependencies,
00012  * so you are responsible for compliance with the licenses of these packages
00013  * if you opt to use BSD licensing. The warranty disclaimer below holds
00014  * in either instance.
00015  *
00016  * This complete copyright notice must be included in any revised version of the
00017  * source code. Additional authorship citations may be added, but existing
00018  * author citations must be preserved.
00019  *
00020  * This program is free software; you can redistribute it and/or modify
00021  * it under the terms of the GNU General Public License as published by
00022  * the Free Software Foundation; either version 2 of the License, or
00023  * (at your option) any later version.
00024  *
00025  * This program is distributed in the hope that it will be useful,
00026  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00027  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00028  * GNU General Public License for more details.
00029  *
00030  * You should have received a copy of the GNU General Public License
00031  * along with this program; if not, write to the Free Software
00032  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00033  *
00034  */
00035 
00036 #ifndef eman_fundamentals_h
00037 #define eman_fundamentals_h
00038 
00039 #include <cstddef>
00040 
00041 
00061 namespace EMAN
00062 {
00063         class EMData;
00071         enum fp_flag {
00072                 CIRCULANT = 1,
00073                 CIRCULANT_NORMALIZED = 2,
00074                 PADDED = 3,
00075                 PADDED_NORMALIZED = 4,
00076                 PADDED_LAG = 5,
00077                 PADDED_NORMALIZED_LAG = 6
00078         };
00079 
00080         // You probably don't need to use these next two directly.
00081         enum fp_type {
00082                 CORRELATION,
00083                 CONVOLUTION,
00084                 SELF_CORRELATION,
00085                 AUTOCORRELATION
00086         };
00087 
00108         EMData* fourierproduct(EMData* f, EMData* g, fp_flag myflag,
00109                         fp_type mytype, bool center);
00128         inline EMData* correlation(EMData* f, EMData* g, fp_flag myflag, bool center) {
00129                 return fourierproduct(f, g, myflag, CORRELATION, center);
00130         }
00149         inline EMData* convolution(EMData* f, EMData* g, fp_flag myflag, bool center) {
00150                 return fourierproduct(f, g, myflag, CONVOLUTION, center);
00151         }
00165         EMData* rsconvolution(EMData* f, EMData* K);
00175         EMData* rscp(EMData* f);
00192         inline EMData* autocorrelation(EMData* f, fp_flag myflag, bool center) {
00193                 return fourierproduct(f, NULL, myflag, AUTOCORRELATION, center);
00194         }
00211         inline EMData* self_correlation(EMData* f, fp_flag myflag, bool center) {
00212                 return fourierproduct(f, NULL, myflag, SELF_CORRELATION, center);
00213         }
00230         EMData* periodogram(EMData* f);
00231 
00232         enum kernel_shape {
00233                 BLOCK = 1,
00234                 CIRCULAR = 2,
00235                 CROSS = 3
00236         };
00237 
00238         EMData* filt_median_(EMData* f, int nxk, int nyk, int nzk, kernel_shape myshape);
00259         enum morph_type {
00260                 BINARY = 1,
00261                 GRAYLEVEL = 2
00262         };
00263 
00264         EMData* filt_dilation_(EMData* f, EMData* K, morph_type mydilation);
00281         EMData* filt_erosion_(EMData* f, EMData* K, morph_type myerosion);
00297 }
00298 
00299 
00300 #endif // eman_fundamentals_h
00301 
00302 /* vim: set ts=4 noet: */

Generated on Tue May 25 17:13:32 2010 for EMAN2 by  doxygen 1.4.7