43 bool header_only =
false,
44 const Region * region = 0,
bool is_3d =
false);
48 EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
49 bool header_only =
false,
50 const Region * region = 0,
51 EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
52 bool use_host_endian =
true);
73void read_image(
const string & filename,
int img_index = 0,
74 bool header_only =
false,
75 const Region * region = 0,
bool is_3d =
false,
76 EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN);
89void read_binedimage(
const string & filename,
int img_index = 0,
int binfactor=0,
bool fast =
false,
bool is_3d =
false);
117 EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
118 bool header_only =
false,
119 const Region * region = 0,
120 EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
121 bool use_host_endian =
true);
132 EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
133 bool header_only =
false);
143 const string & reffile=
"",
int refn=-1,
144 const string & comment=
"");
157static vector<std::shared_ptr<EMData>>
read_images(
const string & filename,
158 vector<int> img_indices = vector<int>(),
159 EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
160 bool header_only =
false);
175 vector<std::shared_ptr<EMData>> imgs,
176 EMUtil::ImageType imgtype = EMUtil::IMAGE_UNKNOWN,
177 bool header_only =
false,
178 const Region * region =
nullptr,
179 EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
180 bool use_host_endian =
true);
void write_lst(const string &filename, const string &reffile="", int refn=-1, const string &comment="")
Append data to a LST image file.
void append_image(const string &filename, EMUtil::ImageType imgtype=EMUtil::IMAGE_UNKNOWN, bool header_only=false)
append to an image file; If the file doesn't exist, create one.
void read_binedimage(const string &filename, int img_index=0, int binfactor=0, bool fast=false, bool is_3d=false)
read in a binned image, bin while reading.
void _read_image(ImageIO *imageio, int img_index=0, bool header_only=false, const Region *region=0, bool is_3d=false)
This file is a part of "emdata.h", to use functions in this file, you should "#include "emdata....
friend ostream & operator<<(ostream &out, const EMData &obj)
void write_image(const string &filename, int img_index=0, EMUtil::ImageType imgtype=EMUtil::IMAGE_UNKNOWN, bool header_only=false, const Region *region=0, EMUtil::EMDataType filestoragetype=EMUtil::EM_FLOAT, bool use_host_endian=true)
write the header and data out to an image.
static vector< std::shared_ptr< EMData > > read_images(const string &filename, vector< int > img_indices=vector< int >(), EMUtil::ImageType imgtype=EMUtil::IMAGE_UNKNOWN, bool header_only=false)
Read a set of images from file specified by 'filename'.
void _write_image(ImageIO *imageio, int img_index=0, EMUtil::ImageType imgtype=EMUtil::IMAGE_UNKNOWN, bool header_only=false, const Region *region=0, EMUtil::EMDataType filestoragetype=EMUtil::EM_FLOAT, bool use_host_endian=true)
void read_image(const string &filename, int img_index=0, bool header_only=false, const Region *region=0, bool is_3d=false, EMUtil::ImageType imgtype=EMUtil::IMAGE_UNKNOWN)
read an image file and stores its information to this EMData object.
static bool write_images(const string &filename, vector< std::shared_ptr< EMData > > imgs, EMUtil::ImageType imgtype=EMUtil::IMAGE_UNKNOWN, bool header_only=false, const Region *region=nullptr, EMUtil::EMDataType filestoragetype=EMUtil::EM_FLOAT, bool use_host_endian=true)
Write a set of images to file specified by 'filename'.