sp2sp
Used for converting between various streaming point file formats
plus a little bit of ad hoc filtering operations as well. This program can read finalized or unfinalized point sets, in ASCII or binary.
It can discard points outside a box specified by -clamp.
It can also compute a separate header (containing a bounding box) that can be passed to
spfinalize to avoid having reread data to obtain it.
Example usage:
sp2sp -h
sp2sp -i points.spb -ospa | more
sp2sp -i mesh.ply -o points.txt
sp2sp -i points.txt.gz -o points.spb
sp2sp -i mesh.obj.gz -isma -o points.spa -random 100
sp2sp -i mesh.ply.gz -o points.spb -clamp3 1.0 1.0 1.0 3.0 3.0 3.0
sp2sp -i points.raw_f -ho points.hdr_f
sp2sp -i points.raw_f -hi points.hdr_f -o points.spa
sp2sp -h
To merge 2 files
sp2sp.exe -i file1.spb -i2 file2.spb -ospb -o merged_file.spb
To merge a list of UPC files
sp2sp.exe -lof -iupc -i c:\OttawaDemo\upc_files.txt -ospb -o c:\OttawaDemo\upc_merge.spb
Where
upc_files.txt is a
text file containing a list of file names of UPC files (1 file per line in file)
General
-i <input file>
Input file to transform (or copy)
-i2 <2nd input file>
A 2nd input file
- If specified, than the intent is to merge 2 input files into 1 output file
-o <output file>
Output file after transforming, copying, or merging
Input File Formats
-ispa
Streaming Point ASCII
-ispb
Streaming Point Binary
-isma
Streaming Mesh ASCII
-ismb
Streaming Mesh Binary
- not currently supported but it should be
-ismc
Streaming Mesh Compressed
- not currently supported but it should be
-iupc
Data format from D.O.D. for Ottawa data set
- _Note:* We can also support merging a list of UPC files using -lof flag
Output File Formats
-ospa
Streaming Point ASCII
-ospb
Streaming Point Binary
Miscellaneous Flags
-hi <headerfile>
Specify an optional input header file
-ho <headerfile>
Specify an optional output header file
-lof
List of Files
- Specifies that the input file name is actually a text file containing a list of files to be merged.
- 1 file per line in text file
- only supported for .upc, .txt and .las file formats
-list
List of Files
-listoffiles
List of Files
-double
Force input to double
- Force Data type to be read as doubles
-force_double
Same as
-double
-float
Force input to float
- Force Data Type to be read as floats
-force_float
Same as
-float
-random <num points>
Generates random set of 'n' points
-pertube
- Misspelled--should be -perturb
- Randomly perturbs all points in file by a very small number, useful for stress testing delaunay triangulation.
-b <intVal>
Set Compression bitrate
-bits <intVal>
- Same as
-b
- Note: this may not be very useful, since there is no spc [compressed] file format) and the support for .smc is currently broken...
-seed <number>
Seed for Random number generation
-unfinalize
Throw away all cell commands in sp file
-bb
Compute Bounding Box (min/max) values
-compute_bb
Same as
-bb
(Note: Requires extra pass thru input file which breaks streaming/pipelining)
-clamp2 <xmin> <xmax> <ymin> <ymax>
Clamps all points to specified ranges
(Note: zmin, zmax defaults to range [0,0], all 3D points get projected onto xy plane)
-clamp3 <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
Clamps all points to specified ranges
-sub <everyNthPoint>
Only outputs every nth point from input
-subsample <everyNthPoint>
Same as
-sub
(I.E., -sub 100 would only output one point for every 100 points read in)
Note: The functionality of sp2sp and spfinalize should perhaps be folded together. They are separate just because they were initially written that way.
--
JackSnoeyink - 02 Jun 2008
--
ChristianStith - 24 Jun 2008
OTHER FLAGS
-parse <parse string>
Used to help extract <x,y,z> values from arbitrary text files. Need to debug to figure out
exactly how it works.
-tiles2D
- Allows generation of very large data sets from a simple seed file for testing
- Tiles seed file in 2 dimensions
- IE you get i*j copies of original data set in output file
-tiling2D
-tiles3D
- Allows generation of very large data sets from a simple seed file for testing
- Tiles seed file in 3 dimensions
- IE you get i*j*k copies of original data set in output file
-tiling3D