~noskcaj/ubuntu/saucy/openwalnut/liberation

« back to all changes in this revision

Viewing changes to src/modules/openIGTLink/WIGTLinkRemote.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-05-24 03:12:03 UTC
  • Revision ID: package-import@ubuntu.com-20130524031203-l5g1lzm1vd83fupi
Tags: 1.3.1+hg5849-1ubuntu1
Cherrypick boost1.53 pointer cast fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
        ts0->SetTime( 123456.78 );
346
346
 
347
347
        imgMeta->SetTimeStamp( ts0 );
348
 
        boost::shared_ptr < WGridRegular3D > g3dr( boost::shared_dynamic_cast < WGridRegular3D > ( dataSets[ i ]->getGrid() ) );
 
348
        boost::shared_ptr < WGridRegular3D > g3dr( boost::dynamic_pointer_cast < WGridRegular3D > ( dataSets[ i ]->getGrid() ) );
349
349
        imgMeta->SetSize( g3dr->getNbCoordsX(), g3dr->getNbCoordsY(), g3dr->getNbCoordsZ() );
350
350
        imgMeta->SetScalarType( convertTypeOWtoIGTL( dataSets[ i ]->getValueSet()->getDataType() ) );
351
351
        imgMetaMsg->AddImageMetaElement( imgMeta );
361
361
    size_t getRawSizeT( boost::shared_ptr < WValueSetBase >  valueSet )
362
362
    {
363
363
        typedef typename DataTypeRT<DT>::type type;
364
 
        boost::shared_ptr < WValueSet < type > > v = boost::shared_dynamic_cast < WValueSet < type > >( valueSet );
 
364
        boost::shared_ptr < WValueSet < type > > v = boost::dynamic_pointer_cast < WValueSet < type > >( valueSet );
365
365
        WAssert( v, "Type cast failed" );
366
366
        return valueSet->rawSize() * sizeof( type );
367
367
    }
371
371
    {
372
372
        typedef typename DataTypeRT<DT>::type type;
373
373
        boost::shared_ptr < WValueSet < type > > v;
374
 
        v = boost::shared_dynamic_cast < WValueSet < type > >( valueSet );
 
374
        v = boost::dynamic_pointer_cast < WValueSet < type > >( valueSet );
375
375
        WAssert( v, "Type cast failed" );
376
376
        const void* ptr = v->rawData();
377
377
        WAssert( ptr != 0, "Trying to query raw data, got null pointer" );
485
485
    if( socket.IsNotNull() )
486
486
    {
487
487
        int size[ 3 ];
488
 
        boost::shared_ptr < WGridRegular3D > g3dr( boost::shared_dynamic_cast < WGridRegular3D > ( dataSetScalar->getGrid() ) );
 
488
        boost::shared_ptr < WGridRegular3D > g3dr( boost::dynamic_pointer_cast < WGridRegular3D > ( dataSetScalar->getGrid() ) );
489
489
        size[ 0 ] = g3dr->getNbCoordsX();
490
490
        size[ 1 ] = g3dr->getNbCoordsY();
491
491
        size[ 2 ] = g3dr->getNbCoordsZ();