Recon is a library to compute Reeb graphs. It implements the algorithm outlined in the paper
Harish Doraiswamy and Vijay Natarajan, "Computing Reeb Graphs as a Union of Contour Trees", IEEE Transactions on Visualization and Computer Graphics, 19(2), 2013, 249--262.
Recon is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This folder contains the following files / folders:
- src folder
- loaders.xml
- computeReebGraph.sh
- input.properties
- Eclipse project files, in case you want to import project into Eclipse
- build.xml
- license
- copyright
- and this Readme
This program requires Java 1.5 or higher. To compile this code using the given build.xml Apache Ant is required. (tested on Apache Ant 1.8.0)
Compile the code by running the "ant" command This will create recon.jar file in the build folder.
run the computeReebGraph.sh after setting the following in the input.properties file
- loader - Specifies the input mesh loader type. It should be one of the loaders mentioned in loaders.xml. Currently OFF, TET and SIM are supported
- inputFile
- inputFunction - Input function should be 0, or i, where i is the co-ordinate index (to be used for the height function along the ith axis)
- output - The output file (optional) to store the Reeb graph.
The library currently supports the following three formats for the input mesh:
OFF
- Optional first line containing "OFF"
- Next line specifies the no. of vertices (nv) followed by the number of triangles (nt) (space seperated)
- The next nv lines contains x y z [f] where x, y & z specify the co-ordinates of the vertex and f specifies the function value. (If the input type is not f, then the function value is optional)
- the next nt lines has [3] v1 v2 v3 where v1, v2 and v3 are the vertex indices of the vertices that form the triangles (the 3 is optional)
TET
- First line specifies the no. of vertices (nv) followed by the number of tetrahedrons (nt) (space seperated)
- The next nv lines contains x y z [f] where x, y & z specify the co-ordinates of the vertex and f specifies the function value. (If the input type is not 0, then the function value is optional)
- the next nt lines has v1 v2 v3 v4 where v1, v2, v3 and v4 are the vertex indices of the vertices that form the tetrahedron.
SIM
- First line specifies the dimension (d) of the input
- The next line specifies the no. of vertices (nv) followed by the number of simplices (ns) (space seperated)
- The next nv lines contains c1 c2 ... cd [f] where ci specifies the ith co-ordinate of the vertex and f specifies the function value.
- The next ns lines has (l + 1) v1 v2 ... v{l+1} where l is the dimension of the simplex and vi is the index of the ith vertex of the simplex.
- You need to write a loader that extend the interface vgl.iisc.external.loader.MeshLoader
- Add this loader source in the src/meshloader folder in the appropriate package
- Register this new loader by providing its name and class information in the loaders.xml file present in the root folder.
- You can now use this loader by providing its registered name in the input.properties file. See the javadoc for more details regarding the Loader interface.
- If you get a OutOfMemory (java heap) exception, try increasing the memory allocated to the jvm in the run.sh file (there is a -Xmx parameter) and run again.
- Any other error/exception, kindly let me know of the error. It would be great if you can provide the stack trace of the exception (if it is an exception that has occured) along with the input data.