AFNI program: SurfQual
Output of -help
Usage: A program to check the quality of surfaces.
SurfQual <-spec SpecFile> <-surf_A insurf> <-surf_B insurf> ...
<-sphere> [-prefix OUTPREF]
Mandatory parameters:
-spec SpecFile: Spec file containing input surfaces.
-surf_X: Name of input surface X where X is a character
from A to Z. If surfaces are specified using two
files, use the name of the node coordinate file.
Mesh winding consistency and 2-manifold checks are performed
on all surfaces.
Most other checks are specific to spherical surfaces (see option below).
-sphere: Indicates that surfaces read are spherical.
With this option you get the following output.
- Absolute deviation between the distance (d) of each
node from the surface's center and the estimated
radius(r). The distances, abs (d - r), are sorted
and written to the file OUTPREF_SortedDist.1D.dset .
The first column represents node index and the
second is the absolute distance. A colorized
version of the distances is written to the file
OUTPREF_SortedDist.1D.col (node index followed
by r g b values). A list of the 10 largest absolute
distances is also output to the screen.
- Also computed is the cosine of the angle between
the normal at a node and the direction vector formed
formed by the center and that node. Since both vectors
are normalized, the cosine of the angle is the dot product.
On a sphere, the abs(dot product) should be 1 or pretty
close. Nodes where abs(dot product) < 0.9 are flagged as
bad and written out to the file OUTPREF_BadNodes.1D.dset .
The file OUTPREF_dotprod.1D.dset contains the dot product
values for all the nodes. The files with colorized results
are OUTPREF_BadNodes.1D.col and OUTPREF_dotprod.1D.col .
A list of the bad nodes is also output to the screen for
convenience. You can use the 'j' option in SUMA to have
the cross-hair go to a particular node. Use 'Alt+l' to
have the surface rotate and place the cross-hair at the
center of your screen.
NOTE: For detecting topological problems with spherical
surfaces, I find the dot product method to work best.
Optional parameters:
-prefix OUTPREF: Prefix of output files. If more than one surface
are entered, then the prefix will have _X added
to it, where X is a character from A to Z.
THIS PROGRAM WILL OVERWRITE EXISTING FILES.
Default prefix is the surface's label.
Comments:
- The colorized (.col) files can be loaded into SUMA (with the 'c'
option. By focusing on the bright spots, you can find trouble spots
which would otherwise be very difficult to locate.
- You should also pay attention to the messages output when the
surfaces are being loaded, particularly to edges (segments that
join 2 nodes) are shared by more than 2 triangles. For a proper
closed surface, every segment should be shared by 2 triangles.
For cut surfaces, segments belonging to 1 triangle only form
the edge of that surface.
- There are no utilities within SUMA to correct these defects.
It is best to fix these problems with the surface creation
software you are using.
- Some warnings may be redundant. That should not hurt you.
Common Debugging Options:
[-trace]: Turns on In/Out debug and Memory tracing.
For speeding up the tracing log, I recommend
you redirect stdout to a file when using this option.
For example, if you were running suma you would use:
suma -spec lh.spec -sv ... > TraceFile
This option replaces the old -iodbg and -memdbg.
[-TRACE]: Turns on extreme tracing.
[-nomall]: Turn off memory tracing.
[-yesmall]: Turn on memory tracing (default).
NOTE: For programs that output results to stdout
(that is to your shell/screen), the debugging info
might get mixed up with your results.
++ SUMA version 2.5000, June 10 2004
Compile Date:
Aug 3 2004
Ziad S. Saad SSCC/NIMH/NIH ziad@nih.gov
This page generated on
Tue Aug 3 16:42:49 EDT 2004