Final report by Xu Zaiqing
1.Subtask
1)Make multiresolution of the file
2)Change file formats
3)Isocontour
4)Make body parts
Input: visible human raw MRI data file, .iv files from Sue and Florian, .iv files from some other web sites
Output: some .RAW files of the skins and bones and multiresolution of the same data
These files can be used by other groups such as the volumn rendering and animation by Sangmin Park
2.Results
2.1 Multiresolution:
It is very hard for the other programs such as animations to use a mesh with too many points and triangles. So it is necessary to use some decimation tools to simplify the meshes.
2.1.1Decimation tools used
2.1.1.1MQP mesh at http://meshalgorithms.sourceforge.net/ on Linux
This tool uses the vertex decimation proposed by Schroeder. In each step of the decimation process, a vertex is selected for removal and all the faces adjacent to that vertex are removed from the model. This tool is very fast but it is not good in preserving the smooth parts of the surfaces. There are some pictures produced by MQP in the following parts.
2.1.1.2QVis, Qslim at http://graphics.cs.uiuc.edu/~garland/CMU/quadrics/qslim.html on Windows and SGI
These two softwares have the input of .smf file and output of .smf file.
Qslim is command line based and QVis is GUI based.
The author combines the quadric error metric with the vertex pair contraction.
These tools can produce high-quality approximation results with fast speed as well as handling manifold and non-manifold models.
QVis can show the approximation results graphically and let the users save what they have seen into the image.
2.1.1.3 Progressive meshes at http://research.microsoft.com/~hoppe/
This is a famous tool to do decimation.
A progrssive mesh is a representation of meshes that can go through many LOD almost seamlessly.
But the speed of this algorithm is relatively slow.
So it is not suitable to handle a large amount of geometry data in this project.
2.1.2 Sample decimation results
Original
image of skin6.iv: 97494 vertices and 194132 triangles.
The skin6.iv is from http://www.cc.gatech.edu/projects/large_models/vis_skin.html
Image
from skin6_5.raw: 31948 vertices and 63026 triangles, using MQP mesh
Image
from skin6_10.raw: 10471 vertices and 20100 triangles,using MQP mesh
The result is not very smooth in some original smooth parts.
Image
from skin6_5qslim.raw: 31948 vertices and 63026 triangles, using Qvis
and Qslim
Image
from skin6_10qslim.raw: 10471 vertices and 20100 triangles, using
Qvis and Qslim
The result preserves the smooth parts quite well.
2.1.3 Decimation geometric fidelity evaluated:
There is almost no tools to describe the difference between the original mesh and the decimated mesh. I find one tool called Metro. It can tell you the difference by numerical and visual results. This tools makes no assumption on the particular approach used to build the simplified representation.
Metro is from http://vcg.iei.pi.cnr.it/metro.htm
2.2Format Convertion
I made a C program called format_convert.c to transform the formats of the data.
SMF format is a format used by Qvis and Qslim.
In SMF format, the index of the face starts at 1, not 0 as in the RAW format.
It has four choices now:
1)change VRML format or IV format into RAW format
2)change RAW format into VRML format
3)change SMF format into RAW format
4)change RAW format into SMF format
2.3 Parallel Isocontour
Instructions about how to do parallel isocontour (including how to use iotree and etree) can be found at
http://www.ticam.utexas.edu/~xyzhang/software/paraiso.html
Below is some supplemental instructions to make the above instructions more complete.
The whole procedure of parallel isocontour is as follows:
1)Use mkrawheader to add a header of the .raw file. The result is put in the .rawiv file.
You can find mkrawheader at: /home/utexas/ti/xyz/bin/mkrawheader(milagros)
usage: mkrawheader <x dimension size> <y dimension size> <z dimension size> > outputfile
sample command: mkrawheader 512 512 1252 >a.rawiv
2)Use cat command to combine the header and .raw together
3)Use breakraw to break .rawiv data into several slabs
You can find breakraw at: /home/xyzhang/bin/breakraw(prism)
usage: breakraw <raw file name> <# of output> <unit data size>
sample command: breakraw a.rawiv 8 2
After that, the a.rawiv will be breaked into 8 slabs with name "a.rawiv_000",...,"a.rawiv_007" respectively.
4)use iotree to do preprocessing
When you use the instruction as follows
mpirun -np 8 iotree -f vhmale.rawiv -t 1
the program will assign the task to 8 predefined processors.
Some nodes may become unavailable.
You can assign the processing task to the processors other than the predefined ones using the command as follows:
mpirun -p4pg iotree8.pg iotree -f vhmale.rawiv -t 1
Here is the sample format of the P4 Procgroup File iotree8.pg:
prism 0 /home/zaiqing/iotree
alpha16 1 /home/zaiqing/iotree
alpha17 1 /home/zaiqing/iotree
alpha18 1 /home/zaiqing/iotree
alpha19 1 /home/zaiqing/iotree
alpha20 1 /home/zaiqing/iotree
alpha21 1 /home/zaiqing/iotree
alpha22 1 /home/zaiqing/iotree
iotree8.pg specifies the 8 processors to be used.
The above 0 in the file indicates that no other processes are to be started until the one on prism starts.
5)use etree to do parallel isocontouring
sample command: mpirun -np 8 etree -f vhmale.rawiv -t 1 -v 800 -R
For male MRI images, you can use the isovalue about 1200 to get bones and about 800 to get skins.
2.4 Skeleton parts data
http://www.npac.syr.edu/users/zeynep/HANDOUTS/
The different parts of the skeleton are already separated using the "separator".
I put these parts in 26 different files that named from SKELETON1.raw to SKELETON26.raw.
Each parts only contain a few points and triangles. So they are very good for computer animation.
Here is some samples of the skeleton parts.
3.Lessons learned
1)Many decimation programs can not work when the dataset becomes extremely large.
Also, many decimation programs can not find points or faces to decimate when the surface varies a lot.
I tried to use the MQP mesh to do some decimations on the quarter head data generated by Sue and Kevin.
But it can not work because the face varies a lot.
Also, when there is much noise in the .raw data, the decimation does not work well.
You can see the following skeleton parts example.
output9.smf, it has 862852 faces(output9.smf is the result of format convertion of output9.iv)
output9.iv is from Sue and Kevin. It has more points than triangles and contains much noises.
output9xu1.smf, It has 400000 faces. This is the result after doing decimation using qslim.
output9xu3.smf, It has 40000 faces. This is the result after doing decimation using qslim.
2) When relatively large datasets are tested, decimation geometric fidelity software Metro is out of memory and can not be used. Also, I do not get the code of Metro, so I have no way to revise it. But this tool gives us an idea of developing an tool to evaluate the decimation errors consistently.
3)Qvis and Qslim have the disadvantages of generating large intermediate files about 8-10 times as large as the original data. When dealing with extremely large data sets(more than 200M bytes), the available disk space becomes a critical problem.
Reference:
[1]http://www.cc.gatech.edu/projects/large_models/vis_skin.html
[2]http://www.npac.syr.edu/users/zeynep/HANDOUTS/
[3]http://www.uchsc.edu/sm/chs/gallery/vhm_images.htm
[4]http://vcg.iei.pi.cnr.it/metro.htm
[5]William J.Schroeder, Jonathan A.Zarge, and William E.Lorensen. Decimation of triangle meshes. In Computer Graphics, pages 65-70, 1992.
[6]Quadric-Based Polygonal Surface Simplification, Michael Garland, Ph.D. thesis, Tech. Rept. CMU-CS-99-105.
[7]Texture mapping progressive meshes, P. Sander, J. Snyder, S. Gortler, H. Hoppe, Computer Graphics (SIGGRAPH 2001 Proceedings), pages 409-416.