.TH repros 1 "1 Oct 1993" .SH NAME repros \- volume reconstruction from cross-sections .SH SYNOPSIS .B repros .I \fIcnt_file\fR .I \fItriangle_file\fR [\|\fB\-t \fItetra_file\fR\|] [\|\fB\-s\fIn\fR \fIvalue\fR\|] [\|\fB\-m\fR\|] [\|\fB\-V\fR\|] [\|\fB\-v\fR\|] [\|\fB\-w\fR\|] [\|\fB\-debug\fR\|] [\|\fB\-no_int\fR\|] [\|\fB\+int \fIint_file\fR\|] [\|\fB\-int \fIint_file\fR\|] [\|\fB\-inside\fR\|] [\|\fB\-stretch \fIvalue\fR\|] [\|\fB\-max_increment\fR \fInb\fR\|] .SH DESCRIPTION .PP .I repros is a program that connects 2D contours on parallel cross sections to one or several 3D polyhedra. Contours have to be simple closed polygons which may lay one inside another. Contours describing the outer shape of an object must be in clockwise order, contours describing holes must be counterclockwise. .PP The input file \fIcnt_file\fR and optionally \fIint_file\fR are processed cross-section by cross-section and if necessary, additional vertices may be inserted onto and inside contours. A new file \fIcnt_file.\fBnew\fR is created, containing the original contour vertices plus eventually added contour vertices and internal vertices. Each pair of adjacent cross-sections is connected to one or several solid polyhedra with triangular faces. The surface triangles are written slice by slice to \fItriangle_file\fR. .SH OPTIONS .PP .IP \fIcnt_file\fR 15 Contour input. See .I prepros(1) for a description of the file format. .IP \fItriangle_file\fR 12 output of surface triangles. It contains in the first line the total number of slices. A slice is the set of 3D polyhedra between two adjacent cross sections. For each slice three numbers are representing the number of triangles and the indices of the two cross sections involved. A line in the following list of triangles contains three integer values indicating the three triangle vertices in the new created files \fIcoord_file.\fBnew\fR and three floating numbers representing the normal pointing to the exterior of the polyhedron. The integer values indicate in their least significant bit whether the vertex belongs to the first (0) or second (1) cross section The value div 2 gives its relative position in that cross section. .IP "\-int \fIint_file\fR" write internal vertices to \fIint_file\fR. .IP "\+int \fIint_file\fR" read internal vertices from \fIint_file\fR instead of calculating them. .IP "\-no_int\fR" do not insert internal vertices. A procedure that fills double point holes is called instead. .IP "\-t \fItetra_file\fR" output of tetrahedra filling the convex hull between each pair of adjacent sections. Tetrahedra outside the object are marked as eliminated. The file format is similar to the file \fItriangle_file\fR. There are four integer values indicating the vertices of a tetrahedron, four values indicating its adjacent tetrahedra in the same slice (0: neighbor doesn't exist) and a value indicating the tetrahedron type (bit 0 set = t1; bit 1 set = t2; bit 3 set = t12; bit 4 set = eliminated tetrahedra). .IP "\-inside\fR" suppress output of eliminated tetrahedra (tetrahedra inside the convex hull but outside the object). .IP \fB\-m\fR suppress tetrahedra of type t12 at the surface. A tetrahedron of type t12 having two surface faces is deleted, if its visible edge is longer than the hidden one. This gives the minimal volume without changing the number of surface tiles. The polyhedron may appear smoother. .IP \fB\-V\fR Calculate the maximum 3D volume without taking in account the suppression of external flat tetrahedra (see \fB\-m\fR). .IP \fB\-v\fR Calculate the minimum 3D volume taking in account the suppression of external flat tetrahedra (\fB\-m\fR is set automatically). .IP \fB\-w\fR By default, .B repros inserts vertices onto the contours to avoid triangles having an angle greater than 90 degrees. Set \fB\-w\fR to switch off. .IP "\fB\-s\fIn\fR \fIvalue\fR" set threshold value \fIn\fR to \fIvalue\fR (\fIn\fR = 1..6). The default threshold values are optimal for input data in the range of [-512 512] in both x and y direction. For other data, changing the values may become necessary. .IP \fB\-debug\fR gives some diagnostic output. .IP "\fB\-stretch\fR \fIvalue\fR" eliminate extremely stretched tetrahedra. A T1/T2 tetrahedron is eliminated if the distances of the 3 vertices of its base and the barycenter of its base to its 4th point all exceeds \fIvalue\fR. A T12 tetrahedron is eliminated if the distances of its 2 vertices in one plane and the middle point of that edge to the 2 vertices in the other plane and the middle point of that edge all exceeds \fIvalue\fR. The distance is calculated after a projection of the points into the x-y plane. .IP "\fB\-max_increment\fR \fInb\fR" If the number of added vertices and the number of tetrahedra exceed their limitations, an allocation of \fInb\fR elements is done. Default is 500. .SH DIAGNOSTICS Comments and exits with nonzero status for various trouble conditions. .SH SEE ALSO prepros(1), repros2visu(1), repros2tetra(1), nuages(1) .SH AUTHOR Bernhard Geiger Copyright (C) 1993 by INRIA Sophia Antipolis Permission to use, copy, modify, and distribute this software and its documentation for educational, research, and non-profit purposes without fee is hereby granted, provided that the above copyright notice and the original authors name appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.