next up previous print clean
Next: Zplane, Overlay Up: EXAMPLES Previous: EXAMPLES

Slice demo program

This program displays a cube, plane by plane. The frame counter is controlled by a vertical scrollbar.

main(int argc,char **argv) {
    sworld = new SWorld("graphics", argc, argv); // Seismic world

rasCmap = new RasColorMap("IC",8,1) ; // Colormap (Intensity and Clip) sworld-> SetRasColorMap(rasCmap) ; // Set the colormap to the seismic world

deck = new Deck(); // Deck or stack to insert all the data planes messageWindow = new HelpMessage("Help") ; // Message window to display coordinates

sepInput = new SepInput("stdin") ; // Seismic objects gsInfo = new GSInfo(rasCmap) ; // Graphic state constructed from the colormap for( int i=0 ; i < sepInput-> Axis(3)-> len ; i++ ) { sepPlane = new SepPlane(sepInput,3,i) ; // create a sepPlane of index i

gsPlane = new GSPlane(sepPlane,gsInfo) ; // create a GSPlane from a sepPlane

spict = new GSDataPict(gsPlane,0,0,500,500); // create a data picture

grBlock = new View(spict,messageWindow); // create the interactor object deck-> Insert(grBlock) ; // Insert he view into the stack of planes

delete sepPlane ; // free float data representation. }

hbox = new HBox(deck,new VBorder,new VScroller(deck)); // juxtapose deck and vertical scroller window = new VBox(hbox,new HBorder,messageWindow); // Construct the global window frame = new TitleFrame(new Banner("SEP","Cube demo","July 89"),window); // title frame sworld->InsertApplication(frame); // Put the window on screen. frame->Run(); // Run the application. delete frame; // Delete the application. }

slice demo program

The program constructs first an interactive seismic world with a certain colormap. Then it builds a stack or deck of data planes going through the data cube. Then it attaches the deck to a vertical scroller, inserts the window on the screen, and then waits for user manipulation. Figure [*] gives an overview of the program and Figure [*] shows a X-Window dump of the program.

next up previous print clean
Next: Zplane, Overlay Up: EXAMPLES Previous: EXAMPLES
Stanford Exploration Project