Skip to content

stephen-riggs/laser-map-segment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laser map segmentation

Segmentation of burnt regions on lasered EM grids

Setup

To use this create a python environment and install the following packages: pip install matplotlib mrcfile numpy xmltodict scipy membrain-seg

Use

To run the script the BatchPositionsList.xml and the SearchMap.mrc files from the ThermoFisher tomography software are needed. Additionally, a particles file can optionally be provided together with a key phrase to search for in that file.

python laser_grid_segment.py --batch_positions /path/to/BatchPositionsList.xml --search_maps /path/to/SearchMaps --membrain_ckpt /path/to/membrain/seg/ckpt --output /path/to/output/folder --particles /path/to/particles.star --key particle_name

Due to the way ThermoFisher record the batch locations, the hole positions may not exactly match the search map image. If that is observed, these can be manually shifted with the --x and --y parameters.

Further parameters are available to change the search map downscaling and thresholding, which are unlikely to need adjusting.

Outputs

The primary output of the script is an adjusted particles star file with distances added as a new column under the _rlnHelicalTubeId key. Text files containing the positions of each batch, and the distance from the burnt region are also made.

Intermediate outputs can be used to assess the quality of the segmentation. Three mrc files are created for each search map: an enhanced map, the map segmented using membrain-seg, and the final mask. For final assessement a jpg file of the positions and segmentation overlaid on the search map is made.

About

Segmentation of burnt regions on lasered EM grids

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages