Skip to content

Commit

Permalink
Support TRK file properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
haehn committed Jul 23, 2019
1 parent f59beb2 commit e851bf7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions io/parserTRK.js
Expand Up @@ -115,6 +115,7 @@ X.parserTRK.prototype.parse = function(container, object, data, flag) {
// if n_count not provided, we parse the data until end of points // if n_count not provided, we parse the data until end of points
var numberOfFibers = (header.n_count === 0) ? Infinity : header.n_count; var numberOfFibers = (header.n_count === 0) ? Infinity : header.n_count;
var numberOfScalars = header.n_scalars; var numberOfScalars = header.n_scalars;
var numberOfProperties = header.n_properties;


// loop through all fibers // loop through all fibers
var fibers = []; var fibers = [];
Expand Down Expand Up @@ -195,11 +196,11 @@ X.parserTRK.prototype.parse = function(container, object, data, flag) {


} }


offset += numPoints * 3 + numPoints * numberOfScalars + 1; offset += numPoints * 3 + numPoints * numberOfScalars + numberOfProperties + 1;




// read additional properties // read additional properties
// var properties = this.scan('float', header.n_properties); var properties = this.scan('float', numberOfProperties);


// we need to get the bounding box of the whole .trk file before we add the // we need to get the bounding box of the whole .trk file before we add the
// points to properly setup normals // points to properly setup normals
Expand Down

0 comments on commit e851bf7

Please sign in to comment.