pyRECONSTRUCT Protocol

NOTE: This is a tool created by Michael Musselwhite ca. 2016. This is different from PyReconstruct of 2023.

For remote installation of the latest pyRECONSTRUCT version onto your computer:

https://github.com/musslebot/pyrecon/archive/refactor.zip

Unzip and place in the desktop.

Preliminary requirements before starting the merge tool:

  • Make sure there is only one .ser file in the directory.
  • When using multiple series, rename the other series so they all have unique names.
  • The program works best with .tif images.

To start the merge tool:

  1. On the left hand side of the screen, navigate to the bottom of the Dock to the black box icon. This opens the Terminal.
  2. If you are on the kh-lab ubuntu computer, input the following:
    • "cd ~/Desktop/pyrecon"
  3. If you are on your own computer, type "cd" without quotations, and then the path file to the pyrecon directory.
    • Alternatively, you can type "ls" to list the child pathways and "cd PATHWAY_NAME" to travel through each child directory.
  4. In terminal, once you have navigated to the pyrecon directory, input the following without quotations:
    • "python3 start.py"

For first-time use:

  1. The program will ask if you are restoring from a previous merge tool session. Select "No".
  2. The program will ask you to load a series. Select "Load Series..." and navigate to the series in question.
    • If you are loading from multiple series, select "Add Series..." and repeat navigate to the additional series.
    • Repeat this if necessary for the series you are merging.
  3. If you have selected multiple series:
    • The program will ask if the multiple series have differing alignments or attributes. This could include:
      • the traces are transformed differently
      • the images have differing contrasts
      • the images are transformed differently
    • If "yes", select the base series that you would like to output to.
      • These transforms and image attributes will be kept.
      • When importing traces from a series that is differently aligned, the user must review these traces in Reconstruct because they will not match the transformations of the series they originally came from.
  4. The program will begin.
  5. The loading screen will pop up, which shows a loading bar that indicates the progress of the merge tool. It is currently forming matches and generating a .json file that can be used in the future.
  6. Once the main window pops up, a directory is created within the series directory titled 'merged'. This stores a .json file that allows you to return to your session without generating matches again.

If you are returning to a previous merge tool session:

  1. The program will ask if you are restoring from a previous merge tool session. Select "Yes".
  2. The program will ask you to load a .json file. Navigate to the directory of the .json file.
    • Usually, the .json file will be in a folder nested in the series directory, titled "merged".
  • Note: When restoring from a previous session, the program will reorganize everything in order of section. The 2 columns will retain the same traces in their corresponding columns.

Using the Program

There are two columns where traces will appear. The columns do not alter the resolution status of the trace, but serve simply as a marker for what the user has resolved.

  • The left column is "Unresolved Potential Duplicates". The right column is "Resolved Duplicates, Exact Duplicates, and Unique Traces".
  • The left column is optimal for revision of traces. The right-click button will allow you to:
    • Resolve the selected matches
    • Transfer the selected matches
    • Select all traces that are shown on the left
    • Select all traces that are shown on the right
    • Deselect All Traces (Do not keep any traces from the matches selected)
    • Select All Traces (Keep all traces from the matches selected)


    • Red color: potential duplicates
    • Orange color: potential realigned duplicates
    • Yellow color: Exact duplicates
    • Green color: Unique traces


The traces have already been altered to fit optimal needs. This includes:

    • All exact duplicates have been altered so that only 1 trace is kept from the base series.
    • Potential duplicates have all of their traces kept.
    • Potential realigned duplicates have all of their traces kept.

Double click on a match to open the resolve dialog. Any trace to be kept should be checked. You may change the name as well. Make sure to hit "Save" when completing a resolution, or else the change will not be saved.

Saving Your Resolutions

  1. If you are saving the current status, select "Save Current Status" or "File... Save Resolutions". This will create a new .json that can be found in a "merged" folder nested within the series directory. This .json file can be used to return to your session of the merge tool.
  2. If you are outputting a new .ser file, select "Resolve Complete". This will generate the section files and .ser file in a "merged" folder nested within the series directory.


For any problems or questions, please contact mdmusslewhite@gmail.com.