PTX is an ASCII based interchange format for point cloud data. It utilizes the concept of separate scans, each with points defined in their own coordinate system and a “Registration” of all of those point clouds into a single coordinate system. The point data for each cloud is stored in its original coordinate system and a matrix of transforms for each point cloud are provided as header information.
A PTX file can have one or more point clouds. Each point cloud starts with a header. Each following line then describes one point in the cloud.
PTX point cloud header:
number of columns
number of rows
st1 st2 st3 ; scanner registered position
sx1 sx2 sx3 ; scanner registered axis 'X'
sy1 sy2 sy3 ; scanner registered axis 'Y'
sz1 sz2 sz3 ; scanner registered axis 'Z'
r11 r12 r13 0 ; transformation matrix
r21 r22 r23 0 ; this is a simple rotation and translation 4x4 matrix
r31 r32 r33 0 ; just apply to each point to get the transformed coordinate
tr1 tr2 tr3 1 ; use double-precision variables
The first four lines of three numbers each are the position and primary axes of the scanner after any registration/transformation. The next four lines of four numbers each may look similar in some cases, but if you have a non-identity UCS when the PTX was exported, the numbers will look different. If the cloud was untransformed by a registration (or not registered), the first four lines of three numbers each would be 0,0,0; 1,0,0; 0,1,0; 0,0,1. The 4x4 matrix may not be identity if there is a UCS applied.
Note that a cloud that was registered may have a 4x4 identity matrix due to a UCS that is set to that scanner's registered position. For both formats, in a point cloud with color (i.e., the R G B values are present for each point in that cloud), the RGB value (0, 0, 0) is reserved to mean "no color". An example where this might happen would be if a digital camera did not cover that point. That point then has "no color", even though other points may have color.
Currently PTX import only supports files of 2 Gigabytes or less. Attempts to import files larger that this will generate an error: " Seek Failed..."