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 
00079 void read_binedimage(const string & filename, int img_index = 0, int binfactor=0, bool fast = false, bool is_3d = false);
00080 
00081 
00105 void write_image(const string & filename,
00106                                  int img_index = 0,
00107                                  EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
00108                                  bool header_only = false,
00109                                  const Region * region = 0,
00110                                  EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
00111                                  bool use_host_endian = true);
00112 
00113 
00121 void append_image(const string & filename,
00122                                   EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
00123                                   bool header_only = false);
00124 
00125 
00133 void write_lst(const string & filename, 
00134                            const string & reffile="", int refn=-1,
00135                            const string & comment="");
00136 
00137 
00142 void print_image(const string str = string(""), 
00143                 ostream& out = std::cout);
00144 
00145 
00156 static vector < boost::shared_ptr<EMData> >read_images(const string & filename,
00157                                                                           vector < int >img_indices = vector < int >(),
00158                                                                           bool header_only = false);
00159 
00160 
00173 static vector < boost::shared_ptr<EMData> >read_images_ext(const string & filename,
00174                                                                                   int img_index_start,
00175                                                                                   int img_index_end,
00176                                                                                   bool header_only = false,
00177                                                                                   const string & ext = "");
00178 
00179 #endif  //emdata__io_h__

Generated on Tue Jun 11 13:46:14 2013 for EMAN2 by  doxygen 1.3.9.1