Commit d4305d0c authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX #246] replaced shared_*_cast by *_pointer_cast

parent c1d0b26a
......@@ -234,7 +234,7 @@ WValue< double > WMClusterSlicer::meanParameter( boost::shared_ptr< std::set< WP
std::vector< double > samples;
samples.reserve( samplePoints->size() );
boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_clusterDS->getGrid() );
boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_clusterDS->getGrid() );
assert( grid != 0 );
for( std::set< WPosition >::iterator pos = samplePoints->begin(); pos != samplePoints->end(); )
......@@ -575,7 +575,7 @@ void WMClusterSlicer::updateDisplay( bool force )
osg::ref_ptr< osg::Geode > WMClusterSlicer::generateIsoVoxelGeode() const
{
boost::shared_ptr< std::set< WPosition > > points( new std::set< WPosition > );
boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_clusterDS->getGrid() );
boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_clusterDS->getGrid() );
assert( grid != 0 );
for( std::set< size_t >::const_iterator cit = m_isoVoxels->begin(); cit != m_isoVoxels->end(); ++cit )
{
......
......@@ -224,7 +224,7 @@ void WMFiberStipples::initOSG( boost::shared_ptr< WDataSetScalar > probTract )
osg::ref_ptr< osg::Uniform > u_aVec = new osg::Uniform( "u_aVec", osg::Vec3( sizes[0], 0.0, 0.0 ) );
osg::ref_ptr< osg::Uniform > u_bVec = new osg::Uniform( "u_bVec", osg::Vec3( 0.0, 0.0, sizes[2] ) );
osg::ref_ptr< osg::Uniform > u_WorldTransform = new osg::Uniform( "u_WorldTransform", osg::Matrix::identity() );
boost::shared_ptr< const WGridRegular3D > grid = boost::shared_dynamic_cast< const WGridRegular3D >( probTract->getGrid() );
boost::shared_ptr< const WGridRegular3D > grid = boost::dynamic_pointer_cast< const WGridRegular3D >( probTract->getGrid() );
if( !grid )
{
errorLog() << "This module can only process probabilistic Tracts with regular 3D grids, Hence you may see garbage from now on.";
......@@ -294,7 +294,7 @@ void WMFiberStipples::moduleMain()
boost::shared_ptr< WDataSetVector > vectors = m_vectorIC->getData();
boost::shared_ptr< WDataSetScalar > probTract = m_probIC->getData();
if( !( vectors && probTract ) || !boost::shared_dynamic_cast< WGridRegular3D >( probTract->getGrid() ) ) // if data valid
if( !( vectors && probTract ) || !boost::dynamic_pointer_cast< WGridRegular3D >( probTract->getGrid() ) ) // if data valid
{
continue;
}
......
......@@ -119,7 +119,7 @@ namespace
osg::Vec3 bNorm = b;
bNorm.normalize();
boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( data->getGrid() );
boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( data->getGrid() );
if( grid )
{
......
......@@ -394,7 +394,7 @@ void WMTransferCalc::moduleMain()
else
{
// grab the grid
m_grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
if( !m_grid )
{
errorLog() << "The dataset does not provide a regular grid. Ignoring dataset.";
......@@ -420,7 +420,7 @@ void WMTransferCalc::moduleMain()
else
{
// grab the grid
m_deriGrid = boost::shared_dynamic_cast< WGridRegular3D >( m_deriDataSet->getGrid() );
m_deriGrid = boost::dynamic_pointer_cast< WGridRegular3D >( m_deriDataSet->getGrid() );
if( !m_deriGrid )
{
errorLog() << "The derivated dataset does not provide a regular grid. Ignoring dataset.";
......@@ -453,7 +453,7 @@ void WMTransferCalc::moduleMain()
else
{
// grab the grid
m_FAgrid = boost::shared_dynamic_cast< WGridRegular3D >( m_FAdataSet->getGrid() );
m_FAgrid = boost::dynamic_pointer_cast< WGridRegular3D >( m_FAdataSet->getGrid() );
if( !m_FAgrid )
{
errorLog() << "The FA dataset does not provide a regular grid. Ignoring dataset.";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment