File: Slice

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 (26 lines) | stat: -rw-r--r-- 737 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
// Import the electron density data
electrondensity = Import("watermolecule");

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

// Create a camera
camera = AutoCamera(electrondensity,"off-front");

// Color the data
colored = AutoColor(electrondensity);

// Take a slice in the y dimension, at position 30. The slice is 2 dimensional
// (has only x and y positions)
slice = Slice(colored,1,30);
Display(slice,camera);

// Take a slice in the z dimension at position 10.
slice = Slice(colored,2,10);
Display(slice,camera);

// Create all possible slices in the z dimension.
slices = Slice(colored,2);
// Select the 9th slice from the series group and display
slice = Select(slices,9);
Display(slice,camera);