| Bsoft 2.0.5 Bernard's software package

Functions | Variables
rwDM.cpp File Reference

Functions for reading and writing Digital Micrograph files. More...

`#include "rwDM.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
int | readFixedDMHeader (ifstream *fimg, Bimage *p, int readdata)
int | readTagGroupData (ifstream *fimg, int dim_flag, Bimage *p, int readdata)
int | readTagGroupWithVersion (ifstream *fimg, Bimage *p, int readdata, int img_select)
int | show (0)
int | keep (0)
int | version (0)
int | sb (0)
int | endianness (1)
size_t | level (0)
int | readDM (Bimage *p, int readdata, int img_select)
| Reading a Digital Micrograph image file format. More...
int | writeDM (Bimage *p)
| Writing a Digital Micrograph map image file format. More...
DataType | datatype_from_dm3_type (DMDataType dm3_type, Bimage *p)
int | dm3_type_length (int dm3_type)
double | dm3_value (ifstream *fimg, int dm3_type)
unsigned long | dm_read_integer (ifstream *fimg, long len)
int | tag_convert (unsigned char *tag)
int | readTag (ifstream *fimg, int dim_flag, Bimage *p, int readdata, int &notag)

## Variables
int | verbose

## Detailed Description

Functions for reading and writing Digital Micrograph files.

Author
  Bernard Heymann

Date
  Created: 20020619
  Modified: 20170126

Definition in file rwDM.cpp.

## Function Documentation

## ◆ datatype_from_dm3_type()

DataType datatype_from_dm3_type | ( | DMDataType | dm3_type,
|  | Bimage * | p
| ) |  |

Definition at line 121 of file rwDM.cpp.

## ◆ dm3_type_length()

int dm3_type_length | ( | int | dm3_type | ) |

Definition at line 275 of file rwDM.cpp.

## ◆ dm3_value()

double dm3_value | ( | ifstream * | fimg,
|  | int | dm3_type
| ) |  |

Definition at line 298 of file rwDM.cpp.

## ◆ dm_read_integer()

unsigned long dm_read_integer | ( | ifstream * | fimg,
|  | long | len
| ) |  |

Definition at line 342 of file rwDM.cpp.

## ◆ endianness()

int endianness | ( | 1 |  | ) |

## ◆ keep()

int keep | ( | 0 |  | ) |

## ◆ level()

size_t level | ( | 0 |  | ) |

## ◆ readDM()

int readDM | ( | Bimage * | p,
|  | int | readdata,
|  | int | img_select
| ) |  |

Reading a Digital Micrograph image file format.

Parameters

  *p | the image structure.
  readdata | flag to activate reading of image data.
  img_select | image selection in multi-image file (-1 = all images).

Returns
  int error code (<0 means failure). A 2D/3D image format used with CCD cameras in electron microscopy. File format extensions: .dm, .DM Two types: Fixed format (new) and the Macintosh format (old) Fixed format: Header size: 24 bytes (fixed). Byte order determination: An endian flag: Must be 65535 or swap everything Data types: many. Macintosh format: Hermitian Header size: 8 bytes (fixed). Byte order determination: Big-endian Data types: many.

Definition at line 41 of file rwDM.cpp.

## ◆ readFixedDMHeader()

int readFixedDMHeader | ( | ifstream * | fimg,
|  | Bimage * | p,
|  | int | readdata
| ) |  |

Definition at line 189 of file rwDM.cpp.

## ◆ readTag()

int readTag | ( | ifstream * | fimg,
|  | int | dim_flag,
|  | Bimage * | p,
|  | int | readdata,
|  | int & | notag
| ) |  |

Definition at line 376 of file rwDM.cpp.

## ◆ readTagGroupData()

int readTagGroupData | ( | ifstream * | fimg,
|  | int | dim_flag,
|  | Bimage * | p,
|  | int | readdata
| ) |  |

Definition at line 630 of file rwDM.cpp.

## ◆ readTagGroupWithVersion()

int readTagGroupWithVersion | ( | ifstream * | fimg,
|  | Bimage * | p,
|  | int | readdata,
|  | int | img_select
| ) |  |

Definition at line 684 of file rwDM.cpp.

## ◆ sb()

int sb | ( | 0 |  | ) |

## ◆ show()

int show | ( | 0 |  | ) |

## ◆ tag_convert()

int tag_convert | ( | unsigned char * | tag | ) |

Definition at line 365 of file rwDM.cpp.

## ◆ version()

int version | ( | 0 |  | ) |

## ◆ writeDM()

int writeDM | ( | Bimage * | p | ) |

Writing a Digital Micrograph map image file format.

Parameters

  *p | the image structure.

Returns
  int error code (<0 means failure). A 2D/3D image format used in electron microscopy.

Definition at line 81 of file rwDM.cpp.

## Variable Documentation

## ◆ verbose

int verbose