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
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__