Skip to content

Commit 5a2ce5e

Browse files
author
Gabriel Ing
committed
updated README info
1 parent bf73042 commit 5a2ce5e

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,23 @@ This python script will open all the digital micrograph .dm3 files in a folder,
55

66
Hasn't been extensively tested but should be very useful at creating a low resolution, small size preview of the micrographs to examine, if you want higher resolution or no filtering, commands can be commented out. By using this script, all the scale bars should match on the images
77

8-
Usage: *python Image_previews_openCV.py*
8+
Usage:
9+
process all .dm3 files in directory:
10+
11+
*python Image_previews_openCV.py*
12+
13+
process a single file
14+
15+
*python Image_previews_OpenCV.py --file filename*
16+
17+
add additional flag arguments:
18+
19+
*--color {white, black or grey}* -override default scale bar color choosing to make scale bar this color
20+
*--quality {int}* -choose quality of jpg image when saving from 1-95 (default 80), lower reduces filesize
21+
*--xybin {int}* - choose level of xybinning, this is 2 by default (output image size = x/2 y/2), put 1 for no binning, more for more binning (smaller file)
22+
*--textoff {}* - set this to anything other than 0 (easiest is 1) to remove the text from the scalebar, scale bar size can be seen in filename.
23+
24+
925

1026
### Dependancies :
1127

@@ -15,12 +31,18 @@ opencv (*pip install opencv-python*) - image handling and filtering
1531

1632
ncempy (*pip install ncempy*) - .dm3 parser
1733

18-
matplotlib (*pip install matplotlib*) - Not needed unless you want to plot the images
34+
matplotlib (*pip install matplotlib*) - Not needed unless you want to plot the images while running, will signficantly increase running time. (uncomment import and lines of code)
35+
36+
os (*pip install os_sys*) - handling operating system functions (create directory to save files in, list files in the directory etc) should be installed by default
1937

20-
os (*pip install os_sys*) - handling operating system functions (create directory to save files in, list files in the directory etc)
38+
pillow (pip install Pillow) - adding text, image handling
39+
40+
argsparse - adding arguments, should be installed by default
2141

2242
### Things to do :
2343

24-
- Test with more files: including choosing color and different magnifications
25-
- Implement with Dm4 files
26-
- Use args-parser to change options without editing file
44+
- Test with more files: including choosing color and different magnifications (DONE)
45+
- Implement with Dm4 files ( )
46+
- Use args-parser to change options without editting file (DONE)
47+
- Break up into different functions, allow some functions to be used on any images (e.g. add scalebar) ( )
48+

0 commit comments

Comments
 (0)