Scripting Resources for DigitalMicrograph™

banner

Dave Mitchell's DigitalMicrograph™ Scripting Website

Home | Scripts | Examples | Functions | Recent Updates | Tutorials | Resources | Publications | Consulting | Projects | Contact & Bio |PyJEM| Search

 

Example: Open an Image from Disk
Function
Shows how to open an image which has been saved to disk.
Version
version:20091025, v1.0
Author
D. R. G. Mitchell
Acknowledgements
-
Comments
-
System Requirements
Should be compatible with all recent versions of DigitalMicrograph.
Known Issues
-
Supported
Yes
Included Files
Main script file.
Source Code

// Example script which shows how to load an image


// from a file saved on disk

// D. R. G. Mitchell, Oct 2009

// version: 20091025, v1.0

 

string openpath

 

image loadedimage

 

 

// Dialog to open the file and decide whether to proceed

 

if(OpenDialog(openpath))

{

LoadedImage:=OpenImage(openpath)

}

else

{

exit(0)

}

 

showimage(loadedimage)