00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
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 < EMData * >read_images(const string & filename,
00144 vector < int >img_indices = vector < int >(),
00145 bool header_only = false);
00146
00147
00160 static vector < 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__