| Bsoft 2.0.5 Bernard's software package

Functions | Variables
rwmgSerialEM.cpp File Reference

Converts between a SerialEM MDOC file and a micrograph parameter file. More...

`#include "rwmgSerialEM.h"`
`#include "mg_img_proc.h"`
`#include "mg_tomography.h"`
`#include "rwmg.h"`
`#include "rwimg.h"`
`#include "mdoc.h"`
`#include "linked_list.h"`

Go to the source code of this file.

## Functions
int | read_project_serialem (Bstring &filename, Bproject *project, int flag)
| Creates a project structure using SerialEM MDOC parameters. More...
int | write_project_serialem (Bstring &filename, Bproject *project)
| Creates SerialEM MDOC files from a project structure. More...

## Variables
int | verbose

## Detailed Description

Converts between a SerialEM MDOC file and a micrograph parameter file.

Author
  Bernard Heymann

Date
  Created: 20190109
  Modified: 20190109

Definition in file rwmgSerialEM.cpp.

## Function Documentation

## ◆ read_project_serialem()

int read_project_serialem | ( | Bstring & | filename,
|  | Bproject * | project,
|  | int | flag
| ) |  |

Creates a project structure using SerialEM MDOC parameters.

Parameters

  filename | SerialEM MDOC file name.
  *project | initialized project structure.
  flag | flag to indicate conversion of the image file.

Returns
  int error code (<0 means failure).

      Requirements:
          Tilt series micrograph image (if 3D then converted to multi-2D)
          2D transform file (.xf)
          Tilt angle file (.tlt)
      Calculations:
          Tilt angle: from tilt angle file
          Tilt axis: ta = (atan2(-A11, A12) + atan2(-A22, -A21))/2
          Mg origin: o = on - Ad
      where
          A:  2x2 transformation matrix
          ta: tilt axis angle
          on: nominal micrograph origin (center of mg)
          o:  aligned micrograph origin
          d:  shift for micrograph

Definition at line 44 of file rwmgSerialEM.cpp.

## ◆ write_project_serialem()

int write_project_serialem | ( | Bstring & | filename,
|  | Bproject * | project
| ) |  |

Creates SerialEM MDOC files from a project structure.

Parameters

  filename | SerialEM MDOC file name.
  project | project structure.

Returns
  int 0.

Definition at line 173 of file rwmgSerialEM.cpp.

## Variable Documentation

## ◆ verbose

int verbose