For this project you will be assigned in to groups of 4/5 people,
the members of each group being selected by the unit coordinator.
The Team members a given here.
With four people in each group (one team has 3 people), it is expected that a high level
of achievement will result. However it is imperative that any difficulties in
working as a team are immediately resolved to the satisfaction of the
unit coordinator. Failure to act quickly on establishing a functioning team could
jeopardise the final implementation.
The task of each team for the project is to
implement the Marching Cubes algorithm for
user definable iso-surfaces given a volume data-set. There will be
two main parts to the project.
The Project
Part I - Basic
An implementation
of the Marching Cubes algorithm. Given a data set
consisting of a series of "8 bit grey" images in the PGM format,
where the user defines the image dimensions and number of slices,
your application should generate a VRML output of the
user stipulated iso-surface value.
The
Marking Scheme will be based on the
- A submitted report including user documentation, a description of your system,
implementation details and and installation guide.
- The quality of the submitted code
-
- The successful installation of your system, and your test cases
- successful completion of my run-time tests
The "flawless" implementation and testing of the application from Part I will
result in a solid pass for the project.
Part II - Bells and some Whistles
Having completed Part I you may wish to tackle the following
- incorporation of surface normals - your program should output
the surface normal of each generated triangular facet, using
any of the methods described in the lecture notes.
- decimation - a technique to reduce the number of triangle primitives.
The "flawless" implementation and testing of the application from Part II would
result in full marks for the project.
Part III - Above and Beyond
For those wishing to test their abilities there will be additional marks for attempting to complete
some or all of the following
- Enabling multiple iso-surfaces to be stipulated and rendered.
- Incorporating transparency on some iso-surfaces.
- Including the capacity for iso-surface colouring.
-
- Enable "sectional cut aways" to be displayed. Here an iso-surface is not rendered
entirely b but the user can stipulate a section of the data that is not to be rendered.
The "flawless" implementation and testing of the application from Part III would
result in an additional 10 marks for the project.
Details of the algorithm that is to be implemented have been described
in lectures and can be found in the textbook by Watt and Watt (Chapter
13) and elsewhere.
The result of your program will be visualised via a VRML browser, of which there are two available
in Linux, octagaplayer and vrmlview.
Both render VRML2.0 model specifications and vrmlview also handles VRML1.0. Your application
must generate output in one or either of these formats.
Of course, by using ANSI C, C++, or Java (or whatever language you choose) and VRML, you can
develop your solution anywhere that suitable tools are available.
If the output of your program is in the correct format, it can be
rendered by these programs and they will
deal with shading, rotation, etc. Your program will restrict
itself solely to the extraction of the required surface(s).
Below is a schedule that will help you plan your activities:
Week |
Date |
Activities |
5 |
20/08 |
Project commencement. Informal specification |
6 |
30/08 |
Formal Project Specification. Project teams established. |
6-13 |
|
Team development of the application. |
|
10/09 - 14/09 |
Mid-semester non-teaching week. |
9 |
27/09/ |
Students should have a working
version of the system for Part I. |
13 |
Wednesday 24/10 at 4pm |
Project report and source code due. |
Data-sets
Three data-sets are given in the
/cslinux/examples/CITS4241/Project
directory.
- The first data-set can be found in the sub-directory
FullHead-8bits. This data-set,
which has been used in the Lab 1 and Lab 2 exercises, has been modified
and simplified for this project. The data-set contains 94
slices of 256 × 256 pixel values. Each slice is stored in a file
named HEADSQ.nnn where nnn is a number in the range [001,
094]. Pixels of each slice are of type unsigned char (1
byte), varying from 0 (black) to 255 (white). More details about
the data-set are given in the README file there.
The only additional piece of input information that you need is
the real distance between data points, i.e., the voxel aspect
ratio. This is
x : y : z = 0.8 : 0.8 : 1.5
You can read these as mm, so the original full head
images are taken as a volume
of 20.5 × 20.5 × 14.1 cm3.
- The second data-set can be found in the sub-directory Crachami-8bits.
This data-set contains 275 slices of 512 × 512 pixel values. Each slice is
stored in a file named SKULL.nnn where
nnn is a number in the
range
[001, 275]. Similar to the first data-set, pixels of each slice
are of type unsigned char. More details about the data-set
are given in the README and
the cc-8bit_info.txt file there.
- The third data-set is the simplest data-set that your program
should
be tested on first. It contains 33 slices of 33 × 33
pixels. The data-set is generated by a simple mathematical
function --- the hyperboloid.
The iso-contour value used in the surface generation is
383.519 (on the original
values). The file format is identical to those of the head
and skull data, except that pixels in
each slice are of type unsigned short (2 bytes). Each slice
is stored in a file named hyper.nnn where nnn
is a number in the range [000, 032]. This data-set can
be found in the sub-directory Hyperboloid.
Some results VRML1.0 are also provided for the third data-set for you to
test-check your program:
- 8336 triangles from the above test check. The VRML1.0 file
is hyper-VRML1.wrl. This file has
the normal vectors included with the
triangles.
- 8336 triangles from the above test check. The VRML1.0
file
is hyper-VRML1-nonormals.wrl.
This file does not have the normal vectors
calculated. The subtle
difference in shading is noticeable.
- 2009 triangles from the above test check, after 75%
decimation. The VRML1.0 file is hyper-deci-VRML1.wrl.
This file has the
normal vectors included with the triangles. Note that it is
difficult to distinguish between this file and the first one.
- 2009 triangles from the above test check, after 75%
decimation. The VRML1.0 file is hyper-deci-VRML1-nonormals.wrl.
This file does not
have the normal vectors calculated.
You should be able to notice the significant
difference in shading.
The four wrl files above are
stored in the sub-directory WRL.
If your web browser has an appropriate plug-in installed, you should be able
to click on the links above to view the wrl files.
Otherwise, you can view any of the wrl files by typing, e.g., under Linux:
vrmlview hyper-VRML1.wrl
Submission requirements
- Project report:
The document should include analysis of the
code you have written and details of testing your program
(error checking, expected versus actual outputs, etc).
Any appropriate diagrams (which can be
hand drawn) that help explain
the design of the program should be included. If you have used
any additional data-sets found on the web, you should provide the source
websites and detailed explanations of the data formats. Any
assumptions made in the program should also be documented.
Your project should also include a short description on how to compile
and run your program, together with a couple of examples.
Your project report should be 10 to 15 pages in length, depending
on the size of the project team. Please note that you should
adopt a concise writing style to ensure that you report does not
go over the page limit.
It should be typed on A4 papers and spell-checked.
A green coversheet
must be completed and signed by all team members and
securely stapled to the front of your report.
Copies of the green project coversheet can be collected
from the CSSE office.
Project report submission: to the CSSE Office
by the due date and time shown above.
- Source code: The source
code of your program should be electronically submitted to
cssubmit.
To ease the submission process, you are recommended to
zip (or using the Unix/Linux command tar command)
all the files and sub-directories together into one zip (or tar or tgz)
file and submit just that file. This would allow your
directory structure to be retained when the files are
retrieved for marking.
You may want to include additional files together with your source
code, e.g., makefile or script file. If you do, ensure that
you mention about them in your project report.
Useful VRML document
- The VRML2.0/97 specification may still be available from the
website
ISO-VRML97.
- Alternatively, view the
VRML1.0-specification.pdf that is
converted from the HTML file on the above website.
Helpful hints
- ALWAYS check the user inputs. Do not assume that
user-supplied parameters are always in the correct range.
- ALWAYS give the user feedback. If you are reading data, it
appears to the user that the program is hung. Let them know
things are "skipping" along.
Issues which are worthy of investigation for Part I
- The interface of your program: how are data input to and output
from your program?
- What happens if something is not specified? What default
values should unspecified parameters take? What default action
should your program take? What are the possible error
states? and what will your program do when errors occur?
- What is the format of the source volume data? What methods
should your program adopt to load the data into memory for
processing? Will your program scale or compress data? And
if so, why?
- Study the VRML1.0 or 2.0
file format carefully for saving the interface models.
- Are appropriate data structures for storing and accessing the
volume data used in your program?
- Are appropriate data structures and methods for generating
surface models consisting of triangles used in your program?
- Project testing -- how do you test some of the code and functions that
you develop?
- What program development environment and implementation language
should you use? i.e., IDE, compilers, makefile, structure directory layout, etc.
References
You would find the following reference papers useful for the project:
- brief paper paper W. E. Lorensen and H. E. Cline.
"Marching Cubes: A High Resolution 3D Surface Construction Algorithm".
ACM Computer Graphics, vol. 21, no. 4, July 1987, pp. 163-169.
- paper G. M. Nielson and B. Hamann.
"The Asymptotic Decider: Resolving the Ambiguity in Marching Cubes".
IEEE Conference on Visualisation, October 1991.
The pdf files of these two papers can be found in the
/cslinux/examples/CITS4241/WWW/Project/references/ directory.