Scripting Resources for DigitalMicrograph™

banner

Dave Mitchell's DigitalMicrograph™ Scripting Website

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

 

Example: Storing Images in a Data Cube
Function
Shows how to store images in a 3D image (data cube).
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 showing how to store


// images as layers in an image cube.

// In this case six layers are added to a cube.

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

// version:20091025, v1.0

// adminnospam@dmscripting.com (remove the nospam to make this email address work)

 

// storing open images in a data cube

 

 

image cube=realimage("cube", 4,1024,128,6)

number i

image temp

setname(cube, "Cube")

 

for(i=0; i<6; i++)

{

temp:=getfrontimage()

cube[0, 0, i, 1024, 128, i+1]=temp

deleteimage(temp)

}

 

showimage(cube)