Skip to content

2dx Source Code Structure

Nikhil Biyani edited this page Aug 17, 2016 · 1 revision

The development of 2dx started back in 2005. The aim was to provide the community with a user friendly software package for the image processing of 2D-Electron Crystallography. The so-called MRC software package, which was written in FORTRAN77, contained already many useful functions. 2dx started with merging these packages into scripts, which were called from a user-friendly GUI. Today, 2dx has a modern and appealing GUI application, developed in Qt4 which can be operated using Macintosh/Ubuntu/Fedora machines. The source code still contains many FORTRAN functions from the MRC software, but has more and more other functions, written in Python or C or C++.

The source code is divided into following major folders:

  • apps: contains all the GUI/apps which are made for 2dx (E.g.: 2dx_gui, 2dx_merge, 2dx_image, 2dx_automator etc.)
    • apps/src/: contains source code of GUI, involving Qt functions and routines
    • apps/resources/config/: contains all the files for configuration of parameters. If a parameter is to be added, this would be the the place to edit. Specifically it contains the file called 2dx_master.cfg contains all the parameter information
  • scripts/: contains all the scripts used for processing.
    • scripts/image: contains all image processing scripts
    • scripts/merge: contains all merging related scripts
    • scripts/project: contains all project related scripts
    • scripts/proc: contains all shared scripts
  • kernel:
    • kernel/toolkit/: contains all the source files of C++ toolkit used by 2DX
    • kernel/executables/: contains all the C++ executables which are based on the toolkit. A standalone new c++ script should be added here.
    • kernel/mrc/source/: contains all the functionality files required for the project.

Below applies to versions below 3.6.0

The source code provided on github is divided in the following directories:

  • 2dx_merge: contains all the Qt4 related files for 2dx_merge
  • 2dx_image: contains all Qt4 related files for 2dx_image
  • 2dx_logbrowser: contains Qt4 related files for the GUI log browser that appears when the logfile is opened in a different window
  • kernel:
    • kernel/mrc/source/: contains all the functionality files required for the project
    • kernel/config/: contains all the files for configuration of parameters. If a parameter is to be added, this would be the the place to edit. Specifically it contains the file called 2dx_master.cfg contains all the parameter information
    • kernel/proc: contains all the scripts which are run while processing the things in the software
    • kernel/2dx{image,merge}/scripts-{std,custom}: contains all the scripts which one sees in the GUI