For three-dimensional renderings, we can use the program VolView. This program is installed on the machine named app1.
(1) To prepare for the spinning brain movie step, we need to re-format the Overlay image. Peform this re-format on the machine named medx. So, log onto that machine On a PC, you can do this using VNC.
(2) On the machine named medx, go into the tutorial directory and run the program FlipXandZforVolViewMovie.csh, feeding it as its only command line argument the name of the Overlay image you created in Overlays, e.g.
FlipXandZforVolViewMovie.csh Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.img
This will print out some information to the screen. In particular, you should see a line telling you the name of the new output file for the spinning brain step, e.g.
Output written to Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.x.z.img
Load the result into VolView and apply either the Appearance Settings file
/export/w/apps/tcl/DeactAndActOverlays.vvt or
/export/w/apps/tcl/ActOverlaysTransparent.vvt
Then use VolView's Animation feature to create a spinning brain movie.
Note that the output image's name has the character string x.z, indicating that it has been flipped along the X and Z axes.
(3 Now log onto the machine named app1, and on that machine go to the tutorial directory and type
This should bring up VolView.
(4) If you get a message suggesting that you register VolView, do so following these instructions. Then continue to the next step.
(5) Select File --> Open File.... Browse and select the Overlay image you created in Overlays. (Select the .hdr file.) Then click on the Open button.
(6) You'll get a dialog box entitled VolView 2.0: Open Wizard. In this first page of the Wizard, the Origin and Spacing are okay, so click on the Next> button.
(7) The defaults are okay in this second page of the Wizard, so click on the Next> button.
(8) In the third page of the Wizard, set Increasing Rows are: to Posterior, and set Increasing Columns are: to Left. Then click on the Next> button. This will cause the Overlay image to be loaded into VolView with a default color and opacity LUT.
(9) We'll load in our own LUT. Select File --> Open File.... In the Open File; dialog box, change Files of type: to VolView Appearance Settings (*.vvt). Browse and select the file
/export/w/apps/tcl/DeactAndActOverlays.vvt
The overlay will now be displayed with a much nicer LUT. If you prefer the brain to be transparent, try the LUT
/export/w/apps/tcl/ActOverlaysTransparent.vvt
If you want to go back to a previous .vvt or .hdr file, select File --> Open Recent File.
(10) Left-mouse click and drag on the overlay rendering. This will cause the image to rotate. Important: examine the pattern of activations. If they seem to be left-right flipped, remove the associated .vvi file, e.g.
rm Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.hdr.vvi
Then re-load the image into VolView, but set Increasing Columns are: to Right rather than Left. You do not want to confuse left and right. You have been warned!
(11) Press the R key. This brings the display back to its default orientation.
(12) Middle-mouse click and drag on the overlay rendering. This will cause the image to pan (pure translation). Press the R key to bring the display back to its default orientation.
(13) Right-mouse click and drag on the overlay rendering. This will cause the image to zoom in and out.
(14) Select View --> Views & Lights. Then try clicking on some of the buttons under Standard Views. To proceed, click on the Right button, then left-mouse click and drag on the overlay rendering, so that the rendering is tilted a few degrees off-axis.
(15) Select View --> Cropping. Under Cropping, select Enable crop. In the pulldown menu under Type, select the icon that is second from the top. Grab the right end (looks like a vertical rectangle with a rectangular hole in the middle) of the horizontal scrollbar under L-R (Units), and drag it to the middle of the scroll bar. Do the same for the horizontal scrollbars under A-P (Units) and I-S (Units).
(16) Let's make a screengrab. Select File --> Save Screenshot.... Set Files of type: to JPEG Images (*.jpg). Browse to the tutorial directory, and type in a descriptive filename, e.g.
VolView.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.RightOblique.jpg
Then click on the Save button.
(17) Let's make a spinning brain movie. Load in the re-formated Overlay image you created in step 1, e.g. the image volume Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.x.z.hdr. It will appear to be upside-down and backwards! But this is okay; when the movie is made, for whatever reason it'll come out rightside up. (This is a bug in VolView!) Load in the LUT of your choice (see step 9 above).
(18) Select View --> Views & Lights, and select one of the views that shows the brain from the Left or Right side (albeit upside-down and backwards!).
(19) Select View --> Animation.
(20) Making the movie can take hours -- probably an overnight job. Before spending hours to generate a flawed movie, do a short test run. Set the Number of frames to 72, and set X rotation (azimuth) to 360 (two full spins of the brain). Then click on the Preview button. You should see the upside-down brain spin about, a little choppily.
(21) If you're satisfied with the test run, set Number of frames equal to 720. Click on the Create... button. Browse to the tutorial directory, and give the output MPEG file a descriptive name, perhaps based on the input image, e.g.:
Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.x.z.mpg
Then click on the Save button. The movie will be created and saved to the MPEG file that you indicated.
(22) One important thing to note is that if you have a window over the movie or even the mouse cursor, it may be shown in the movie! Move all windows and the mouse cursor so that they aren't over the rendering pane before making the movie.
You probably should also turn off any screen savers on the Linux machine -- you don't want a movie of your screen saver. (Screen savers on your local desktop PC are okay). In Linux (not Windows), select Main Menu --> Preferences --> Screensaver, and set Mode: to Disable Screen Saver. Then click on the Close button to dismiss the Screensaver Preferences window.
(23) If the movie is screwed up and you need to try again, click on the Cancel button to stop the movie making. Remove the temporary directory that was created for the movie, and try again. Do a listing in the tutorial directory; the temporary directory will have a name similar to the output MPEG file, e.g.,
Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.x.z.mpg___temp_directory
To remove this directory, type
rm -rf Overlay.Cluster.Z.simple.RealWord-FalseFont._2.33._0.05.x.z.mpg___temp_directory
Then go back to step 17 and try again.
For more on how to use VolView, see the VolView 2.0 User's Guide.
Congratulations! You have made it to the end of the tutorial! YOU ARE ULTIMATE FIGHTER!!
Return to tutorial main page
Comments (0)
You don't have permission to comment on this page.