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

Method GetImage2DSizes

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

Returns the image sizes

Source from the content-addressed store, hash-verified

489
490 // Returns the image sizes
491 bool ReaderImpl::GetImage2DSizes( int64_t imageIndex, Image2DProjection &imageProjection,
492 Image2DType &imageType, int64_t &imageWidth,
493 int64_t &imageHeight, int64_t &imageSize,
494 Image2DType &imageMaskType,
495 Image2DType &imageVisualType ) const
496 {
497 if ( ( imageIndex < 0 ) || ( imageIndex >= images2D_.childCount() ) )
498 {
499 return false;
500 }
501
502 imageProjection = ProjectionNone;
503 imageType = ImageNone;
504 imageMaskType = ImageNone;
505 imageVisualType = ImageNone;
506
507 const StructureNode image( images2D_.get( imageIndex ) );
508
509 if ( image.isDefined( "visualReferenceRepresentation" ) )
510 {
511 const StructureNode visualReferenceRepresentation(
512 image.get( "visualReferenceRepresentation" ) );
513
514 bool ret = _getImage2DNodeSizes( visualReferenceRepresentation, imageType, imageWidth,
515 imageHeight, imageSize, imageMaskType );
516 imageProjection = ProjectionVisual;
517 imageVisualType = imageType;
518
519 return ret;
520 }
521
522 if ( image.isDefined( "pinholeRepresentation" ) )
523 {
524 const StructureNode pinholeRepresentation( image.get( "pinholeRepresentation" ) );
525
526 imageProjection = ProjectionPinhole;
527
528 return _getImage2DNodeSizes( pinholeRepresentation, imageType, imageWidth, imageHeight,
529 imageSize, imageMaskType );
530 }
531
532 if ( image.isDefined( "sphericalRepresentation" ) )
533 {
534 const StructureNode sphericalRepresentation( image.get( "sphericalRepresentation" ) );
535
536 imageProjection = ProjectionSpherical;
537
538 return _getImage2DNodeSizes( sphericalRepresentation, imageType, imageWidth, imageHeight,
539 imageSize, imageMaskType );
540 }
541
542 if ( image.isDefined( "cylindricalRepresentation" ) )
543 {
544 const StructureNode cylindricalRepresentation( image.get( "cylindricalRepresentation" ) );
545
546 imageProjection = ProjectionCylindrical;
547
548 return _getImage2DNodeSizes( cylindricalRepresentation, imageType, imageWidth, imageHeight,

Callers

nothing calls this directly

Calls 4

_getImage2DNodeSizesFunction · 0.85
childCountMethod · 0.45
getMethod · 0.45
isDefinedMethod · 0.45

Tested by

no test coverage detected