Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

emdata_io.h

Go to the documentation of this file.
00001 
00005 /*
00006  * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu)
00007  * Probable contributing author: Liwei Peng
00008  * Copyright (c) 2000-2006 Baylor College of Medicine
00009  * 
00010  * This software is issued under a joint BSD/GNU license. You may use the
00011  * source code in this file under either license. However, note that the
00012  * complete EMAN2 and SPARX software packages have some GPL dependencies,
00013  * so you are responsible for compliance with the licenses of these packages
00014  * if you opt to use BSD licensing. The warranty disclaimer below holds
00015  * in either instance.
00016  * 
00017  * This complete copyright notice must be included in any revised version of the
00018  * source code. Additional authorship citations may be added, but existing
00019  * author citations must be preserved.
00020  * 
00021  * This program is free software; you can redistribute it and/or modify
00022  * it under the terms of the GNU General Public License as published by
00023  * the Free Software Foundation; either version 2 of the License, or
00024  * (at your option) any later version.
00025  * 
00026  * This program is distributed in the hope that it will be useful,
00027  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00028  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00029  * GNU General Public License for more details.
00030  * 
00031  * You should have received a copy of the GNU General Public License
00032  * along with this program; if not, write to the Free Software
00033  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00034  * 
00035  * */
00036 
00041 #ifndef emdata__io_h__
00042 #define emdata__io_h__ 
00043 
00044 
00045 public:
00064 void read_image(const string & filename, int img_index = 0,
00065                                 bool header_only = false,
00066                                 const Region * region = 0, bool is_3d = false);
00067 
00068 
00092 void write_image(const string & filename,
00093                                  int img_index = 0,
00094                                  EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
00095                                  bool header_only = false,
00096                                  const Region * region = 0,
00097                                  EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
00098                                  bool use_host_endian = true);
00099 
00100 
00108 void append_image(const string & filename,
00109                                   EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
00110                                   bool header_only = false);
00111 
00112 
00120 void write_lst(const string & filename, 
00121                            const string & reffile="", int refn=-1,
00122                            const string & comment="");
00123 
00124 
00129 void print_image(const string str = string(""), 
00130                 ostream& out = std::cout);
00131 
00132 
00143 static vector < boost::shared_ptr<EMData> >read_images(const string & filename,
00144                                                                           vector < int >img_indices = vector < int >(),
00145                                                                           bool header_only = false);
00146 
00147 
00160 static vector < boost::shared_ptr<EMData> >read_images_ext(const string & filename,
00161                                                                                   int img_index_start,
00162                                                                                   int img_index_end,
00163                                                                                   bool header_only = false,
00164                                                                                   const string & ext = "");
00165 
00166 #endif  //emdata__io_h__

Generated on Tue Jul 12 13:48:57 2011 for EMAN2 by  doxygen 1.3.9.1