| 418 | } |
| 419 | |
| 420 | size_t WriterImpl::WriteImage2DData( int64_t imageIndex, Image2DType imageType, |
| 421 | Image2DProjection imageProjection, uint8_t *pBuffer, |
| 422 | int64_t start, size_t count ) |
| 423 | { |
| 424 | if ( ( imageIndex < 0 ) || ( imageIndex >= images2D_.childCount() ) ) |
| 425 | { |
| 426 | return 0; |
| 427 | } |
| 428 | |
| 429 | const StructureNode image( images2D_.get( imageIndex ) ); |
| 430 | |
| 431 | switch ( imageProjection ) |
| 432 | { |
| 433 | case ProjectionNone: |
| 434 | return 0; |
| 435 | |
| 436 | case ProjectionVisual: |
| 437 | if ( image.isDefined( "visualReferenceRepresentation" ) ) |
| 438 | { |
| 439 | StructureNode visualReferenceRepresentation( |
| 440 | image.get( "visualReferenceRepresentation" ) ); |
| 441 | return _writeImage2DNode( visualReferenceRepresentation, imageType, pBuffer, start, |
| 442 | count ); |
| 443 | } |
| 444 | break; |
| 445 | |
| 446 | case ProjectionPinhole: |
| 447 | if ( image.isDefined( "pinholeRepresentation" ) ) |
| 448 | { |
| 449 | StructureNode pinholeRepresentation( image.get( "pinholeRepresentation" ) ); |
| 450 | return _writeImage2DNode( pinholeRepresentation, imageType, pBuffer, start, count ); |
| 451 | } |
| 452 | break; |
| 453 | |
| 454 | case ProjectionSpherical: |
| 455 | if ( image.isDefined( "sphericalRepresentation" ) ) |
| 456 | { |
| 457 | StructureNode sphericalRepresentation( image.get( "sphericalRepresentation" ) ); |
| 458 | return _writeImage2DNode( sphericalRepresentation, imageType, pBuffer, start, |
| 459 | count ); |
| 460 | } |
| 461 | break; |
| 462 | |
| 463 | case ProjectionCylindrical: |
| 464 | if ( image.isDefined( "cylindricalRepresentation" ) ) |
| 465 | { |
| 466 | StructureNode cylindricalRepresentation( image.get( "cylindricalRepresentation" ) ); |
| 467 | return _writeImage2DNode( cylindricalRepresentation, imageType, pBuffer, start, |
| 468 | count ); |
| 469 | } |
| 470 | break; |
| 471 | } |
| 472 | |
| 473 | return 0; |
| 474 | } |
| 475 | |
| 476 | int64_t WriterImpl::NewData3D( Data3D &data3DHeader ) |
| 477 | { |
nothing calls this directly
no test coverage detected