How to : Include Volume Rendering
How to: Make a volume using OsgVolume
Dicom Files :
This page needs to be updated :
Create a script as below substituting .tif for the image type you are using ie: .jpg .png etc.
To create the script open a new document in BBedit and paste the following text into it
(Note from Robert Osfield, currently the .ive format does not support the osgVolume NodeKit so you can't save volumes as .ive files, instead you must use .osg. A future release of the OpenSceneGraph will add osgVolume support to .ive, but for now one must use .osg for saving volumes).
#!/bin/sh
osgvolume --images *.tif --num-components 1 --r_maxTextureSize 512 -n --zMultiplier -1.0 -o volume.osg
echo make volume complete
exit 0
and save it into the directory where your image files are, with a name like:
make_volume
then change permissions of the file - use terminal and go to the directory and do:
chmod +x make_volume
Now if you type :
./make_volume
this will create a file called volume.osg and a volume.dss image file. Both the .osg and .dds file will need to be used together. One loads the volume.osg file, and this volume.osg will reference the volume.dds file for you.
You can also do part volumes by using the following and changing the **** part:
Other options
for help :
osgvolume --help
Usage: osgvolume [options] filename ...
Options:
-h or --help Display this information
-s <numSlices> Number of slices to create.
-n Create normal map for per voxel lighting.
--clip <ratio> clip volume as a ratio, 0.0 clip all, 1.0 clip none.
--compressed Enable the usage of compressed textures.
--compressed-arb Enable the usage of OpenGL ARB compressed textures.
--compressed-dxt1 Enable the usage of S3TC DXT1 compressed textures.
--compressed-dxt3 Enable the usage of S3TC DXT3 compressed textures.
--compressed-dxt5 Enable the usage of S3TC DXT5 compressed textures.
--images [filenames] Specify a stack of 2d images to build the 3d volume from.
--maxTextureSize <size> Set the texture maximum resolution in the s,t,r (x,y,z) dimensions.
--num-components <num> Set the number of components to in he target image.
--r_maxTextureSize <size> Set the texture maximum resolution in the r (z) dimension.
--s_maxTextureSize <size> Set the texture maximum resolution in the s (x) dimension.
--t_maxTextureSize <size> Set the texture maximum resolution in the t (y) dimension.
--modulate-alpha-by-luminance For each pixel multiply the alpha value by the luminance.
--replace-alpha-with-luminance For each pixel m Set the alpha value to the luminance.
--shader Use OpenGL Shading Language.
--xMultiplier <multiplier> Tex coord x mulitplier.
--yMultiplier <multiplier> Tex coord y mulitplier.
--zMultiplier <multiplier> Tex coord z mulitplier.
--xSize <size> Relative width of rendered brick.
--ySize <size> Relative length of rendered brick.
--zSize <size> Relative height of rendered brick.
____
Using in Present3D
You can load and view the resulting volume either by creating a P3D xml file with your volume and other data or just by using present3D on the command line, so type :
present3D volume.ive
and this will load your volume. You can now use the the a, t and k keys along with mouse movement, to interact with the volume, try it :-)
The Digital Learning Foundation is a registered Educational Charity, SC036588 and a Non-Profit Company Limited by Guarantee, SC282280.
The DLF is dedicated to assisting educators and students adopt new technologies and integrate them into everyday teaching and learning, while inspiring, motivating and making it fun!
content
user account
Popular content
Today's:
All time:
Last viewed:
- IMG_3591
- Hydroponics Experiment 1 : Making the Wick System
- Coolest Pop-Up Book Ever!
- The world will not end in 2012 : Neil deGrasse Tyson
- The End is Nigh! 2012 Reality Check
- Light echo from V838 mon : APOD
- IMG_0766
- How to : edit or create stereo movies in FCP
- Handheld Physics Fun :
- ESA : A Black Hole Inferno
Recent blog posts
- iPad Orchestra & Seline HD
- HD 10180 : Richest Planetary System Discovered
- Carl Sagan : How Many Rivers We Had To Cross
- Stunning Aurora Videos
- Nice Explanation of Electromagnetic Spectrum
- Early Cineradiographic X-ray studies of Joint Movement
- ESA : A Black Hole Inferno
- Testing blog update from iPad
- The Standard Model Explained
- Exoplanet caught on the move by the VLT
bbc science
new scientist
space
universe today
eurekAlert!
- Restoring coastal wetlands? Check the soil
- Personality predicts cheating more than academic struggles, study shows
- Study: Teasing about weight can affect pre-teens profoundly
- Researchers at Children's Hospital Los Angeles find diet-induced obesity accelerates leukemia
- New lymphoma treatment shows promise in dogs
- Mount Sinai researchers find new target to improve pain management
- Mapping a brain atlas
- Johns Hopkins researchers unravel clues to infertility among obese women
- A new role for insulin in cell survival, cell metabolism and stress response
- Wrist splints in children as effective as casts







recent comments
26 weeks 3 days ago
31 weeks 6 days ago
39 weeks 5 days ago
39 weeks 5 days ago
41 weeks 23 hours ago
42 weeks 3 days ago
44 weeks 6 days ago
45 weeks 6 days ago
46 weeks 23 hours ago
1 year 24 weeks ago