47 void add(
const string & name,
const string & value);
51 int get_int(
const string & name);
89 std::map < string, string >
tags;
121 int read_tag_data(
bool nodata =
false,
int image_index = 0,
int num_images = 1);
126 int read_any(
bool nodata =
false,
int image_index = 0,
int num_images = 1);
129 int read_array_data(vector < int >item_types,
bool nodata =
false,
int image_index = 0,
int num_images = 1);
147 int read_tag_group(
bool nodata =
false,
int image_index = 0,
int num_images = 1);
170 int read_tag_entry(
bool nodata =
false,
int image_index = 0,
int num_images = 1);
256 static bool is_valid(
const void *first_block);
static bool is_host_big_endian()
static void swap_bytes(T *data, size_t n=1)
swap the byte order of data with 'n' T-type elements.
Gatan DM$ was introduced with the GMS 2.0 release.
int get_nimg()
Return the number of images in this image file.
GatanDM4::TagTable * tagtable
DM4IO(const string &fname, IOMode rw_mode=READ_ONLY)
static bool is_valid(const void *first_block)
int read_tag_data(bool nodata=false, int image_index=0, int num_images=1)
string read_string(int size)
TagData(FILE *data_file, TagTable *tagtable, const string &tagname)
vector< int > read_array_types()
int read_any(bool nodata=false, int image_index=0, int num_images=1)
int read_array_data(vector< int >item_types, bool nodata=false, int image_index=0, int num_images=1)
string read_native(bool is_value_stored)
vector< int > read_struct_types()
TagEntry(FILE *data_file, TagTable *tagtable, TagGroup *parent_group)
int read_tag_entry(bool nodata=false, int image_index=0, int num_images=1)
int read_tag_group(bool nodata=false, int image_index=0, int num_images=1)
TagGroup(FILE *data_file, TagTable *tagtable, const string &groupname)
static const char * IMAGE_HEIGHT_TAG
std::map< string, string > tags
int get_num_images_found() const
int get_int(const string &name)
vector< int > datatype_list
void become_host_endian(T *data, int n=1)
void set_endian(bool big_endian)
double get_double(const string &name)
static const char * IMAGE_NIMG_TAG
void set_num_images_found(int num_found)
string get_string(const string &name)
void add(const string &name, const string &value)
static const char * IMAGE_THUMB_INDEX_TAG
int get_image_counted() const
static const char * IMAGE_WIDTH_TAG
void set_thumb_index(int i)
void add_data(char *data)
vector< char * > data_list
float get_float(const string &name)
static const char * IMAGE_DATATYPE_TAG
ImageIO classes are designed for reading/writing various electron micrography image formats,...
int to_em_datatype(int gatan_datatype)
const char * to_str(GatanDM4::TagData::Type type)