MCPcopy Create free account
hub / github.com/PDAL/PDAL / GetData3DSizes

Method GetData3DSizes

plugins/e57/libE57Format/src/ReaderImpl.cpp:1383–1497  ·  view source on GitHub ↗

This function returns the size of the point data

Source from the content-addressed store, hash-verified

1381
1382 // This function returns the size of the point data
1383 bool ReaderImpl::GetData3DSizes( int64_t dataIndex, int64_t &row, int64_t &column,
1384 int64_t &pointsSize, int64_t &groupsSize, int64_t &countSize,
1385 bool &bColumnIndex ) const
1386 {
1387 int64_t elementSize = 0;
1388
1389 row = 0;
1390 column = 0;
1391 pointsSize = 0;
1392 groupsSize = 0;
1393 countSize = 0;
1394 bColumnIndex = false;
1395
1396 if ( !IsOpen() || ( dataIndex < 0 ) || ( dataIndex >= data3D_.childCount() ) )
1397 {
1398 return false;
1399 }
1400
1401 const StructureNode scan( data3D_.get( dataIndex ) );
1402 const CompressedVectorNode points( scan.get( "points" ) );
1403
1404 pointsSize = points.childCount();
1405
1406 if ( scan.isDefined( "indexBounds" ) )
1407 {
1408 const StructureNode indexBounds( scan.get( "indexBounds" ) );
1409
1410 if ( indexBounds.isDefined( "columnMaximum" ) )
1411 {
1412 column = IntegerNode( indexBounds.get( "columnMaximum" ) ).value() -
1413 IntegerNode( indexBounds.get( "columnMinimum" ) ).value() + 1;
1414 }
1415
1416 if ( indexBounds.isDefined( "rowMaximum" ) )
1417 {
1418 row = IntegerNode( indexBounds.get( "rowMaximum" ) ).value() -
1419 IntegerNode( indexBounds.get( "rowMinimum" ) ).value() + 1;
1420 }
1421 }
1422
1423 if ( scan.isDefined( "pointGroupingSchemes" ) )
1424 {
1425 const StructureNode pointGroupingSchemes( scan.get( "pointGroupingSchemes" ) );
1426
1427 if ( pointGroupingSchemes.isDefined( "groupingByLine" ) )
1428 {
1429 const StructureNode groupingByLine( pointGroupingSchemes.get( "groupingByLine" ) );
1430 const StringNode idElementName( groupingByLine.get( "idElementName" ) );
1431
1432 if ( idElementName.value() == "columnIndex" )
1433 {
1434 bColumnIndex = true;
1435 }
1436
1437 const CompressedVectorNode groups( groupingByLine.get( "groups" ) );
1438 const StructureNode lineGroupRecord( groups.prototype() );
1439
1440 groupsSize = groups.childCount();

Callers

nothing calls this directly

Calls 8

IntegerNodeClass · 0.85
prototypeMethod · 0.80
childCountMethod · 0.45
getMethod · 0.45
isDefinedMethod · 0.45
valueMethod · 0.45
maximumMethod · 0.45
minimumMethod · 0.45

Tested by

no test coverage detected