{"id":13716794,"url":"https://github.com/lukmuk/em-scalebartools","last_synced_at":"2025-05-07T06:31:48.807Z","repository":{"id":45561922,"uuid":"394599605","full_name":"lukmuk/em-scalebartools","owner":"lukmuk","description":"Fiji/ImageJ macros to quickly add a scale bar to an (electron microscopy) image.","archived":false,"fork":false,"pushed_at":"2025-04-23T09:23:37.000Z","size":62963,"stargazers_count":12,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T10:20:51.824Z","etag":null,"topics":["electron-microscopy","fiji","imagej","scalebar"],"latest_commit_sha":null,"homepage":"","language":"ImageJ Macro","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukmuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-10T09:41:11.000Z","updated_at":"2025-04-23T09:23:41.000Z","dependencies_parsed_at":"2025-04-23T10:20:16.749Z","dependency_job_id":"8a341540-556b-433f-982d-98be96b44725","html_url":"https://github.com/lukmuk/em-scalebartools","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukmuk%2Fem-scalebartools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukmuk%2Fem-scalebartools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukmuk%2Fem-scalebartools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukmuk%2Fem-scalebartools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukmuk","download_url":"https://codeload.github.com/lukmuk/em-scalebartools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252826878,"owners_count":21810197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron-microscopy","fiji","imagej","scalebar"],"created_at":"2024-08-03T00:01:14.450Z","updated_at":"2025-05-07T06:31:43.798Z","avatar_url":"https://github.com/lukmuk.png","language":"ImageJ Macro","funding_links":[],"categories":["Electron and super resolution microscopy"],"sub_categories":[],"readme":"# EMScaleBarTools\n\nFiji macro toolset to quickly add a scale bar with reasonable size to an image. Developed for electron microscopy.\n| :exclamation:  Please double-check the scale-bar length for possible rounding errors, especially if it shows 1 µm, 1 nm, 1 mm, ... . |\n|-----------------------------------------|\n\u003cimg title=\"Basic usage\" src=\"images/EMscalebartools_00.gif\" alt=\"Example\" data-align=\"left\" width=\"450\"\u003e  \nImage source: Cropped image of Cobaea scandens (https://commons.wikimedia.org/wiki/File:Cobaea_scandens1-4.jpg) pollen by Marie Majaura from Wikipedia (https://en.wikipedia.org/wiki/Scanning_electron_microscope).\n\n\n## Examples\n\nUsing QuickScaleBar on a HRTEM image. Note the similar size of the scale bars for the 4096²  image (center) and the cropped 512² ROI image (right).\n\n\u003cimg title=\"Example 0\" src=\"images/example0.png\" alt=\"Example\" data-align=\"center\"\u003e\n\nUsing FEI Crop Scalebar on an SEM image.\n\n\u003cimg title=\"Example 1\" src=\"images/example1.png\" alt=\"Example\" data-align=\"center\"\u003e\n\nBatch conversion of SEM images (``Process -\u003e Batch -\u003e Macro...``) from tiff to png using ``FEI_Crop_Scalebar.ijm``.\n\n\u003cimg title=\"Example 1\" src=\"images/example2.png\" alt=\"Example\" data-align=\"center\"\u003e\n\n[Hotkeys](https://github.com/lukmuk/em-scalebartools/wiki/Hotkeys) can be used to quickly adjust the scale-bar appearance.  \n\nIn-/Decreasing scale-bar length:  \n\u003cimg title=\"Basic usage\" src=\"https://github.com/lukmuk/em-scalebartools/blob/main/images/hotkeys_4-6.gif\" alt=\"Basic usage\" data-align=\"left\" width=\"450\"\u003e  \n\nIn-/Decreasing scale-bar size:  \n\u003cimg title=\"Basic usage\" src=\"https://github.com/lukmuk/em-scalebartools/blob/main/images/hotkeys_2-8.gif\" alt=\"Basic usage\" data-align=\"left\" width=\"450\"\u003e  \n\n## EMScaleBarTools in action\n\nExamples are from v0.2.\n\nBasic usage with cropping of a TFS/FEI databar, addition of a scale bar, moving and removing of the scale bar:\n\u003cimg title=\"Basic usage\" src=\"images/EMscalebartools_01.gif\" alt=\"Example\" data-align=\"center\"\u003e\n\nThe next GIF shows the application of `Auto re-scale images` to upscale a small (in pixels) inset of an image:\n\u003cimg title=\"Using Auto re-scale\" src=\"images/EMscalebartools_02.gif\" alt=\"Example\" data-align=\"center\"\u003e\n\nThe next GIF shows an example workflow when working with presentations (here Microsoft PowerPoint). For a horizontal alignment of images (here an SEM and an HAADF-STEM image) with the same desired image height, the scale bar reference is switched to `Height`. Note the automatic handling of unit-switching and rescaling as in the previous example. The image are then copied via the hotkey c to the system clipboard and pasted into PowerPoint.\n\u003cimg title=\"Workflow for presentations\" src=\"images/EMscalebartools_03.gif\" alt=\"Example\" data-align=\"center\"\u003e\n\n## Macro description\n\n##### QuickScaleBar Tool (Icon: \u003cu\u003eSB\u003c/u\u003e)\n\n* One-click action to add a scale bar to an image. Right click opens the options menu.\n\n* The scale bar height and font size is adjusted based on image height (or width).\n\n* The scale bar width is adjusted based on scaled image width (or height, or larger/smaller of the two) and rounded to next \"good looking\" number.\n\n* The scale bar appearance can be set up just like the normal settings for `Analyze -\u003e Tools -\u003e Scale bar...`.\n\n* Optional: Automatically switch units to make scale bar more appealing. E.g., an image with horizontal field width of 0.25 µm will be switched to 250 nm. The scale bar will then also be in nm.\n\n* Optional: Automatically re-scale image to (at least) a specified image size in pixels without interpolation (= nearest neighbor interpolation). This is convenient for programs like PowerPoint which like to automatically interpolate \"small\" images.\n\n* Optional: Run custom macro commands provided in the options menu, e.g. `run('mpl-viridis');` to change LUT to viridis.\n\n##### FEI Crop Scalebar Tool (Icon: FEI)\n\n* One-click action to crop away the databar from an FEI/TFS SEM/FIB image and to add a scale bar. Right click opens the options menu.\n\n* Scale bar behaviour is the same as for QuickScaleBar tool and settings are taken from the QuickScaleBar options.\n\n* Optional: Run custom macro commands provided in the options menu, e.g. `run('mpl-viridis');` to change LUT to viridis.\n\n* Especially useful for batch conversion of SEM/FIB images (run from `Process -\u003e Batch -\u003e Macro...` ): In the batch processing menu insert the macro command `runMacro('FEI_Crop_Scalebar.ijm');`.\n\nFor a description of the other tools, take a look at the [wiki](https://github.com/lukmuk/em-scalebartools/wiki). 🗒\n\n## Requirements and Installation\n\n* Cropping the FEI/TFS info bar requires the useful [EM tool](https://imagej.net/plugins/imbalence) plugin by **IMBalENce**  as FEI/TFS images are scaled with [SEM FEI metadata scale](https://imagej.net/plugins/sem-fei-metadata-scale). Install via the Fiji update site.\n\n* Download the latest [release](https://github.com/lukmuk/em-scalebartools/releases), extract the `macros` folder, and copy it to your Fiji installation folder. It will add the``FEI_Crop_Scalebar.ijm`` macro to the macros folder and the `EMScaleBarTools.ijm` toolset to the `macros/toolset` folder.\n\n* Restart Fiji and select the `EMScaleBarTools` from `More Tools...` (\u003e\u003e) menu. \n\n## [Documentation](https://github.com/lukmuk/em-scalebartools/wiki)\n\n## [Changelog](https://github.com/lukmuk/em-scalebartools/wiki/Changelog)\n\n## Other useful scalebar tools\n\n* Python: [matplotlib-scalebar](https://github.com/ppinard/matplotlib-scalebar) by ppinard\n\n* DM/GMS: [Scale Bar Control](http://www.dmscripting.com/scalebarcontrol.html) by D. R. G. Mitchell\n\n* Fiji/ImageJ: [asc-ImageJ-Fancy-Labels](https://github.com/peterjlee/asc-ImageJ-Fancy-Labels) by peterjlee\n\n* Fiji/ImageJ: [Scale Bar Tools for Microscopes](http://image.bio.methods.free.fr/ImageJ/?Scale-Bar-Tools-for-Microscopes.html\u0026lang=en) by Gilles Carpentier\n\n## Citing\n\nIf you want, you can cite this project via Zenodo:  \n  \n[![DOI](https://zenodo.org/badge/394599605.svg)](https://zenodo.org/badge/latestdoi/394599605)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukmuk%2Fem-scalebartools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukmuk%2Fem-scalebartools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukmuk%2Fem-scalebartools/lists"}