Table of Contents
Scan input file formats
AMAPstudio-Scan expects you to load files in two stages :
- Stage 1: Load the file containing the original point cloud of the tree
- Stage 2: Load the topology file to be checked/corrected, resulting from an automatic topology detection program, having run on this point cloud.
Then, you will be able to use the tools provided by Scan to fix the topology interactively and save the corrected topology file.
Stage 1: point cloud file
To load the stage 1 file, used the command File > Load a Scan file x y z, separated by ,/;/space/tab
The expected file is called a 'Scan file', it is a point cloud file, i.e. a text file containing a line per point, with its properties in columns.
The separator between columns is a single character among these 4 propositions: ',', ';', a space or a tabulation
Only the 3 first columns will be read, they are expected to contain x, y and z of the point, in this order.
No header will be read. If the file contains a header, this can prevent Scan to recognize it, just add a comment mark: '#' at the beginning of the line and Scan will ignore it.
Exemple of correct formats :
# X Y Z -0.32425001 13.35400009 8.87129974 -0.32045999 13.34899998 8.87180042 -0.30118999 13.33800030 8.88150024
-0.32425001 13.35400009 8.87129974 -0.32045999 13.34899998 8.87180042 -0.30118999 13.33800030 8.88150024
//X Y Z Rf Gf Bf V4 Original_cloud_index -0.32425001 13.35400009 8.87129974 1 1 1 0.000000 0.000000 -0.32045999 13.34899998 8.87180042 1 1 1 0.000000 0.000000 -0.30118999 13.33800030 8.88150024 1 1 1 0.000000 0.000000
Stage 2: topology file
Once the Scan file loaded, you may import a topology file to be corrected, with one of the following commands of the 'File > Import a topology' menu.
Import a SimpleTree CSV file (standalone)
SimpleTree is originally a standalone program by Jan Hackenberg, its resulting topology files can be imported for correction in Scan.
In is an example file, you can notice the columns separator is a ',' and the first line is a header which is needed here for interpreting this particular file (no comment mark at the start).
fileName , startX, startY, startZ, endX, endY, endZ, volume, radius, length, GrowthVolume, SegmentID, ParentSegmentID, BranchID, BranchOrder, median Radius Segment, volume to Root, noyer_restincliere.asc,7.86395,2.78193,0.1,7.88594,2.80018,-0.902789,0.0500025,0.125959,1.0032,0.206166,1,-1,0,0,0.0924166,0.169749 noyer_restincliere.asc,7.88594,2.80018,-0.902789,7.90793,2.81844,-0.528831,0.0189041,0.126666,0.375048,0.156164,1,-1,0,0,0.0924166,0.169749 noyer_restincliere.asc,7.90793,2.81844,-0.528831,7.91083,2.82404,-0.189481,0.0163395,0.123789,0.339409,0.137259,1,-1,0,0,0.0924166,0.169749 noyer_restincliere.asc,7.91083,2.82404,-0.189481,7.92758,2.80956,0.155308,0.0146546,0.116195,0.345499,0.12092,1,-1,0,0,0.0924166,0.169749 noyer_restincliere.asc,7.92758,2.80956,0.155308,7.93791,2.79541,0.47323,0.0136629,0.116871,0.318404,0.106265,1,-1,0,0,0.0924166,0.169749
The same file opened in a spreadsheet program:
Import a SimpleTree CSV file (Computree)
SimpleTree has been reimplemented in Computree (ONF, Jan Hackenberg, Alexandre Piboule) and it generates a different file format.
Here the separator is a ';' and the header is also needed for interpreting the file (no comment mark at the start).
startX;startY;startZ;endX;endY;endZ;radius;segment_ID;parent_segment_ID;branch_ID 7.86395;2.78193 0.1;7.88594;2.80018;-0.902789;0.125959;1;-1;0 7.88594;2.80018;-0.902789;7.90793;2.81844;-0.528831;0.126666;1;-1;0
Import a PlantScan3D MTG file
PlantScan3D (Frédéric Boudon, Cirad AGAP, Montpellier) exports its topology in MTG formats that can be read by AMAPstudio-Scan.
Import a TreeQSM file (2016 or 2.3.2)
TreeQSM is a modelling method that reconstructs quantitative structure models (QSMs) of trees from point clouds. A QSM consists of a hierarchical collection of cylinders which estimate topological, geometrical and volumetric details of the woody structure of the tree (Pasi Raumonen, Tempere University, Finland).
Scan can read two file formats from TreeQSM, called '2016' (13 columns) and '2.3.2' (15 columns).
TreeQSM 2.3.2 example file (15 columns, tab separator between columns):
RADIUS LENGTH START_X START_Y START_Z AXIS_X AXIS_Y AXIS_Z PARENT EXTENSION ADDED UNMOD_RADIUS BRANCH BRANCH_ORDER POSITION_IN_BRANCH 0.09210452 0.79527688 5.213797 7.483417 100.5459 -0.1848059 0.04393725 0.98179239 0 0 0 0 0 1 0 0.09210452 0.36797127 5.06682514 7.51835928 101.32669681 -0.12698812 -0.22686 0.96561305 1 0 0 0 0 1 0 0.09087759 0.20645586 5.02009716 7.43488131 101.68201468 0.02836803 0.18177487 0.9829309 2 0 0 0 0 1 0 0.09049156 0.20946892 5.0259539 7.4724098 101.88494653 0.12813252 0.1651372 0.97791194 3 0 0 0 0 1 0 0.08793977 0.21994007 5.05279368 7.50700091 102.08978868 -0.08169556 -0.00433805 0.99664789 4 0 0 0 0 1 0
Import an OPF file
This feature makes it possible to reload a .opf file that was exported from Scan (to be loaded and processed in AMAPstudio-Xplo).