File: ReadImage

package info (click to toggle)
dxsamples 4.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 26,348 kB
  • ctags: 1,513
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,101
file content (30 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Import the electron density data
electrondensity = Import("watermolecule");

// Partition the data for parallelism
electrondensity = Partition(electrondensity);

// Create an isosurface at the value 0.3
isosurface = Isosurface(electrondensity,0.3);

// create a camera
camera = AutoCamera(isosurface, resolution =300, aspect=1);

// color the isosurface red
isosurface = Color(isosurface,"red");
image = Render(isosurface,camera);
// write the image to the file "iso"
WriteImage(image,"iso",frame=0);

// color the isosurface yellow 
isosurface = Color(isosurface,"yellow");
image = Render(isosurface,camera);
// append the image to the file "iso"
WriteImage(image,"iso",frame=1);

// read in the images as an image series
i=ReadImage("iso");

// arrange the images together and display
i = Arrange(i);
Display(i);