/Users/bernard/b20/bsoft/src/rwparam/rwmgIMOD.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/rwparam/rwmgIMOD.cpp - Converts between IMOD files and a micrograph parameter file.

SYNOPSIS

#include 'rwmgIMOD.h'
#include 'mg_img_proc.h'
#include 'mg_tomography.h'
#include 'rwmg.h'
#include 'rwimg.h'
#include 'linked_list.h'

  Functions
int read_imod_xf (Bstring &filename, Bproject *project)
int read_imod_tlt (Bstring &filename, Bproject *project)
int read_imod_xyz (Bstring &filename, Breconstruction *rec)
int read_imod_fid (Bstring &filename, Bproject *project)
int read_project_imod (Bstring *file_list, Bproject *project, int flag)
Creates a project structure using IMOD parameters.
int write_imod_xf (Bstring &imodfile, Bproject *project)
int write_imod_tlt (Bstring &imodfile, Bproject *project)
int write_imod_xyz (Bstring &imodfile, Bproject *project)
int write_project_imod (Bstring &imodfile, Bproject *project)
Creates IMOD parameter files from a project structure.

  Variables
int verbose

Detailed Description

Converts between IMOD files and a micrograph parameter file.

Author:
    Bernard Heymann

Date:
    Created: 20070501

    Modified: 20170120

Definition in file rwmgIMOD.cpp.

Function Documentation

  int read_imod_fid (Bstring & filename, Bproject * project)

Definition at line 129 of file rwmgIMOD.cpp.

  int read_imod_tlt (Bstring & filename, Bproject * project)

Definition at line 48 of file rwmgIMOD.cpp.

  int read_imod_xf (Bstring & filename, Bproject * project)

Definition at line 20 of file rwmgIMOD.cpp.

  int read_imod_xyz (Bstring & filename, Breconstruction * rec)

Definition at line 74 of file rwmgIMOD.cpp.

  int read_project_imod (Bstring * file_list, Bproject * project, int flag)

Creates a project structure using IMOD parameters.

Parameters:
    *file_list list of IMOD parameter file names.
    *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 242 of file rwmgIMOD.cpp.

  int write_imod_tlt (Bstring & imodfile, Bproject * project)

Definition at line 373 of file rwmgIMOD.cpp.

  int write_imod_xf (Bstring & imodfile, Bproject * project)

Definition at line 334 of file rwmgIMOD.cpp.

  int write_imod_xyz (Bstring & imodfile, Bproject * project)

Definition at line 395 of file rwmgIMOD.cpp.

  int write_project_imod (Bstring & imodfile, Bproject * project)

Creates IMOD parameter files from a project structure.

Parameters:
    imodfile IMOD parameter file name.
    project project structure.

Returns:
    int 0.

    Writes both .xf, .tlt and .xyz files.
    Calculations:
        Tilt angle: from micrograph tilt angle
        Matrix: A = {cos(ta), -sin(ta), sin(ta), cos(ta)}
        Shift:  d = o - on
    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 451 of file rwmgIMOD.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.