# HG changeset patch
# User Sebastian Eichelbaum <eichelbaum@informatik.uni-leipzig.de>
# Date 1361198502 -3600
# Node ID 2ef66d630c39b744a3fd7f3a037397432b0b95cd
# Parent  48b02501dc4a9cd20fe4053e5d3cedc0946999d3
[FIX #246] replaced shared_*_cast by *_pointer_cast

--- a/src/core/common/WPropertyBase.cpp
+++ b/src/core/common/WPropertyBase.cpp
@@ -115,67 +115,67 @@
 
 WPropInt WPropertyBase::toPropInt()
 {
-    return boost::shared_static_cast< WPVInt >( shared_from_this() );
+    return boost::static_pointer_cast< WPVInt >( shared_from_this() );
 }
 
 WPropDouble WPropertyBase::toPropDouble()
 {
-    return boost::shared_static_cast< WPVDouble >( shared_from_this() );
+    return boost::static_pointer_cast< WPVDouble >( shared_from_this() );
 }
 
 WPropBool WPropertyBase::toPropBool()
 {
-    return boost::shared_static_cast< WPVBool >( shared_from_this() );
+    return boost::static_pointer_cast< WPVBool >( shared_from_this() );
 }
 
 WPropString WPropertyBase::toPropString()
 {
-    return boost::shared_static_cast< WPVString >( shared_from_this() );
+    return boost::static_pointer_cast< WPVString >( shared_from_this() );
 }
 
 WPropFilename WPropertyBase::toPropFilename()
 {
-    return boost::shared_static_cast< WPVFilename >( shared_from_this() );
+    return boost::static_pointer_cast< WPVFilename >( shared_from_this() );
 }
 
 WPropSelection WPropertyBase::toPropSelection()
 {
-    return boost::shared_static_cast< WPVSelection >( shared_from_this() );
+    return boost::static_pointer_cast< WPVSelection >( shared_from_this() );
 }
 
 WPropColor WPropertyBase::toPropColor()
 {
-    return boost::shared_static_cast< WPVColor >( shared_from_this() );
+    return boost::static_pointer_cast< WPVColor >( shared_from_this() );
 }
 
 WPropPosition WPropertyBase::toPropPosition()
 {
-    return boost::shared_static_cast< WPVPosition >( shared_from_this() );
+    return boost::static_pointer_cast< WPVPosition >( shared_from_this() );
 }
 
 WPropGroup WPropertyBase::toPropGroup()
 {
-    return boost::shared_static_cast< WPVGroup >( shared_from_this() );
+    return boost::static_pointer_cast< WPVGroup >( shared_from_this() );
 }
 
 WPropertyGroupBase::SPtr WPropertyBase::toPropGroupBase()
 {
-    return boost::shared_static_cast< WPropertyGroupBase >( shared_from_this() );
+    return boost::static_pointer_cast< WPropertyGroupBase >( shared_from_this() );
 }
 
 WPropMatrix4X4 WPropertyBase::toPropMatrix4X4()
 {
-    return boost::shared_static_cast< WPVMatrix4X4 >( shared_from_this() );
+    return boost::static_pointer_cast< WPVMatrix4X4 >( shared_from_this() );
 }
 
 WPropTrigger WPropertyBase::toPropTrigger()
 {
-    return boost::shared_static_cast< WPVTrigger >( shared_from_this() );
+    return boost::static_pointer_cast< WPVTrigger >( shared_from_this() );
 }
 
 WPropTransferFunction WPropertyBase::toPropTransferFunction()
 {
-    return boost::shared_static_cast< WPVTransferFunction >( shared_from_this() );
+    return boost::static_pointer_cast< WPVTransferFunction >( shared_from_this() );
 }
 
 boost::shared_ptr< WCondition > WPropertyBase::getUpdateCondition() const
--- a/src/core/common/WPropertyBase.h
+++ b/src/core/common/WPropertyBase.h
@@ -349,7 +349,7 @@
 template< typename T >
 boost::shared_ptr< WPropertyVariable< T > > WPropertyBase::toPropertyVariable()
 {
-    return boost::shared_dynamic_cast< WPropertyVariable< T > >( shared_from_this() );
+    return boost::dynamic_pointer_cast< WPropertyVariable< T > >( shared_from_this() );
 }
 
 #endif  // WPROPERTYBASE_H
--- a/src/core/common/WPropertyGroup.cpp
+++ b/src/core/common/WPropertyGroup.cpp
@@ -145,7 +145,7 @@
 bool WPropertyGroup::set( boost::shared_ptr< WPropertyBase > value, bool recommendedOnly )
 {
     // is this the same type as we are?
-    WPropertyGroup::SPtr v = boost::shared_dynamic_cast< WPropertyGroup >( value );
+    WPropertyGroup::SPtr v = boost::dynamic_pointer_cast< WPropertyGroup >( value );
     if( !v )
     {
         // it is not a WPropertyStruct with the same type
--- a/src/core/common/WPropertyList.h
+++ b/src/core/common/WPropertyList.h
@@ -168,7 +168,7 @@
     virtual bool set( boost::shared_ptr< WPropertyBase > value )
     {
         // is this the same type as we are?
-        typename WPropertyListType::SPtr v = boost::shared_dynamic_cast< WPropertyListType >( value );
+        typename WPropertyListType::SPtr v = boost::dynamic_pointer_cast< WPropertyListType >( value );
         if( !v )
         {
             // it is not a WPropertyList with the same type
--- a/src/core/common/WPropertyStruct.h
+++ b/src/core/common/WPropertyStruct.h
@@ -278,7 +278,7 @@
     typename boost::mpl::at< TypeVector, boost::mpl::size_t< N > >::type getProperty()
     {
         typedef typename boost::mpl::at< TypeVector, boost::mpl::size_t< N > >::type::element_type TargetType;
-        return boost::shared_dynamic_cast< TargetType >( getProperty( N ) );
+        return boost::dynamic_pointer_cast< TargetType >( getProperty( N ) );
     }
 
     /**
@@ -292,7 +292,7 @@
     typename boost::mpl::at< TypeVector, boost::mpl::size_t< N > >::type::element_type::ConstSPtr getProperty() const
     {
         typedef typename boost::mpl::at< TypeVector, boost::mpl::size_t< N > >::type::element_type TargetType;
-        return boost::shared_dynamic_cast< const TargetType >( getProperty( N ) );
+        return boost::dynamic_pointer_cast< const TargetType >( getProperty( N ) );
     }
 
     /**
@@ -428,7 +428,7 @@
     virtual bool set( boost::shared_ptr< WPropertyBase > value, bool recommendedOnly = false )
     {
         // is this the same type as we are?
-        typename WPropertyStructType::SPtr v = boost::shared_dynamic_cast< WPropertyStructType >( value );
+        typename WPropertyStructType::SPtr v = boost::dynamic_pointer_cast< WPropertyStructType >( value );
         if( !v )
         {
             // it is not a WPropertyStruct with the same type
--- a/src/core/common/WPropertyVariable.h
+++ b/src/core/common/WPropertyVariable.h
@@ -584,7 +584,7 @@
     bool acceptable = WFlag< T >::accept( newValue );
     for( typename ConstraintContainerType::ConstIterator it = l->get().begin(); it !=  l->get().end(); ++it )
     {
-        acceptable &= ( *it )->accept( boost::shared_static_cast< WPropertyVariable< T > >( shared_from_this() ), newValue );
+        acceptable &= ( *it )->accept( boost::static_pointer_cast< WPropertyVariable< T > >( shared_from_this() ), newValue );
     }
 
     return acceptable;
@@ -620,7 +620,7 @@
 bool WPropertyVariable< T >::set( boost::shared_ptr< WPropertyBase > value, bool recommendedOnly )
 {
     // try to cast the given property to a WPropertyVariable of right type:
-    boost::shared_ptr< WPropertyVariable< T > > v = boost::shared_dynamic_cast< WPropertyVariable< T > >( value );
+    boost::shared_ptr< WPropertyVariable< T > > v = boost::dynamic_pointer_cast< WPropertyVariable< T > >( value );
     if( v )
     {
         if( recommendedOnly )
@@ -795,7 +795,7 @@
     }
 
     // cast to proper type
-    return boost::shared_static_cast< WPropertyConstraintMin< T > >( c );
+    return boost::static_pointer_cast< WPropertyConstraintMin< T > >( c );
 }
 
 template < typename T >
@@ -810,7 +810,7 @@
     }
 
     // cast to proper type
-    return boost::shared_static_cast< WPropertyConstraintMax< T > >( c );
+    return boost::static_pointer_cast< WPropertyConstraintMax< T > >( c );
 }
 
 template< typename T >
--- a/src/core/dataHandler/WDataSetDTI.cpp
+++ b/src/core/dataHandler/WDataSetDTI.cpp
@@ -59,7 +59,7 @@
 
 WTensorSym< 2, 3, float > WDataSetDTI::getTensor( size_t index ) const
 {
-    boost::shared_ptr< WValueSet< float > > values = boost::shared_dynamic_cast< WValueSet< float > >( m_valueSet );
+    boost::shared_ptr< WValueSet< float > > values = boost::dynamic_pointer_cast< WValueSet< float > >( m_valueSet );
     WAssert( values, "The value set of a WDataSetDTI must be a WValueSet< float >, nothing else!" );
     return WTensorSym< 2, 3, float >( values->getWValue( index ) );
 }
--- a/src/core/dataHandler/WDataSetFibers.cpp
+++ b/src/core/dataHandler/WDataSetFibers.cpp
@@ -205,12 +205,12 @@
 
 WDataSetFibers::ColorArray WDataSetFibers::getGlobalColors() const
 {
-    return boost::shared_static_cast< const ColorScheme >( ( *m_colors )[0] )->getColor();
+    return boost::static_pointer_cast< const ColorScheme >( ( *m_colors )[0] )->getColor();
 }
 
 WDataSetFibers::ColorArray WDataSetFibers::getLocalColors() const
 {
-    return boost::shared_static_cast< const ColorScheme >( ( *m_colors )[1] )->getColor();
+    return boost::static_pointer_cast< const ColorScheme >( ( *m_colors )[1] )->getColor();
 }
 
 void WDataSetFibers::addColorScheme( WDataSetFibers::ColorArray colors, std::string name, std::string description )
@@ -243,7 +243,7 @@
     WItemSelection::Iterator i = l->get().begin();
     while( i != l->get().end() )
     {
-        if( boost::shared_static_cast< const ColorScheme >( *i )->getColor() == colors )
+        if( boost::static_pointer_cast< const ColorScheme >( *i )->getColor() == colors )
         {
             i = l->get().erase( i );
         }
@@ -260,7 +260,7 @@
     WItemSelection::WriteTicket l = m_colors->getWriteTicket();
     for( WItemSelection::Iterator i = l->get().begin(); i != l->get().end(); ++i )
     {
-        boost::shared_ptr< ColorScheme > ci = boost::shared_static_cast< ColorScheme >( *i );
+        boost::shared_ptr< ColorScheme > ci = boost::static_pointer_cast< ColorScheme >( *i );
         if(ci->getColor() == oldColors )
         {
             ci->setColor( newColors );
@@ -279,18 +279,18 @@
         throw WDHNoSuchDataSet( std::string( "Color scheme with specified name could not be found." ) );
     }
 
-    return boost::shared_static_cast< ColorScheme >( *i );
+    return boost::static_pointer_cast< ColorScheme >( *i );
 }
 
 const boost::shared_ptr< WDataSetFibers::ColorScheme > WDataSetFibers::getColorScheme( size_t idx ) const
 {
     WItemSelection::ReadTicket l = m_colors->getReadTicket();
-    return boost::shared_static_cast< ColorScheme >( l->get()[ idx ] );
+    return boost::static_pointer_cast< ColorScheme >( l->get()[ idx ] );
 }
 
 const boost::shared_ptr< WDataSetFibers::ColorScheme > WDataSetFibers::getColorScheme() const
 {
-    return boost::shared_static_cast< ColorScheme >( m_colorProp->get().at( 0 ) );
+    return boost::static_pointer_cast< ColorScheme >( m_colorProp->get().at( 0 ) );
 }
 
 const WPropSelection WDataSetFibers::getColorSchemeProperty() const
--- a/src/core/dataHandler/WDataSetRawHARDI.h
+++ b/src/core/dataHandler/WDataSetRawHARDI.h
@@ -210,7 +210,7 @@
 {
     WValue< T > result( m_nonZeroGradientIndexes.size() );
     size_t idx = 0;
-    boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_valueSet );
+    boost::shared_ptr< WValueSet< T > > vs = boost::dynamic_pointer_cast< WValueSet< T > >( m_valueSet );
     WValue< T > signal( vs->getWValue( index ) );
     for( std::vector< size_t >::const_iterator cit = m_nonZeroGradientIndexes.begin(); cit != m_nonZeroGradientIndexes.end(); ++cit )
     {
--- a/src/core/dataHandler/WDataSetScalar.cpp
+++ b/src/core/dataHandler/WDataSetScalar.cpp
@@ -92,7 +92,7 @@
 
 double WDataSetScalar::interpolate( const WPosition& pos, bool* success ) const
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
 
     WAssert( grid, "This data set has a grid whose type is not yet supported for interpolation." );
     WAssert( ( m_valueSet->order() == 0 &&  m_valueSet->dimension() == 1 ),
@@ -145,7 +145,7 @@
 
 double WDataSetScalar::getValueAt( int x, int y, int z ) const
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
     size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
 
     return WDataSetSingle::getValueAt( id );
--- a/src/core/dataHandler/WDataSetScalar.h
+++ b/src/core/dataHandler/WDataSetScalar.h
@@ -187,8 +187,8 @@
 
 template< typename T > T WDataSetScalar::getValueAt( int x, int y, int z ) const
 {
-    boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_valueSet );
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+    boost::shared_ptr< WValueSet< T > > vs = boost::dynamic_pointer_cast< WValueSet< T > >( m_valueSet );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
 
     size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
 
--- a/src/core/dataHandler/WDataSetSegmentation.cpp
+++ b/src/core/dataHandler/WDataSetSegmentation.cpp
@@ -110,7 +110,7 @@
 
 float WDataSetSegmentation::getWMProbability( int x, int y, int z ) const
 {
-  boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+  boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
   size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
 
   return WDataSetSingle::getValueAt( whiteMatter + ( 3*id ) );
@@ -118,7 +118,7 @@
 
 float WDataSetSegmentation::getGMProbability( int x, int y, int z ) const
 {
-  boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+  boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
   size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
 
   return WDataSetSingle::getValueAt( grayMatter + ( 3*id ) );
@@ -126,7 +126,7 @@
 
 float WDataSetSegmentation::getCSFProbability( int x, int y, int z ) const
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
     size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
 
     return WDataSetSingle::getValueAt( csf + ( 3*id ) );
@@ -142,9 +142,9 @@
     WAssert( cerebrospinalFluid, "No CSF data given." );
 
     // check for same dimension of all three tissue types
-    boost::shared_ptr< WGridRegular3D > wm_grid = boost::shared_dynamic_cast< WGridRegular3D >( whiteMatter->getGrid() );
-    boost::shared_ptr< WGridRegular3D > gm_grid = boost::shared_dynamic_cast< WGridRegular3D >( grayMatter->getGrid() );
-    boost::shared_ptr< WGridRegular3D > csf_grid = boost::shared_dynamic_cast< WGridRegular3D >( cerebrospinalFluid->getGrid() );
+    boost::shared_ptr< WGridRegular3D > wm_grid = boost::dynamic_pointer_cast< WGridRegular3D >( whiteMatter->getGrid() );
+    boost::shared_ptr< WGridRegular3D > gm_grid = boost::dynamic_pointer_cast< WGridRegular3D >( grayMatter->getGrid() );
+    boost::shared_ptr< WGridRegular3D > csf_grid = boost::dynamic_pointer_cast< WGridRegular3D >( cerebrospinalFluid->getGrid() );
 
     WAssert( ( wm_grid->getNbCoordsX() == gm_grid->getNbCoordsX() ) &&  ( gm_grid->getNbCoordsX() == csf_grid->getNbCoordsX() ),
              "Different X size of GrayMatter, WhiteMatter or CSF-Input" );
@@ -207,7 +207,7 @@
 //   size_t WMVoxel = 0;
 //   size_t GMVoxel = 0;
 //   size_t CSFVoxel = 0;
-//   boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( getGrid() );
+//   boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( getGrid() );
 //   for( size_t x = 0; x < grid->getNbCoordsX(); x++ )
 //     for( size_t y = 0; y < grid->getNbCoordsY(); y++ )
 //       for( size_t z = 0; z < grid->getNbCoordsZ(); z++ )
--- a/src/core/dataHandler/WDataSetSegmentation.h
+++ b/src/core/dataHandler/WDataSetSegmentation.h
@@ -214,7 +214,7 @@
     {
       for( size_t voxelNumber = 0; voxelNumber < countVoxels; voxelNumber++ )
       {
-        data[ voxelNumber * voxelDim + dimIndex ] =  ( boost::shared_static_cast< WDataSetSingle > ( *it ) )->getValueAt< T >( voxelNumber );
+        data[ voxelNumber * voxelDim + dimIndex ] =  ( boost::static_pointer_cast< WDataSetSingle > ( *it ) )->getValueAt< T >( voxelNumber );
       }
       dimIndex++;
     }
@@ -224,8 +224,8 @@
 
 // template < typename T > T WDataSetSegmentation::getValueAt( int x, int y, int z )
 // {
-//     boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_valueSet );
-//     boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+//     boost::shared_ptr< WValueSet< T > > vs = boost::dynamic_pointer_cast< WValueSet< T > >( m_valueSet );
+//     boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
 //
 //     size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
 //
--- a/src/core/dataHandler/WDataSetSingle.cpp
+++ b/src/core/dataHandler/WDataSetSingle.cpp
@@ -54,7 +54,7 @@
     m_infoProperties->addProperty( m_grid->getInformationProperties() );
 
     // technically this should be placed into the WDataSetScalar, WDataSetVector and so on
-    boost::shared_ptr< WGridRegular3D > regGrid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
+    boost::shared_ptr< WGridRegular3D > regGrid = boost::dynamic_pointer_cast< WGridRegular3D >( m_grid );
     if( regGrid && ( m_valueSet->dimension() < 5 ) && ( m_valueSet->dimension() != 0 ) )
     {
         m_texture = osg::ref_ptr< WDataTexture3D >( new WDataTexture3D( m_valueSet, regGrid ) );
@@ -138,23 +138,23 @@
     {
         case W_DT_UNSIGNED_CHAR:
         {
-            return static_cast< double >( boost::shared_dynamic_cast< WValueSet< uint8_t > >( getValueSet() )->getScalar( id ) );
+            return static_cast< double >( boost::dynamic_pointer_cast< WValueSet< uint8_t > >( getValueSet() )->getScalar( id ) );
         }
         case W_DT_INT16:
         {
-            return static_cast< double >( boost::shared_dynamic_cast< WValueSet< int16_t > >( getValueSet() )->getScalar( id ) );
+            return static_cast< double >( boost::dynamic_pointer_cast< WValueSet< int16_t > >( getValueSet() )->getScalar( id ) );
         }
         case W_DT_SIGNED_INT:
         {
-            return static_cast< double >( boost::shared_dynamic_cast< WValueSet< int32_t > >( getValueSet() )->getScalar( id ) );
+            return static_cast< double >( boost::dynamic_pointer_cast< WValueSet< int32_t > >( getValueSet() )->getScalar( id ) );
         }
         case W_DT_FLOAT:
         {
-            return static_cast< double >( boost::shared_dynamic_cast< WValueSet< float > >( getValueSet() )->getScalar( id ) );
+            return static_cast< double >( boost::dynamic_pointer_cast< WValueSet< float > >( getValueSet() )->getScalar( id ) );
         }
         case W_DT_DOUBLE:
         {
-            return static_cast< double >( boost::shared_dynamic_cast< WValueSet< double > >( getValueSet() )->getScalar( id ) );
+            return static_cast< double >( boost::dynamic_pointer_cast< WValueSet< double > >( getValueSet() )->getScalar( id ) );
         }
         default:
             WAssert( false, "Unknow data type in dataset." );
--- a/src/core/dataHandler/WDataSetSingle.h
+++ b/src/core/dataHandler/WDataSetSingle.h
@@ -190,7 +190,7 @@
 
 template< typename T > T WDataSetSingle::getValueAt( size_t id )
 {
-    boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_valueSet );
+    boost::shared_ptr< WValueSet< T > > vs = boost::dynamic_pointer_cast< WValueSet< T > >( m_valueSet );
     return vs->getScalar( id );
 }
 #endif  // WDATASETSINGLE_H
--- a/src/core/dataHandler/WDataSetSphericalHarmonics.cpp
+++ b/src/core/dataHandler/WDataSetSphericalHarmonics.cpp
@@ -40,7 +40,7 @@
                                                         boost::shared_ptr< WGrid > newGrid ) :
     WDataSetSingle( newValueSet, newGrid ), m_valueSet( newValueSet )
 {
-    m_gridRegular3D = boost::shared_dynamic_cast< WGridRegular3D >( newGrid );
+    m_gridRegular3D = boost::dynamic_pointer_cast< WGridRegular3D >( newGrid );
     WAssert( newValueSet, "No value set given." );
     WAssert( newGrid, "No grid given." );
 }
--- a/src/core/dataHandler/WDataSetTimeSeries.cpp
+++ b/src/core/dataHandler/WDataSetTimeSeries.cpp
@@ -42,7 +42,7 @@
     WAssert( datasets.size() == times.size(), "" );
     std::vector< boost::shared_ptr< WDataSetScalar const > >::iterator dit;
     std::vector< float >::iterator tit;
-    boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( datasets.front()->getGrid() );
+    boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( datasets.front()->getGrid() );
     WAssert( g, "" );
     dataType d = datasets.front()->getValueSet()->getDataType();
     m_minValue = datasets.front()->getMin();
@@ -50,7 +50,7 @@
     for( dit = datasets.begin(), tit = times.begin(); dit != datasets.end() && tit != times.end(); ++dit, ++tit )
     {
         WAssert( *dit, "" );
-        WAssert( g == boost::shared_dynamic_cast< WGridRegular3D >( ( *dit )->getGrid() ), "" );
+        WAssert( g == boost::dynamic_pointer_cast< WGridRegular3D >( ( *dit )->getGrid() ), "" );
         WAssert( !wlimits::isNaN( *tit ), "" );
         WAssert( d == ( *dit )->getValueSet()->getDataType(), "" );
         WAssert( ( *dit )->getValueSet()->dimension() == 1, "" );
--- a/src/core/dataHandler/WDataSetTimeSeries.h
+++ b/src/core/dataHandler/WDataSetTimeSeries.h
@@ -295,8 +295,8 @@
     boost::shared_ptr< WDataSetScalar const > f = getDataSetPtrAtTimeSlice( lb );
     boost::shared_ptr< WDataSetScalar const > g = getDataSetPtrAtTimeSlice( ub );
     WAssert( f && g, "" );
-    boost::shared_ptr< WValueSet< Data_T > > vf = boost::shared_dynamic_cast< WValueSet< Data_T > >( f->getValueSet() );
-    boost::shared_ptr< WValueSet< Data_T > > vg = boost::shared_dynamic_cast< WValueSet< Data_T > >( g->getValueSet() );
+    boost::shared_ptr< WValueSet< Data_T > > vf = boost::dynamic_pointer_cast< WValueSet< Data_T > >( f->getValueSet() );
+    boost::shared_ptr< WValueSet< Data_T > > vg = boost::dynamic_pointer_cast< WValueSet< Data_T > >( g->getValueSet() );
     WAssert( vf && vg, "" );
     boost::shared_ptr< std::vector< Data_T > > values = boost::shared_ptr< std::vector< Data_T > >( new std::vector< Data_T >( vf->size() ) );
     float ml = ( ub - time ) / ( ub - lb );
--- a/src/core/dataHandler/WDataSetVector.cpp
+++ b/src/core/dataHandler/WDataSetVector.cpp
@@ -88,7 +88,7 @@
                                                  bool *success,
                                                  boost::shared_ptr< WGridRegular3D::CellVertexArray > vertexIds )
     {
-        boost::shared_ptr< const WGridRegular3D > grid = boost::shared_dynamic_cast< const WGridRegular3D >( i_grid );
+        boost::shared_ptr< const WGridRegular3D > grid = boost::dynamic_pointer_cast< const WGridRegular3D >( i_grid );
 
         WAssert( grid,  "This data set has a grid whose type is not yet supported for interpolation." );
         WAssert( ( i_valueSet->order() == 1 &&  i_valueSet->dimension() == 3 ),
@@ -180,23 +180,23 @@
     {
         case W_DT_UNSIGNED_CHAR:
         {
-            return boost::shared_dynamic_cast< WValueSet< uint8_t > >( getValueSet() )->getVector3D( index );
+            return boost::dynamic_pointer_cast< WValueSet< uint8_t > >( getValueSet() )->getVector3D( index );
         }
         case W_DT_INT16:
         {
-            return boost::shared_dynamic_cast< WValueSet< int16_t > >( getValueSet() )->getVector3D( index );
+            return boost::dynamic_pointer_cast< WValueSet< int16_t > >( getValueSet() )->getVector3D( index );
         }
         case W_DT_SIGNED_INT:
         {
-            return boost::shared_dynamic_cast< WValueSet< int32_t > >( getValueSet() )->getVector3D( index );
+            return boost::dynamic_pointer_cast< WValueSet< int32_t > >( getValueSet() )->getVector3D( index );
         }
         case W_DT_FLOAT:
         {
-            return boost::shared_dynamic_cast< WValueSet< float > >( getValueSet() )->getVector3D( index );
+            return boost::dynamic_pointer_cast< WValueSet< float > >( getValueSet() )->getVector3D( index );
         }
         case W_DT_DOUBLE:
         {
-            return boost::shared_dynamic_cast< WValueSet< double > >( getValueSet() )->getVector3D( index );
+            return boost::dynamic_pointer_cast< WValueSet< double > >( getValueSet() )->getVector3D( index );
         }
         default:
             WAssert( false, "Unknow data type in dataset." );
--- a/src/core/dataHandler/WDataSetVector.h
+++ b/src/core/dataHandler/WDataSetVector.h
@@ -155,7 +155,7 @@
 
 inline boost::shared_ptr< WDataSetVector > WDataSetVector::isVectorDataSet()
 {
-    return boost::shared_static_cast< WDataSetVector >( shared_from_this() );
+    return boost::static_pointer_cast< WDataSetVector >( shared_from_this() );
 }
 
 #endif  // WDATASETVECTOR_H
--- a/src/core/dataHandler/WDataTexture3D.cpp
+++ b/src/core/dataHandler/WDataTexture3D.cpp
@@ -78,77 +78,77 @@
     if( m_valueSet->getDataType() == W_DT_UINT8 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_UINT8";
-        boost::shared_ptr< WValueSet< uint8_t > > vs = boost::shared_dynamic_cast< WValueSet< uint8_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< uint8_t > > vs = boost::dynamic_pointer_cast< WValueSet< uint8_t > >( m_valueSet );
         uint8_t* source = const_cast< uint8_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_INT8 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_INT8";
-        boost::shared_ptr< WValueSet< int8_t > > vs = boost::shared_dynamic_cast< WValueSet< int8_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< int8_t > > vs = boost::dynamic_pointer_cast< WValueSet< int8_t > >( m_valueSet );
         int8_t* source = const_cast< int8_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_INT16 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_INT16";
-        boost::shared_ptr< WValueSet< int16_t > > vs = boost::shared_dynamic_cast< WValueSet< int16_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< int16_t > > vs = boost::dynamic_pointer_cast< WValueSet< int16_t > >( m_valueSet );
         int16_t* source = const_cast< int16_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_UINT16 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_UINT16";
-        boost::shared_ptr< WValueSet< uint16_t > > vs = boost::shared_dynamic_cast< WValueSet< uint16_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< uint16_t > > vs = boost::dynamic_pointer_cast< WValueSet< uint16_t > >( m_valueSet );
         uint16_t* source = const_cast< uint16_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_UINT32 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_UINT32";
-        boost::shared_ptr< WValueSet< uint32_t > > vs = boost::shared_dynamic_cast< WValueSet< uint32_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< uint32_t > > vs = boost::dynamic_pointer_cast< WValueSet< uint32_t > >( m_valueSet );
         uint32_t* source = const_cast< uint32_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_INT64 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_INT64";
-        boost::shared_ptr< WValueSet< int64_t > > vs = boost::shared_dynamic_cast< WValueSet< int64_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< int64_t > > vs = boost::dynamic_pointer_cast< WValueSet< int64_t > >( m_valueSet );
         int64_t* source = const_cast< int64_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_UINT64 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_UINT64";
-        boost::shared_ptr< WValueSet< uint64_t > > vs = boost::shared_dynamic_cast< WValueSet< uint64_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< uint64_t > > vs = boost::dynamic_pointer_cast< WValueSet< uint64_t > >( m_valueSet );
         uint64_t* source = const_cast< uint64_t* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_SIGNED_INT )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_SIGNED_INT";
-        boost::shared_ptr< WValueSet< int32_t > > vs = boost::shared_dynamic_cast< WValueSet< int32_t > >( m_valueSet );
+        boost::shared_ptr< WValueSet< int32_t > > vs = boost::dynamic_pointer_cast< WValueSet< int32_t > >( m_valueSet );
         int* source = const_cast< int* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_FLOAT )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_FLOAT";
-        boost::shared_ptr< WValueSet< float > > vs = boost::shared_dynamic_cast< WValueSet< float > >( m_valueSet );
+        boost::shared_ptr< WValueSet< float > > vs = boost::dynamic_pointer_cast< WValueSet< float > >( m_valueSet );
         float* source = const_cast< float* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_DOUBLE )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_DOUBLE";
-        boost::shared_ptr< WValueSet< double > > vs = boost::shared_dynamic_cast< WValueSet< double > >( m_valueSet );
+        boost::shared_ptr< WValueSet< double > > vs = boost::dynamic_pointer_cast< WValueSet< double > >( m_valueSet );
         double* source = const_cast< double* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
     else if( m_valueSet->getDataType() == W_DT_FLOAT128 )
     {
         wlog::debug( "WDataTexture3D" ) << "Creating Texture of type W_DT_FLOAT128";
-        boost::shared_ptr< WValueSet< long double > > vs = boost::shared_dynamic_cast< WValueSet< long double > >( m_valueSet );
+        boost::shared_ptr< WValueSet< long double > > vs = boost::dynamic_pointer_cast< WValueSet< long double > >( m_valueSet );
         long double* source = const_cast< long double* > ( vs->rawData() );
         ima = createTexture( source, m_valueSet->dimension() );
     }
--- a/src/core/dataHandler/WITKImageConversion.h
+++ b/src/core/dataHandler/WITKImageConversion.h
@@ -47,7 +47,7 @@
 template< typename T >
 typename itk::Image< T, 3 >::Pointer makeImageFromDataSet( boost::shared_ptr< WDataSetScalar const > dataSet )
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSet->getGrid() );
     WAssert( grid, "" );
 
     // this is a shared-pointer
--- a/src/core/dataHandler/WThreadedPerVoxelOperation.h
+++ b/src/core/dataHandler/WThreadedPerVoxelOperation.h
@@ -139,7 +139,7 @@
 WThreadedPerVoxelOperation< Value_T, numValues, Output_T, numOutputs >::WThreadedPerVoxelOperation(
                                                         boost::shared_ptr< WDataSetSingle const > dataset,
                                                         FunctionType func )
-    : BaseType( ( dataset ? boost::shared_dynamic_cast< ValueSetType >( dataset->getValueSet() )
+    : BaseType( ( dataset ? boost::dynamic_pointer_cast< ValueSetType >( dataset->getValueSet() )
                           : boost::shared_ptr< ValueSetType >() ) ) // NOLINT
 {
     if( !dataset )
--- a/src/core/dataHandler/WThreadedTrackingFunction.cpp
+++ b/src/core/dataHandler/WThreadedTrackingFunction.cpp
@@ -35,7 +35,7 @@
     {
         // TODO(reichenbach): Give those WAsserts correct strings incase they occur
         WAssert( dataset->getGrid(), "" );
-        Grid3DPtr g = boost::shared_dynamic_cast< WGridRegular3D >( dataset->getGrid() );
+        Grid3DPtr g = boost::dynamic_pointer_cast< WGridRegular3D >( dataset->getGrid() );
         WAssert( g, "" );
         WAssert( g->encloses( job.first ), "" );
 
@@ -165,7 +165,7 @@
             std::size_t seedPositions, std::size_t seedsPerPos,
             std::vector< int > v0, std::vector< int > v1 )
         : Base( dataset ),
-        m_grid( boost::shared_dynamic_cast< GridType >( dataset->getGrid() ) ),
+        m_grid( boost::dynamic_pointer_cast< GridType >( dataset->getGrid() ) ),
         m_directionFunc( dirFunc ),
         m_nextPosFunc( nextFunc ),
         m_fiberVisitor( fiberVst ),
--- a/src/core/dataHandler/datastructures/WJoinContourTree.cpp
+++ b/src/core/dataHandler/datastructures/WJoinContourTree.cpp
@@ -49,12 +49,12 @@
     {
         throw WNotImplemented( std::string( "ATM there is only support for scalar fields" ) );
     }
-    m_valueSet = boost::shared_dynamic_cast< WValueSet< double > >( dataset->getValueSet() );
+    m_valueSet = boost::dynamic_pointer_cast< WValueSet< double > >( dataset->getValueSet() );
     if( !m_valueSet )
     {
         throw WNotImplemented( std::string( "ATM there is only support for scalar fields with doubles as scalars" ) );
     }
-    m_grid = boost::shared_dynamic_cast< WGridRegular3D >( dataset->getGrid() );
+    m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataset->getGrid() );
     if( !m_grid )
     {
         throw WNotImplemented( std::string( "Only WGridRegular3D is supported, despite that its not a simplicial mesh!" ) );
--- a/src/core/dataHandler/test/WDataSetTimeSeries_test.h
+++ b/src/core/dataHandler/test/WDataSetTimeSeries_test.h
@@ -394,7 +394,7 @@
             std::vector< double > v( 27, 1.35 );
             ds = ts.calcDataSetAtTime( 0.35f, name );
             TS_ASSERT( ds );
-            boost::shared_ptr< WValueSet< double > > vs = boost::shared_dynamic_cast< WValueSet< double > >( ds->getValueSet() );
+            boost::shared_ptr< WValueSet< double > > vs = boost::dynamic_pointer_cast< WValueSet< double > >( ds->getValueSet() );
             TS_ASSERT( vs );
             for( std::size_t k = 0; k < v.size(); ++k )
             {
@@ -405,7 +405,7 @@
             std::vector< double > v( 27, 1.99 );
             ds = ts.calcDataSetAtTime( 0.99f, name );
             TS_ASSERT( ds );
-            boost::shared_ptr< WValueSet< double > > vs = boost::shared_dynamic_cast< WValueSet< double > >( ds->getValueSet() );
+            boost::shared_ptr< WValueSet< double > > vs = boost::dynamic_pointer_cast< WValueSet< double > >( ds->getValueSet() );
             TS_ASSERT( vs );
             for( std::size_t k = 0; k < v.size(); ++k )
             {
@@ -416,7 +416,7 @@
             std::vector< double > v( 27, 2.598 );
             ds = ts.calcDataSetAtTime( 1.598f, name );
             TS_ASSERT( ds );
-            boost::shared_ptr< WValueSet< double > > vs = boost::shared_dynamic_cast< WValueSet< double > >( ds->getValueSet() );
+            boost::shared_ptr< WValueSet< double > > vs = boost::dynamic_pointer_cast< WValueSet< double > >( ds->getValueSet() );
             TS_ASSERT( vs );
             for( std::size_t k = 0; k < v.size(); ++k )
             {
--- a/src/core/dataHandler/test/WITKImageConversion_test.h
+++ b/src/core/dataHandler/test/WITKImageConversion_test.h
@@ -68,8 +68,8 @@
         itk::Image< int, 3 >::Pointer i = makeImageFromDataSet< int >( ds );
         boost::shared_ptr< WDataSetScalar > newds = makeDataSetFromImage< int >( i );
 
-        TS_ASSERT_SAME_DATA( boost::shared_dynamic_cast< WValueSet< int > >( ds->getValueSet() )->rawData(),
-                             boost::shared_dynamic_cast< WValueSet< int > >( newds->getValueSet() )->rawData(), sizeof( int ) * 27 );
+        TS_ASSERT_SAME_DATA( boost::dynamic_pointer_cast< WValueSet< int > >( ds->getValueSet() )->rawData(),
+                             boost::dynamic_pointer_cast< WValueSet< int > >( newds->getValueSet() )->rawData(), sizeof( int ) * 27 );
 #endif  // OW_USE_ITK
     }
 };
--- a/src/core/dataHandler/test/WThreadedPerVoxelOperation_test.h
+++ b/src/core/dataHandler/test/WThreadedPerVoxelOperation_test.h
@@ -128,7 +128,7 @@
         TS_ASSERT_EQUALS( res->getValueSet()->order(), 1 );
         TS_ASSERT_EQUALS( res->getValueSet()->size(), 8 );
 
-        boost::shared_ptr< WValueSet< float > > vs = boost::shared_dynamic_cast< WValueSet< float > >( res->getValueSet() );
+        boost::shared_ptr< WValueSet< float > > vs = boost::dynamic_pointer_cast< WValueSet< float > >( res->getValueSet() );
 
         TS_ASSERT( vs );
         TS_ASSERT( vs->rawData() );
--- a/src/core/dataHandler/test/WThreadedTrackingFunction_test.h
+++ b/src/core/dataHandler/test/WThreadedTrackingFunction_test.h
@@ -66,7 +66,7 @@
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 0.0, 1.0, 0.0 ) );
         // test the test
         TS_ASSERT( ds );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
 
         WVector3d v( 1.0, 0.0, 0.0 );
         v += x * -0.5;
@@ -132,7 +132,7 @@
         WVector3d v( 1.0, 0.0, 0.0 );
 
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 0.0, 1.0, 0.0 ) );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
 
         TS_ASSERT_DELTA( wtracking::WTrackingUtility::getDistanceToBoundary( g, v, x ), 0.5, TRACKING_EPS );
         TS_ASSERT_DELTA( wtracking::WTrackingUtility::getDistanceToBoundary( g, v, y ), 1.0, TRACKING_EPS );
@@ -169,7 +169,7 @@
             y = normalize( y );
 
             boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 0.0, 1.0, 0.0 ) );
-            boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+            boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
 
             wtracking::WTrackingUtility::JobType j;
             // TODO(wiebel): somehow changing the order of the last multiplication does not find the desired operator*
@@ -272,7 +272,7 @@
         std::size_t seedsPerPosition = 1;
 
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 1.0, 0.0, 0.0 ), 5 );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
         TS_ASSERT( g );
 
         {
@@ -348,7 +348,7 @@
         std::size_t seedsPerPosition = 1;
 
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 1.0, 0.0, 0.0 ), 5 );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
         TS_ASSERT( g );
 
         {
@@ -423,7 +423,7 @@
         std::size_t seedsPerPosition = 1;
 
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 1.0, 0.0, 0.0 ), 5 );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
         TS_ASSERT( g );
 
         {
@@ -495,7 +495,7 @@
     void testInstantiation()
     {
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 1.0, 0.0, 0.0 ), 5 );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
         TS_ASSERT( g );
 
         TS_ASSERT_THROWS_NOTHING(
@@ -512,7 +512,7 @@
     void testGetJob()
     {
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 1.0, 0.0, 0.0 ), 7 );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
         TS_ASSERT( g );
 
         wtracking::WThreadedTrackingFunction w( ds, boost::bind( &This::dirFunc, this, _1, _2, WVector3d( 1.0, 0.0, 0.0 ) ),
@@ -539,7 +539,7 @@
         y = normalize( y );
 
         boost::shared_ptr< WDataSetSingle > ds = buildTestData( WVector3d( 1.0, 0.0, 0.0 ), 7 );
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
         TS_ASSERT( g );
         {
             wtracking::WThreadedTrackingFunction w( ds, boost::bind( &This::dirFunc, this, _1, _2, x ),
--- a/src/core/graphicsEngine/shaders/WGEShader.h
+++ b/src/core/graphicsEngine/shaders/WGEShader.h
@@ -279,7 +279,7 @@
     PreprocessorsList::ReadTicket r = m_preprocessors.getReadTicket();
     for( PreprocessorsList::ConstIterator pp = r->get().begin(); pp != r->get().end(); ++pp )
     {
-        typename WGEShaderDefine< T >::SPtr define = boost::shared_dynamic_cast< WGEShaderDefine< T > >( ( *pp ).first );
+        typename WGEShaderDefine< T >::SPtr define = boost::dynamic_pointer_cast< WGEShaderDefine< T > >( ( *pp ).first );
         if( define && ( define->getName() == key ) )
         {
             define->setValue( value );
--- a/src/core/kernel/WBatchLoader.cpp
+++ b/src/core/kernel/WBatchLoader.cpp
@@ -63,7 +63,7 @@
         boost::shared_ptr< WModule > mod = WModuleFactory::getModuleFactory()->create(
                 WModuleFactory::getModuleFactory()->getPrototypeByName( "Data Module" )
         );
-        WDataModule::SPtr dmod = boost::shared_static_cast< WDataModule >( mod );
+        WDataModule::SPtr dmod = boost::static_pointer_cast< WDataModule >( mod );
         dmod->setSuppressColormaps( m_suppressColormaps );
 
         // set the filename
--- a/src/core/kernel/WModuleConnector.cpp
+++ b/src/core/kernel/WModuleConnector.cpp
@@ -400,11 +400,11 @@
 
 boost::shared_ptr< WModuleInputConnector > WModuleConnector::toInputConnector()
 {
-    return boost::shared_dynamic_cast< WModuleInputConnector >( shared_from_this() );
+    return boost::dynamic_pointer_cast< WModuleInputConnector >( shared_from_this() );
 }
 
 boost::shared_ptr< WModuleOutputConnector > WModuleConnector::toOutputConnector()
 {
-    return boost::shared_dynamic_cast< WModuleOutputConnector >( shared_from_this() );
+    return boost::dynamic_pointer_cast< WModuleOutputConnector >( shared_from_this() );
 }
 
--- a/src/core/kernel/WModuleContainer.cpp
+++ b/src/core/kernel/WModuleContainer.cpp
@@ -112,7 +112,7 @@
     wlock->get().insert( module );
     wlock.reset();
 
-    module->setAssociatedContainer( boost::shared_static_cast< WModuleContainer >( shared_from_this() ) );
+    module->setAssociatedContainer( boost::static_pointer_cast< WModuleContainer >( shared_from_this() ) );
     WLogger::getLogger()->addLogMessage( "Associated module \"" + module->getName() + "\" with container." , "ModuleContainer (" + getName() + ")",
             LL_INFO );
 
@@ -256,7 +256,7 @@
         // is this module a data module?
         if( ( *iter )->getType() == MODULE_DATA )
         {
-            boost::shared_ptr< WDataModule > dm = boost::shared_static_cast< WDataModule >( *iter );
+            boost::shared_ptr< WDataModule > dm = boost::static_pointer_cast< WDataModule >( *iter );
 
             // now check the contained dataset ( isTexture and whether it is ready )
             if( dm->isReady()() )
@@ -440,7 +440,7 @@
 {
     // create thread which actually loads the data
     boost::shared_ptr< WBatchLoader > t = boost::shared_ptr< WBatchLoader >( new WBatchLoader( filenames,
-                boost::shared_static_cast< WModuleContainer >( shared_from_this() ) )
+                boost::static_pointer_cast< WModuleContainer >( shared_from_this() ) )
     );
     t->setSuppressColormaps( suppressColormaps );
     t->run();
@@ -451,7 +451,7 @@
 {
     // create thread which actually loads the data
     boost::shared_ptr< WBatchLoader > t = boost::shared_ptr< WBatchLoader >( new WBatchLoader( filenames,
-                boost::shared_static_cast< WModuleContainer >( shared_from_this() ) )
+                boost::static_pointer_cast< WModuleContainer >( shared_from_this() ) )
     );
     t->setSuppressColormaps( suppressColormaps );
     t->run();
--- a/src/core/kernel/WModuleInputData.h
+++ b/src/core/kernel/WModuleInputData.h
@@ -145,8 +145,8 @@
         }
 
         // get data
-        boost::shared_ptr< T > dat = boost::shared_dynamic_cast< T >(
-                boost::shared_dynamic_cast< WModuleOutputConnector >( *m_connected.begin() )->getRawData()
+        boost::shared_ptr< T > dat = boost::dynamic_pointer_cast< T >(
+                boost::dynamic_pointer_cast< WModuleOutputConnector >( *m_connected.begin() )->getRawData()
         );
 
         // unlock and return
--- a/src/core/kernel/WModuleOutputData.h
+++ b/src/core/kernel/WModuleOutputData.h
@@ -181,7 +181,7 @@
     virtual boost::shared_ptr< WPrototyped > getTransferPrototype()
     {
         // get prototype or the data pointer currently set
-        return ( m_data == boost::shared_ptr< T >() ) ? T::getPrototype() : boost::shared_static_cast< WPrototyped >( m_data );
+        return ( m_data == boost::shared_ptr< T >() ) ? T::getPrototype() : boost::static_pointer_cast< WPrototyped >( m_data );
     };
 
 protected:
--- a/src/core/kernel/combiner/WModuleProjectFileCombiner.cpp
+++ b/src/core/kernel/combiner/WModuleProjectFileCombiner.cpp
@@ -127,7 +127,7 @@
             }
             else
             {
-                boost::shared_static_cast< WDataModule >( module )->setFilename( parameter );
+                boost::static_pointer_cast< WDataModule >( module )->setFilename( parameter );
                 m_modules.insert( ModuleID( string_utils::fromString< unsigned int >( matches[1] ), module ) );
             }
         }
@@ -366,7 +366,7 @@
         // handle data modules separately
         if( ( *iter )->getType() == MODULE_DATA )
         {
-            output << "DATA:" << i << ":" <<  boost::shared_static_cast< WDataModule >( ( *iter ) )->getFilename().string() << std::endl;
+            output << "DATA:" << i << ":" <<  boost::static_pointer_cast< WDataModule >( ( *iter ) )->getFilename().string() << std::endl;
         }
         else
         {
--- a/src/core/kernel/test/WModuleConnector_test.h
+++ b/src/core/kernel/test/WModuleConnector_test.h
@@ -308,7 +308,7 @@
     {
         // just copy the data and add one
         boost::shared_ptr< WModuleOutputData< WTestTransferableBase > > o =
-            boost::shared_dynamic_cast< WModuleOutputData< WTestTransferableBase > >( output );
+            boost::dynamic_pointer_cast< WModuleOutputData< WTestTransferableBase > >( output );
         if( !o.get() )
         {
             return;
--- a/src/modules/HARDIToSphericalHarmonics/WSphericalHarmonicsCoefficientsThread.h
+++ b/src/modules/HARDIToSphericalHarmonics/WSphericalHarmonicsCoefficientsThread.h
@@ -216,7 +216,7 @@
         }
 
         // get measure vector
-        boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_parameter.m_valueSet );
+        boost::shared_ptr< WValueSet< T > > vs = boost::dynamic_pointer_cast< WValueSet< T > >( m_parameter.m_valueSet );
         if( !vs )
         {
             throw WException( "Valueset pointer not valid." );
--- a/src/modules/anisotropicFiltering/WMAnisotropicFiltering.cpp
+++ b/src/modules/anisotropicFiltering/WMAnisotropicFiltering.cpp
@@ -156,7 +156,7 @@
     infoLog() << "Images: " << numImages;
 
     boost::shared_ptr< std::vector< double > > smoothed( new std::vector< double >( m_dataSet->getValueSet()->rawSize() ) );
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     // fill in data from dataset
     copyData( smoothed, grid );
--- a/src/modules/applyMask/WMApplyMask.cpp
+++ b/src/modules/applyMask/WMApplyMask.cpp
@@ -104,7 +104,7 @@
             case W_DT_UNSIGNED_CHAR:
             {
                 boost::shared_ptr< WValueSet< unsigned char > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< unsigned char > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< unsigned char > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 applyMask( vals, type );
                 break;
@@ -112,7 +112,7 @@
             case W_DT_INT16:
             {
                 boost::shared_ptr< WValueSet< int16_t > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< int16_t > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< int16_t > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 applyMask( vals, type );
                 break;
@@ -120,7 +120,7 @@
             case W_DT_SIGNED_INT:
             {
                 boost::shared_ptr< WValueSet< int32_t > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< int32_t > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< int32_t > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 applyMask( vals, type );
                 break;
@@ -128,7 +128,7 @@
             case W_DT_FLOAT:
             {
                 boost::shared_ptr< WValueSet< float > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< float > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< float > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 applyMask( vals, type );
                 break;
@@ -136,7 +136,7 @@
             case W_DT_DOUBLE:
             {
                 boost::shared_ptr< WValueSet< double > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< double > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< double > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 applyMask( vals, type );
                 break;
@@ -188,7 +188,7 @@
 template< typename T > void WMApplyMask::applyMask( boost::shared_ptr< WValueSet< T > > valSet, dataType type )
 {
     boost::shared_ptr< WValueSetBase > maskBase = m_mask->getValueSet();
-    boost::shared_ptr< WValueSet< float > > mask = boost::shared_dynamic_cast< WValueSet< float > >( maskBase );
+    boost::shared_ptr< WValueSet< float > > mask = boost::dynamic_pointer_cast< WValueSet< float > >( maskBase );
 
     if( !mask )
     {
--- a/src/modules/arbitraryROIs/WMArbitraryROIs.cpp
+++ b/src/modules/arbitraryROIs/WMArbitraryROIs.cpp
@@ -202,7 +202,7 @@
 
     boost::shared_ptr< WValueSetBase > newValueSet;
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     size_t order = ( *m_dataSet ).getValueSet()->order();
     size_t vDim = ( *m_dataSet ).getValueSet()->dimension();
@@ -215,7 +215,7 @@
         case W_DT_UNSIGNED_CHAR:
         {
             boost::shared_ptr< WValueSet< unsigned char > > vals;
-            vals =  boost::shared_dynamic_cast< WValueSet< unsigned char > >( ( *m_dataSet ).getValueSet() );
+            vals =  boost::dynamic_pointer_cast< WValueSet< unsigned char > >( ( *m_dataSet ).getValueSet() );
             WAssert( vals, "Data type and data type indicator must fit." );
             data = cutArea( ( *m_dataSet ).getGrid(), vals );
             break;
@@ -223,7 +223,7 @@
         case W_DT_INT16:
         {
             boost::shared_ptr< WValueSet< int16_t > > vals;
-            vals =  boost::shared_dynamic_cast< WValueSet< int16_t > >( ( *m_dataSet ).getValueSet() );
+            vals =  boost::dynamic_pointer_cast< WValueSet< int16_t > >( ( *m_dataSet ).getValueSet() );
             WAssert( vals, "Data type and data type indicator must fit." );
             data = cutArea( ( *m_dataSet ).getGrid(), vals );
             break;
@@ -231,7 +231,7 @@
         case W_DT_SIGNED_INT:
         {
             boost::shared_ptr< WValueSet< int32_t > > vals;
-            vals =  boost::shared_dynamic_cast< WValueSet< int32_t > >( ( *m_dataSet ).getValueSet() );
+            vals =  boost::dynamic_pointer_cast< WValueSet< int32_t > >( ( *m_dataSet ).getValueSet() );
             WAssert( vals, "Data type and data type indicator must fit." );
             cutArea( ( *m_dataSet ).getGrid(), vals );
             data = cutArea( ( *m_dataSet ).getGrid(), vals );
@@ -240,7 +240,7 @@
         case W_DT_FLOAT:
         {
             boost::shared_ptr< WValueSet< float > > vals;
-            vals =  boost::shared_dynamic_cast< WValueSet< float > >( ( *m_dataSet ).getValueSet() );
+            vals =  boost::dynamic_pointer_cast< WValueSet< float > >( ( *m_dataSet ).getValueSet() );
             WAssert( vals, "Data type and data type indicator must fit." );
             data = cutArea( ( *m_dataSet ).getGrid(), vals );
             break;
@@ -248,7 +248,7 @@
         case W_DT_DOUBLE:
         {
             boost::shared_ptr< WValueSet< double > > vals;
-            vals =  boost::shared_dynamic_cast< WValueSet< double > >( ( *m_dataSet ).getValueSet() );
+            vals =  boost::dynamic_pointer_cast< WValueSet< double > >( ( *m_dataSet ).getValueSet() );
             WAssert( vals, "Data type and data type indicator must fit." );
             data = cutArea( ( *m_dataSet ).getGrid(), vals );
             break;
@@ -267,7 +267,7 @@
 template< typename T >
 boost::shared_ptr< std::vector< float > > WMArbitraryROIs::cutArea( boost::shared_ptr< WGrid > inGrid, boost::shared_ptr< WValueSet< T > > vals )
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( inGrid );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( inGrid );
 
     size_t nx = grid->getNbCoordsX();
     size_t ny = grid->getNbCoordsY();
@@ -368,7 +368,7 @@
         return;
     }
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     osg::ref_ptr< WROI > newROI = osg::ref_ptr< WROI >( new WROIArbitrary(  grid->getNbCoordsX(), grid->getNbCoordsY(), grid->getNbCoordsZ(),
                                                                             grid->getTransformationMatrix(),
                                                                             *m_newValueSet->rawDataVectorPointer(),
--- a/src/modules/atlasSurfaces/WCreateSurfaceJob.h
+++ b/src/modules/atlasSurfaces/WCreateSurfaceJob.h
@@ -110,7 +110,7 @@
     m_progress( pro )
 {
     m_counter.getWriteTicket()->get() = 1;
-    m_grid = boost::shared_dynamic_cast< WGridRegular3D >( input->getGrid() );
+    m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( input->getGrid() );
     WAssert( m_grid, "" );
 }
 
@@ -139,7 +139,7 @@
     boost::shared_ptr< std::vector< float > > tempData =
         boost::shared_ptr< std::vector< float > >( new std::vector< float >( input->getGrid()->size() ) );
 
-    cutArea( boost::shared_dynamic_cast< WValueSet< T > >( m_input->getValueSet() ), ( *tempData.get() ), job );
+    cutArea( boost::dynamic_pointer_cast< WValueSet< T > >( m_input->getValueSet() ), ( *tempData.get() ), job );
 
 
 
--- a/src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
+++ b/src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
@@ -225,7 +225,7 @@
 
 void WMAtlasSurfaces::createSurfaces()
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     boost::shared_ptr<WProgressCombiner> newProgress = boost::shared_ptr<WProgressCombiner>( new WProgressCombiner() );
     boost::shared_ptr<WProgress>pro = boost::shared_ptr<WProgress>( new WProgress( "dummy", m_dataSet->getMax() ) );
@@ -440,13 +440,13 @@
 
 void WMAtlasSurfaces::cutArea( int index )
 {
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     size_t order = ( *m_dataSet ).getValueSet()->order();
     size_t vDim = ( *m_dataSet ).getValueSet()->dimension();
 
     boost::shared_ptr< WValueSet< unsigned char > > vals;
-    vals =  boost::shared_dynamic_cast< WValueSet< unsigned char > >( ( *m_dataSet ).getValueSet() );
+    vals =  boost::dynamic_pointer_cast< WValueSet< unsigned char > >( ( *m_dataSet ).getValueSet() );
 
     boost::shared_ptr< std::vector< float > > newVals = boost::shared_ptr< std::vector< float > >( new std::vector< float >( grid->size(), 0 ) );
 
--- a/src/modules/bermanTracking/WMBermanTracking.cpp
+++ b/src/modules/bermanTracking/WMBermanTracking.cpp
@@ -297,7 +297,7 @@
 
     m_fiberAccu.clear();
 
-    boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     WAssert( g, "" );
 
     std::vector< int > v0( 3 );
@@ -361,14 +361,14 @@
 
 WVector3d WMBermanTracking::getDirFunc( boost::shared_ptr< WDataSetSingle const >, wtracking::WTrackingUtility::JobType const& j )
 {
-    boost::shared_ptr< WGridRegular3D > g( boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() ) );
+    boost::shared_ptr< WGridRegular3D > g( boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() ) );
     // extract fiber directions from odf
     int v = g->getVoxelNum( j.first );
 
     WPrecondDiffers( v, -1 );
     WPrecond( m_gfa, "" );
 
-    if( boost::shared_dynamic_cast< WDataSetSingle >( m_gfa )->getValueAt( v ) < m_currentMinFA )
+    if( boost::dynamic_pointer_cast< WDataSetSingle >( m_gfa )->getValueAt( v ) < m_currentMinFA )
     {
         return WVector3d( 0.0, 0.0, 0.0 );
     }
@@ -469,7 +469,7 @@
 
 
     // TEST
-    //boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    //boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     //int k = 1;
     //double gfa = m_gfa->getValueAt( g->getVoxelNum( j.first ) );
 
@@ -569,7 +569,7 @@
         m_fiberAccu.add( fiber );
 
         // test
-        boost::shared_ptr< WGridRegular3D > g( boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() ) );
+        boost::shared_ptr< WGridRegular3D > g( boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() ) );
         for( std::size_t k = 0; k < fiber.size(); ++k )
         {
             int v = g->getVoxelNum( fiber[ k ] );
--- a/src/modules/calculateGFA/WMCalculateGFA.cpp
+++ b/src/modules/calculateGFA/WMCalculateGFA.cpp
@@ -140,7 +140,7 @@
         {
             debugLog() << "Computation finished.";
             m_currentProgress->finish();
-            m_result = boost::shared_dynamic_cast< WDataSetScalar >( m_gfaFunc->getResult() );
+            m_result = boost::dynamic_pointer_cast< WDataSetScalar >( m_gfaFunc->getResult() );
             m_gfaPool = boost::shared_ptr< GFAPoolType >();
             m_gfaFunc = boost::shared_ptr< GFAFuncType >();
 
@@ -181,7 +181,7 @@
     }
     // the threadpool should have finished computing by now
 
-    boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     WAssert( g, "" );
     resetProgress( g->getNbCoordsX() * g->getNbCoordsY() * g->getNbCoordsZ() );
 
--- a/src/modules/calculateTensors/WMCalculateTensors.cpp
+++ b/src/modules/calculateTensors/WMCalculateTensors.cpp
@@ -177,7 +177,7 @@
 
     if( m_dataSet->getSphericalHarmonicAt( 0 ).getOrder() == 2 )
     {
-        boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+        boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
         WAssert( g, "" );
         resetProgress( g->getNbCoordsX() * g->getNbCoordsY() * g->getNbCoordsZ() );
 
--- a/src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
+++ b/src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
@@ -290,7 +290,7 @@
             if( dataChanged )
             {
                 m_dataSet = newDataSet;
-                m_grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+                m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
                 break;
             }
         }
--- a/src/modules/coordinateSystem/WMCoordinateSystem.cpp
+++ b/src/modules/coordinateSystem/WMCoordinateSystem.cpp
@@ -262,7 +262,7 @@
     // *******************************************************************************************************
     //    osg::ref_ptr<osg::Drawable> old = osg::ref_ptr<osg::Drawable>( m_boxNode->getDrawable( 0 ) );
     //    m_boxNode->replaceDrawable( old, createGeometryNode() );
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     double xOff = grid->getOffsetX();
     double yOff = grid->getOffsetY();
@@ -307,7 +307,7 @@
 void WMCoordinateSystem::findBoundingBox()
 {
     // get bounding from dataset
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     double xOff = grid->getOffsetX();
     double yOff = grid->getOffsetY();
--- a/src/modules/data/WMData.cpp
+++ b/src/modules/data/WMData.cpp
@@ -212,7 +212,7 @@
 
         m_isTexture = m_dataSet->isTexture();
 
-        boost::shared_ptr< WDataSetSingle > dss = boost::shared_dynamic_cast< WDataSetSingle >( m_dataSet );
+        boost::shared_ptr< WDataSetSingle > dss = boost::dynamic_pointer_cast< WDataSetSingle >( m_dataSet );
         if( dss )
         {
             m_dataType->set( getDataTypeString( dss ) );
@@ -231,7 +231,7 @@
                         break;
                     case W_DT_FLOAT:
                     case W_DT_DOUBLE:
-                        if( boost::shared_dynamic_cast< WDataSetVector >( m_dataSet ) )
+                        if( boost::dynamic_pointer_cast< WDataSetVector >( m_dataSet ) )
                         {
                             m_dataSet->getTexture()->colormap()->set(
                                 m_dataSet->getTexture()->colormap()->get().newSelector( WItemSelector::IndexList( 1, 6 ) )
@@ -307,7 +307,7 @@
     m_output->updateData( m_dataSet );
     ready();
 
-    WDataSetSingle::SPtr dataSetAsSingle = boost::shared_dynamic_cast< WDataSetSingle >( m_dataSet );
+    WDataSetSingle::SPtr dataSetAsSingle = boost::dynamic_pointer_cast< WDataSetSingle >( m_dataSet );
 
     while( !m_shutdownFlag() )
     {
@@ -333,7 +333,7 @@
 
             // a new grid
             boost::shared_ptr< WGrid > newGrid;
-            boost::shared_ptr< WGridRegular3D > oldGrid = boost::shared_dynamic_cast< WGridRegular3D >( dataSetAsSingle->getGrid() );
+            boost::shared_ptr< WGridRegular3D > oldGrid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSetAsSingle->getGrid() );
 
             switch( m_matrixSelection->get( true ).getItemIndexOfSelected( 0 ) )
             {
--- a/src/modules/data/WMReadSphericalHarmonics.cpp
+++ b/src/modules/data/WMReadSphericalHarmonics.cpp
@@ -114,7 +114,7 @@
 
         if( data )
         {
-            m_data = boost::shared_dynamic_cast< WDataSetSphericalHarmonics >( data );
+            m_data = boost::dynamic_pointer_cast< WDataSetSphericalHarmonics >( data );
             if( m_data )
             {
                 m_runtimeName->set( string_utils::tokenize( fileName, "/" ).back() );
--- a/src/modules/data/WMWriteNIfTI.cpp
+++ b/src/modules/data/WMWriteNIfTI.cpp
@@ -143,11 +143,11 @@
 {
     // cast valueset
     boost::shared_ptr< WValueSetBase > valsB = ( *m_dataSet ).getValueSet();
-    boost::shared_ptr< WValueSet< T > > vals = boost::shared_dynamic_cast< WValueSet< T > >( ( *m_dataSet ).getValueSet() );
+    boost::shared_ptr< WValueSet< T > > vals = boost::dynamic_pointer_cast< WValueSet< T > >( ( *m_dataSet ).getValueSet() );
     WAssert( vals, "Seems that value set type is not yet supported." );
     const size_t vDim = vals->dimension();
     // cast grid
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     const size_t countVoxels = grid->getNbCoordsX() * grid->getNbCoordsY() * grid->getNbCoordsZ();
     WAssert( grid, "Seems that grid is of wrong type." );
 
@@ -170,7 +170,7 @@
     infoLog() << "Writing Data to " << m_filename->get().string();
     nifti_image *outField = nifti_simple_init_nim();
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     WAssert( grid, "Seems that grid is of wrong type." );
 
     size_t nbValues = ( *m_dataSet ).getValueSet()->size();
@@ -289,7 +289,7 @@
 
     nifti_image_write( outField );
 
-    boost::shared_ptr< WDataSetRawHARDI > h = boost::shared_dynamic_cast< WDataSetRawHARDI >( m_dataSet );
+    boost::shared_ptr< WDataSetRawHARDI > h = boost::dynamic_pointer_cast< WDataSetRawHARDI >( m_dataSet );
     if( h )
     {
         std::fstream f( ( s + ".bvec" ).c_str(), std::ios_base::out );
--- a/src/modules/dataTypeConversion/WMDataTypeConversion.cpp
+++ b/src/modules/dataTypeConversion/WMDataTypeConversion.cpp
@@ -106,7 +106,7 @@
             case W_DT_UNSIGNED_CHAR:
             {
                 boost::shared_ptr<WValueSet<unsigned char> > vals;
-                vals = boost::shared_dynamic_cast<WValueSet<unsigned char> >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast<WValueSet<unsigned char> >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 convertDataSet( vals );
                 break;
@@ -114,14 +114,14 @@
             case W_DT_INT16:
             {
                 boost::shared_ptr<WValueSet<int16_t> > vals;
-                vals = boost::shared_dynamic_cast<WValueSet<int16_t> >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast<WValueSet<int16_t> >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 convertDataSet( vals );
             }
             case W_DT_SIGNED_INT:
             {
                 boost::shared_ptr<WValueSet<int32_t> > vals;
-                vals = boost::shared_dynamic_cast<WValueSet<int32_t> >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast<WValueSet<int32_t> >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 convertDataSet( vals );
                 break;
@@ -129,7 +129,7 @@
             case W_DT_FLOAT:
             {
                 boost::shared_ptr< WValueSet< float > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< float > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< float > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 convertDataSet( vals );
                 break;
@@ -137,7 +137,7 @@
             case W_DT_DOUBLE:
             {
                 boost::shared_ptr< WValueSet< double > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< double > >( ( *m_dataSet ).getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< double > >( ( *m_dataSet ).getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 convertDataSet( vals );
                 break;
--- a/src/modules/datasetManipulator/WMDatasetManipulator.cpp
+++ b/src/modules/datasetManipulator/WMDatasetManipulator.cpp
@@ -137,7 +137,7 @@
 
 void WMDatasetManipulator::init()
 {
-    m_grid = boost::shared_dynamic_cast< WGridRegular3D >( m_input->getData()->getGrid() );
+    m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_input->getData()->getGrid() );
     WAssert( m_grid, "The grid needs to be a regular 3D grid." );
     m_transform = boost::shared_ptr< WGridTransformOrtho >( new WGridTransformOrtho( m_grid->getTransform() ) );
 
--- a/src/modules/datasetProfile/WMDatasetProfile.cpp
+++ b/src/modules/datasetProfile/WMDatasetProfile.cpp
@@ -154,7 +154,7 @@
             if( dataChanged )
             {
                 m_dataSet = newDataSet;
-                m_grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+                m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
             }
         }
 
--- a/src/modules/deterministicFTMori/WMDeterministicFTMori.cpp
+++ b/src/modules/deterministicFTMori/WMDeterministicFTMori.cpp
@@ -166,7 +166,7 @@
             // if there are no new eigenvectors or datasets,
             // restart the tracking, as there are changes to the parameters
             resetTracking();
-            boost::shared_ptr< WGridRegular3D > g( boost::shared_dynamic_cast< WGridRegular3D >( m_eigenField->getGrid() ) );
+            boost::shared_ptr< WGridRegular3D > g( boost::dynamic_pointer_cast< WGridRegular3D >( m_eigenField->getGrid() ) );
             std::size_t todo = ( g->getNbCoordsX() - 2 ) * ( g->getNbCoordsY() - 2 ) * ( g->getNbCoordsZ() - 2 );
             resetProgress( todo );
             m_trackingPool->run();
@@ -317,10 +317,10 @@
     WAssert( ds, "" );
     WAssert( ds->getGrid(), "" );
     WAssert( ds->getValueSet(), "" );
-    boost::shared_ptr< WGridRegular3D > g = boost::shared_dynamic_cast< WGridRegular3D >( ds->getGrid() );
+    boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
     int i = g->getVoxelNum( j.first );
     WAssert( i != -1, "" );
-    boost::shared_ptr< WValueSet< double > > vs = boost::shared_dynamic_cast< WValueSet< double > >( ds->getValueSet() );
+    boost::shared_ptr< WValueSet< double > > vs = boost::dynamic_pointer_cast< WValueSet< double > >( ds->getValueSet() );
     WAssert( vs, "" );
     if( vs->rawData()[ 4 * i + 3 ] < m_currentMinFA )
     {
--- a/src/modules/directVolumeRendering/WMDirectVolumeRendering.cpp
+++ b/src/modules/directVolumeRendering/WMDirectVolumeRendering.cpp
@@ -267,7 +267,7 @@
             rootNode->clear();
 
             // First, grab the grid
-            boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataSet->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSet->getGrid() );
             if( !grid )
             {
                 errorLog() << "The dataset does not provide a regular grid. Ignoring dataset.";
@@ -444,7 +444,7 @@
                 WAssert( dataSet, "data set" );
                 boost::shared_ptr< WValueSetBase > valueSet = dataSet->getValueSet();
                 WAssert( valueSet, "value set" );
-                boost::shared_ptr< WValueSet< unsigned char > > cvalueSet( boost::shared_dynamic_cast<WValueSet< unsigned char> >( valueSet ) );
+                boost::shared_ptr< WValueSet< unsigned char > > cvalueSet( boost::dynamic_pointer_cast<WValueSet< unsigned char> >( valueSet ) );
                 if( !cvalueSet )
                 {
                     debugLog() << "invalid type";
--- a/src/modules/distanceMap/WMDistanceMap.cpp
+++ b/src/modules/distanceMap/WMDistanceMap.cpp
@@ -171,16 +171,16 @@
     switch( inSet->getDataType() )
     {
         case W_DT_UNSIGNED_CHAR:
-            return makeFloatValueSetHelper( boost::shared_dynamic_cast< WValueSet< unsigned char > >( inSet ) );
+            return makeFloatValueSetHelper( boost::dynamic_pointer_cast< WValueSet< unsigned char > >( inSet ) );
             break;
         case W_DT_INT16:
-            return makeFloatValueSetHelper( boost::shared_dynamic_cast< WValueSet< int16_t > >( inSet ) );
+            return makeFloatValueSetHelper( boost::dynamic_pointer_cast< WValueSet< int16_t > >( inSet ) );
             break;
         case W_DT_SIGNED_INT:
-            return makeFloatValueSetHelper( boost::shared_dynamic_cast< WValueSet< int32_t > >( inSet ) );
+            return makeFloatValueSetHelper( boost::dynamic_pointer_cast< WValueSet< int32_t > >( inSet ) );
             break;
         case W_DT_FLOAT:
-            return boost::shared_dynamic_cast< WValueSet< float > >( inSet );
+            return boost::dynamic_pointer_cast< WValueSet< float > >( inSet );
             break;
         default:
             WAssert( false, "Unknow data type in makeFloatDataSet" );
@@ -199,7 +199,7 @@
     boost::shared_ptr< WValueSet< float > > valueSet = makeFloatValueSet( ( *dataSet ).getValueSet() );
     WAssert( valueSet, "Works only for float data sets." );
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( ( *dataSet ).getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( ( *dataSet ).getGrid() );
     WAssert( grid, "Works only for data on regular 3D grids."  );
 
     int b, r, c, bb, rr, r0, b0, c0;
--- a/src/modules/effectiveConnectivityCluster/WMEffectiveConnectivityCluster.cpp
+++ b/src/modules/effectiveConnectivityCluster/WMEffectiveConnectivityCluster.cpp
@@ -111,7 +111,7 @@
     }
 
     // cast it to the target type
-    boost::shared_ptr< WModuleOutputData < WFiberCluster > > o = boost::shared_static_cast< WModuleOutputData< WFiberCluster > >( output );
+    boost::shared_ptr< WModuleOutputData < WFiberCluster > > o = boost::static_pointer_cast< WModuleOutputData< WFiberCluster > >( output );
     if( !o )
     {
         errorLog() << "New data is not a WFiberCluster? That should not happen!";
--- a/src/modules/eigenSystem/WMEigenSystem.cpp
+++ b/src/modules/eigenSystem/WMEigenSystem.cpp
@@ -163,7 +163,7 @@
 void WMEigenSystem::updateOCs( boost::shared_ptr< const WDataSetSingle > es )
 {
     WAssert( es, "Bug: updating the output with no data makes no sense." );
-    boost::shared_ptr< const WValueSet< double > > vs = boost::shared_dynamic_cast< WValueSet< double > >( es->getValueSet() );
+    boost::shared_ptr< const WValueSet< double > > vs = boost::dynamic_pointer_cast< WValueSet< double > >( es->getValueSet() );
     WAssert( vs, "Bug: invalid value-set from WThreadedPerVoxelOperation dataset" );
     boost::shared_ptr< WGrid > grid = es->getGrid();
 
--- a/src/modules/fiberSelection/WMFiberSelection.cpp
+++ b/src/modules/fiberSelection/WMFiberSelection.cpp
@@ -232,8 +232,8 @@
 
             // currently, both grids need to be the same
             // the grid of voi1 and voi2 is needed here
-            boost::shared_ptr< WGridRegular3D > grid1 = boost::shared_dynamic_cast< WGridRegular3D >( m_voi1->getGrid() );
-            boost::shared_ptr< WGridRegular3D > grid2 = boost::shared_dynamic_cast< WGridRegular3D >( m_voi2->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid1 = boost::dynamic_pointer_cast< WGridRegular3D >( m_voi1->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid2 = boost::dynamic_pointer_cast< WGridRegular3D >( m_voi2->getGrid() );
 
             // the list of fibers
             std::vector< boost::tuple< size_t, size_t, size_t > > matches;  // a match contains the fiber ID, the start vertex ID and the stop ID
--- a/src/modules/gaussFiltering/WMGaussFiltering.cpp
+++ b/src/modules/gaussFiltering/WMGaussFiltering.cpp
@@ -204,7 +204,7 @@
 boost::shared_ptr< WValueSet< double > > WMGaussFiltering::iterativeFilterField( boost::shared_ptr< WValueSet< T > > vals, unsigned int iterations )
 {
     // the grid used
-    boost::shared_ptr<WGridRegular3D> grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr<WGridRegular3D> grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     WAssert( grid, "Grid is not of type WGridRegular3D." );
 
     // use a custom progress combiner
@@ -312,7 +312,7 @@
                 case W_DT_UNSIGNED_CHAR:
                 {
                     boost::shared_ptr<WValueSet<unsigned char> > vals;
-                    vals = boost::shared_dynamic_cast<WValueSet<unsigned char> >( ( *m_dataSet ).getValueSet() );
+                    vals = boost::dynamic_pointer_cast<WValueSet<unsigned char> >( ( *m_dataSet ).getValueSet() );
                     WAssert( vals, "Data type and data type indicator must fit." );
                     newValueSet = iterativeFilterField( vals, iterations );
                     break;
@@ -320,7 +320,7 @@
                 case W_DT_INT16:
                 {
                     boost::shared_ptr<WValueSet<int16_t> > vals;
-                    vals = boost::shared_dynamic_cast<WValueSet<int16_t> >( ( *m_dataSet ).getValueSet() );
+                    vals = boost::dynamic_pointer_cast<WValueSet<int16_t> >( ( *m_dataSet ).getValueSet() );
                     WAssert( vals, "Data type and data type indicator must fit." );
                     newValueSet = iterativeFilterField( vals, iterations );
                     break;
@@ -328,7 +328,7 @@
                 case W_DT_UINT16:
                 {
                     boost::shared_ptr<WValueSet<uint16_t> > vals;
-                    vals = boost::shared_dynamic_cast<WValueSet<uint16_t> >( ( *m_dataSet ).getValueSet() );
+                    vals = boost::dynamic_pointer_cast<WValueSet<uint16_t> >( ( *m_dataSet ).getValueSet() );
                     WAssert( vals, "Data type and data type indicator must fit." );
                     newValueSet = iterativeFilterField( vals, iterations );
                     break;
@@ -336,7 +336,7 @@
                 case W_DT_SIGNED_INT:
                 {
                     boost::shared_ptr<WValueSet<int32_t> > vals;
-                    vals = boost::shared_dynamic_cast<WValueSet<int32_t> >( ( *m_dataSet ).getValueSet() );
+                    vals = boost::dynamic_pointer_cast<WValueSet<int32_t> >( ( *m_dataSet ).getValueSet() );
                     WAssert( vals, "Data type and data type indicator must fit." );
                     newValueSet = iterativeFilterField( vals, iterations );
                     break;
@@ -344,7 +344,7 @@
                 case W_DT_FLOAT:
                 {
                     boost::shared_ptr<WValueSet<float> > vals;
-                    vals = boost::shared_dynamic_cast<WValueSet<float> >( ( *m_dataSet ).getValueSet() );
+                    vals = boost::dynamic_pointer_cast<WValueSet<float> >( ( *m_dataSet ).getValueSet() );
                     WAssert( vals, "Data type and data type indicator must fit." );
                     newValueSet = iterativeFilterField( vals, iterations );
                     break;
@@ -352,7 +352,7 @@
                 case W_DT_DOUBLE:
                 {
                     boost::shared_ptr<WValueSet<double> > vals;
-                    vals = boost::shared_dynamic_cast<WValueSet<double> >( ( *m_dataSet ).getValueSet() );
+                    vals = boost::dynamic_pointer_cast<WValueSet<double> >( ( *m_dataSet ).getValueSet() );
                     WAssert( vals, "Data type and data type indicator must fit." );
                     newValueSet = iterativeFilterField( vals, iterations );
                     break;
--- a/src/modules/gridRenderer/WMGridRenderer.cpp
+++ b/src/modules/gridRenderer/WMGridRenderer.cpp
@@ -112,7 +112,7 @@
             continue;
         }
 
-        WGridRegular3D::SPtr regGrid = boost::shared_dynamic_cast< WGridRegular3D >( dataSet->getGrid() );
+        WGridRegular3D::SPtr regGrid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSet->getGrid() );
         if( !regGrid )
         {
             // the data has no regular 3d grid.
--- a/src/modules/imageExtractor/WMImageExtractor.cpp
+++ b/src/modules/imageExtractor/WMImageExtractor.cpp
@@ -231,7 +231,7 @@
         return boost::shared_ptr< WDataSetScalar >();
     }
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
     WAssert( grid, "" );
 
     std::size_t dim = m_dataSet->getValueSet()->dimension();
@@ -243,7 +243,7 @@
         {
             boost::shared_ptr< std::vector< float > > values = boost::shared_ptr< std::vector< float > >(
                 new std::vector< float >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< float > > v = boost::shared_dynamic_cast< WValueSet< float > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< float > > v = boost::dynamic_pointer_cast< WValueSet< float > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -259,7 +259,7 @@
         {
             boost::shared_ptr< std::vector< double > > values = boost::shared_ptr< std::vector< double > >(
                 new std::vector< double >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< double > > v = boost::shared_dynamic_cast< WValueSet< double > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< double > > v = boost::dynamic_pointer_cast< WValueSet< double > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -275,7 +275,7 @@
         {
             boost::shared_ptr< std::vector< uint8_t > > values = boost::shared_ptr< std::vector< uint8_t > >(
                 new std::vector< uint8_t >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< uint8_t > > v = boost::shared_dynamic_cast< WValueSet< uint8_t > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< uint8_t > > v = boost::dynamic_pointer_cast< WValueSet< uint8_t > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -291,7 +291,7 @@
         {
             boost::shared_ptr< std::vector< uint16_t > > values = boost::shared_ptr< std::vector< uint16_t > >(
                 new std::vector< uint16_t >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< uint16_t > > v = boost::shared_dynamic_cast< WValueSet< uint16_t > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< uint16_t > > v = boost::dynamic_pointer_cast< WValueSet< uint16_t > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -307,7 +307,7 @@
         {
             boost::shared_ptr< std::vector< uint32_t > > values = boost::shared_ptr< std::vector< uint32_t > >(
                 new std::vector< uint32_t >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< uint32_t > > v = boost::shared_dynamic_cast< WValueSet< uint32_t > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< uint32_t > > v = boost::dynamic_pointer_cast< WValueSet< uint32_t > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -323,7 +323,7 @@
         {
             boost::shared_ptr< std::vector< int8_t > > values = boost::shared_ptr< std::vector< int8_t > >(
                 new std::vector< int8_t >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< int8_t > > v = boost::shared_dynamic_cast< WValueSet< int8_t > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< int8_t > > v = boost::dynamic_pointer_cast< WValueSet< int8_t > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -339,7 +339,7 @@
         {
             boost::shared_ptr< std::vector< int16_t > > values = boost::shared_ptr< std::vector< int16_t > >(
                 new std::vector< int16_t >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< int16_t > > v = boost::shared_dynamic_cast< WValueSet< int16_t > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< int16_t > > v = boost::dynamic_pointer_cast< WValueSet< int16_t > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
@@ -355,7 +355,7 @@
         {
             boost::shared_ptr< std::vector< int32_t > > values = boost::shared_ptr< std::vector< int32_t > >(
                 new std::vector< int32_t >( m_dataSet->getGrid()->size() ) );
-            boost::shared_ptr< WValueSet< int32_t > > v = boost::shared_dynamic_cast< WValueSet< int32_t > >( m_dataSet->getValueSet() );
+            boost::shared_ptr< WValueSet< int32_t > > v = boost::dynamic_pointer_cast< WValueSet< int32_t > >( m_dataSet->getValueSet() );
             WAssert( v, "" );
             for( std::size_t k = 0; k < grid->size(); ++k )
             {
--- a/src/modules/imageSpaceLIC/WMImageSpaceLIC.cpp
+++ b/src/modules/imageSpaceLIC/WMImageSpaceLIC.cpp
@@ -422,7 +422,7 @@
             debugLog() << "Using vector data";
 
             // get grid and prepare OSG
-            boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataSetVec->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSetVec->getGrid() );
             m_xPos->setMax( grid->getNbCoordsX() - 1 );
             m_yPos->setMax( grid->getNbCoordsY() - 1 );
             m_zPos->setMax( grid->getNbCoordsZ() - 1 );
@@ -437,7 +437,7 @@
             debugLog() << "Using scalar data";
 
             // get grid and prepare OSG
-            boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataSetScal->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSetScal->getGrid() );
             m_xPos->setMax( grid->getNbCoordsX() - 1 );
             m_yPos->setMax( grid->getNbCoordsY() - 1 );
             m_zPos->setMax( grid->getNbCoordsZ() - 1 );
--- a/src/modules/isosurface/WMIsosurface.cpp
+++ b/src/modules/isosurface/WMIsosurface.cpp
@@ -279,7 +279,7 @@
                                                             boost::shared_ptr<WProgressCombiner> progress )
         {
             boost::shared_ptr< WValueSet< T > > vals(
-                    boost::shared_dynamic_cast< WValueSet< T > >( valueSet ) );
+                    boost::dynamic_pointer_cast< WValueSet< T > >( valueSet ) );
             WAssert( vals, "Data type and data type indicator must fit." );
             return AlgoBase::generateSurface( x, y, z, matrix, vals->rawDataVectorPointer(), isoValue, progress );
         }
@@ -333,7 +333,7 @@
 
     WMarchingCubesAlgorithm mcAlgo;
     WMarchingLegoAlgorithm mlAlgo;
-    boost::shared_ptr< WGridRegular3D > gridRegular3D = boost::shared_dynamic_cast< WGridRegular3D >( ( *m_dataSet ).getGrid() );
+    boost::shared_ptr< WGridRegular3D > gridRegular3D = boost::dynamic_pointer_cast< WGridRegular3D >( ( *m_dataSet ).getGrid() );
     WAssert( gridRegular3D, "Grid is not of type WGridRegular3D." );
     m_grid = gridRegular3D;
 
--- a/src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
+++ b/src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
@@ -248,7 +248,7 @@
             m_isoValue->setRecommendedValue( dataSet->getTexture()->minimum()->get() + ( 0.5 * dataSet->getTexture()->scale()->get() ) );
 
             // First, grab the grid
-            boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataSet->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSet->getGrid() );
             if( !grid )
             {
                 errorLog() << "The dataset does not provide a regular grid. Ignoring dataset.";
--- a/src/modules/openIGTLink/WIGTLinkRemote.cpp
+++ b/src/modules/openIGTLink/WIGTLinkRemote.cpp
@@ -345,7 +345,7 @@
         ts0->SetTime( 123456.78 );
 
         imgMeta->SetTimeStamp( ts0 );
-        boost::shared_ptr < WGridRegular3D > g3dr( boost::shared_dynamic_cast < WGridRegular3D > ( dataSets[ i ]->getGrid() ) );
+        boost::shared_ptr < WGridRegular3D > g3dr( boost::dynamic_pointer_cast < WGridRegular3D > ( dataSets[ i ]->getGrid() ) );
         imgMeta->SetSize( g3dr->getNbCoordsX(), g3dr->getNbCoordsY(), g3dr->getNbCoordsZ() );
         imgMeta->SetScalarType( convertTypeOWtoIGTL( dataSets[ i ]->getValueSet()->getDataType() ) );
         imgMetaMsg->AddImageMetaElement( imgMeta );
@@ -361,7 +361,7 @@
     size_t getRawSizeT( boost::shared_ptr < WValueSetBase >  valueSet )
     {
         typedef typename DataTypeRT<DT>::type type;
-        boost::shared_ptr < WValueSet < type > > v = boost::shared_dynamic_cast < WValueSet < type > >( valueSet );
+        boost::shared_ptr < WValueSet < type > > v = boost::dynamic_pointer_cast < WValueSet < type > >( valueSet );
         WAssert( v, "Type cast failed" );
         return valueSet->rawSize() * sizeof( type );
     }
@@ -371,7 +371,7 @@
     {
         typedef typename DataTypeRT<DT>::type type;
         boost::shared_ptr < WValueSet < type > > v;
-        v = boost::shared_dynamic_cast < WValueSet < type > >( valueSet );
+        v = boost::dynamic_pointer_cast < WValueSet < type > >( valueSet );
         WAssert( v, "Type cast failed" );
         const void* ptr = v->rawData();
         WAssert( ptr != 0, "Trying to query raw data, got null pointer" );
@@ -485,7 +485,7 @@
     if( socket.IsNotNull() )
     {
         int size[ 3 ];
-        boost::shared_ptr < WGridRegular3D > g3dr( boost::shared_dynamic_cast < WGridRegular3D > ( dataSetScalar->getGrid() ) );
+        boost::shared_ptr < WGridRegular3D > g3dr( boost::dynamic_pointer_cast < WGridRegular3D > ( dataSetScalar->getGrid() ) );
         size[ 0 ] = g3dr->getNbCoordsX();
         size[ 1 ] = g3dr->getNbCoordsY();
         size[ 2 ] = g3dr->getNbCoordsZ();
--- a/src/modules/paintTexture/WMPaintTexture.cpp
+++ b/src/modules/paintTexture/WMPaintTexture.cpp
@@ -403,7 +403,7 @@
 
 void WMPaintTexture::createTexture()
 {
-    m_grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     osg::ref_ptr< osg::Image > ima = new osg::Image;
     ima->allocateImage( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(), GL_LUMINANCE, GL_UNSIGNED_BYTE );
@@ -449,12 +449,12 @@
 
 void WMPaintTexture::copyFromInput()
 {
-    m_grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    m_grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
 
     unsigned char* data = m_texture->getImage()->data();
 
     boost::shared_ptr< WValueSet< unsigned char > > vals;
-    vals =  boost::shared_dynamic_cast< WValueSet< unsigned char > >( m_dataSet->getValueSet() );
+    vals =  boost::dynamic_pointer_cast< WValueSet< unsigned char > >( m_dataSet->getValueSet() );
 
     for( unsigned int i = 0; i < m_grid->size(); ++i )
     {
--- a/src/modules/scalarSegmentation/WSegmentationAlgoRegionGrowingConfidenceConnected.h
+++ b/src/modules/scalarSegmentation/WSegmentationAlgoRegionGrowingConfidenceConnected.h
@@ -148,7 +148,7 @@
 
     if( box )
     {
-        boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+        boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
         WVector3d v = 0.5 * ( box->getMinPos() + box->getMaxPos() );
         WValue< int > voxel = grid->getVoxelCoord( v );
 
--- a/src/modules/spatialDerivative/WMSpatialDerivative.cpp
+++ b/src/modules/spatialDerivative/WMSpatialDerivative.cpp
@@ -135,7 +135,7 @@
         m_progress->addSubProgress( progress );
 
         // loop through each voxel
-        boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataSet->getGrid() );
+        boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataSet->getGrid() );
         if( !grid )
         {
             errorLog() << "Only regular 3D grids allowed.";
@@ -147,7 +147,7 @@
             case W_DT_UNSIGNED_CHAR:
             {
                 boost::shared_ptr<WValueSet<unsigned char> > vals;
-                vals = boost::shared_dynamic_cast<WValueSet<unsigned char> >( dataSet->getValueSet() );
+                vals = boost::dynamic_pointer_cast<WValueSet<unsigned char> >( dataSet->getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 derive( grid, vals );
                 break;
@@ -155,7 +155,7 @@
             case W_DT_INT16:
             {
                 boost::shared_ptr<WValueSet<int16_t> > vals;
-                vals = boost::shared_dynamic_cast<WValueSet<int16_t> >( dataSet->getValueSet() );
+                vals = boost::dynamic_pointer_cast<WValueSet<int16_t> >( dataSet->getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 derive( grid, vals );
                 break;
@@ -163,7 +163,7 @@
             case W_DT_SIGNED_INT:
             {
                 boost::shared_ptr<WValueSet<int32_t> > vals;
-                vals = boost::shared_dynamic_cast<WValueSet<int32_t> >( dataSet->getValueSet() );
+                vals = boost::dynamic_pointer_cast<WValueSet<int32_t> >( dataSet->getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 derive( grid, vals );
                 break;
@@ -171,7 +171,7 @@
             case W_DT_FLOAT:
             {
                 boost::shared_ptr< WValueSet< float > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< float > >( dataSet->getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< float > >( dataSet->getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 derive( grid, vals );
                 break;
@@ -179,7 +179,7 @@
             case W_DT_DOUBLE:
             {
                 boost::shared_ptr< WValueSet< double > > vals;
-                vals = boost::shared_dynamic_cast< WValueSet< double > >( dataSet->getValueSet() );
+                vals = boost::dynamic_pointer_cast< WValueSet< double > >( dataSet->getValueSet() );
                 WAssert( vals, "Data type and data type indicator must fit." );
                 derive( grid, vals );
                 break;
--- a/src/modules/superquadricGlyphs/WMSuperquadricGlyphs.cpp
+++ b/src/modules/superquadricGlyphs/WMSuperquadricGlyphs.cpp
@@ -449,7 +449,7 @@
 
             // get pointers for the new data
             m_dataSet = newDataSet;
-            m_dataSetGrid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+            m_dataSetGrid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
             WAssert( m_dataSetGrid, "Dataset does not have a regular 3D grid." );
             m_maxX = m_dataSetGrid->getNbCoordsX();
             m_maxY = m_dataSetGrid->getNbCoordsY();
--- a/src/modules/surfaceParameterAnimator/WMSurfaceParameterAnimator.cpp
+++ b/src/modules/surfaceParameterAnimator/WMSurfaceParameterAnimator.cpp
@@ -257,7 +257,7 @@
             debugLog() << "Data changed. Uploading new data as texture.";
 
             // First, grab the grid
-            boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
+            boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
             if( !grid )
             {
                 errorLog() << "The dataset does not provide a regular grid. Ignoring dataset.";
--- a/src/modules/teemGlyphs/WMTeemGlyphs.cpp
+++ b/src/modules/teemGlyphs/WMTeemGlyphs.cpp
@@ -258,7 +258,7 @@
                 dataChanged = true;
             }
 
-            boost::shared_ptr< WGridRegular3D > gridReg = boost::shared_dynamic_cast< WGridRegular3D >( m_input->getData().get()->getGrid() );
+            boost::shared_ptr< WGridRegular3D > gridReg = boost::dynamic_pointer_cast< WGridRegular3D >( m_input->getData().get()->getGrid() );
             switch( m_sliceOrientationSelectionProp->get( true ).getItemIndexOfSelected( 0 ) )
             {
                 case 0:
@@ -342,8 +342,8 @@
     // run through the positions in the slice and draw the glyphs
     boost::shared_ptr< GlyphGeneration > generator;
     generator = boost::shared_ptr< GlyphGeneration >(
-                  new GlyphGeneration( boost::shared_dynamic_cast< WDataSetSphericalHarmonics >( m_input->getData() ),
-                                       boost::shared_dynamic_cast< WDataSetScalar >( m_inputGFA->getData() ),
+                  new GlyphGeneration( boost::dynamic_pointer_cast< WDataSetSphericalHarmonics >( m_input->getData() ),
+                                       boost::dynamic_pointer_cast< WDataSetScalar >( m_inputGFA->getData() ),
                                        m_GFAThresholdProp->get( true ),
                                        sliceId,
                                        order,
@@ -462,7 +462,7 @@
                                                 const bool& hideNegativeLobes ) :
     m_dataSet( dataSet ),
     m_dataGFA( dataGFA ),
-    m_grid( boost::shared_dynamic_cast< WGridRegular3D >( dataSet->getGrid() ) ),
+    m_grid( boost::dynamic_pointer_cast< WGridRegular3D >( dataSet->getGrid() ) ),
     m_thresholdGFA( thresholdGFA ),
     m_order( order ),
     m_sliceType( sliceType ),
@@ -607,7 +607,7 @@
             }
 
             // do not compute positions of vertices if GFA below threshold
-            if(  m_dataGFA && boost::shared_static_cast< WDataSetSingle >( m_dataGFA )->getValueAt( posId ) < m_thresholdGFA )
+            if(  m_dataGFA && boost::static_pointer_cast< WDataSetSingle >( m_dataGFA )->getValueAt( posId ) < m_thresholdGFA )
             {
                 continue;
             }
--- a/src/modules/transferFunctionColorBar/WMTransferFunctionColorBar.cpp
+++ b/src/modules/transferFunctionColorBar/WMTransferFunctionColorBar.cpp
@@ -221,7 +221,7 @@
                     WAssert( dataSet, "data set" );
                     boost::shared_ptr< WValueSetBase > valueSet = dataSet->getValueSet();
                     WAssert( valueSet, "value set" );
-                    boost::shared_ptr< WValueSet< unsigned char > > cvalueSet( boost::shared_dynamic_cast<WValueSet< unsigned char> >( valueSet ) );
+                    boost::shared_ptr< WValueSet< unsigned char > > cvalueSet( boost::dynamic_pointer_cast<WValueSet< unsigned char> >( valueSet ) );
                     if( !cvalueSet )
                     {
                         debugLog() << "invalid type";
--- a/src/modules/vectorAlign/WMVectorAlign.cpp
+++ b/src/modules/vectorAlign/WMVectorAlign.cpp
@@ -91,7 +91,7 @@
             newData.push_back( vectors->getVectorAt( i ) );
         }
 
-        boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( vectors->getGrid() );
+        boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( vectors->getGrid() );
         if( !grid )
         {
             return vectors;
--- a/src/modules/vectorOperator/WMVectorOperator.cpp
+++ b/src/modules/vectorOperator/WMVectorOperator.cpp
@@ -312,7 +312,7 @@
                 // apply the operation to each voxel
                 debugLog() << "Processing ...";
                 boost::shared_ptr< WValueSetBase > newValueSet = valueSetA->applyFunction( VisitorVSetA(
-                    boost::shared_dynamic_cast< WGridRegular3D >( dataSetA->getGrid() ), s )
+                    boost::dynamic_pointer_cast< WGridRegular3D >( dataSetA->getGrid() ), s )
                 );
 
                 // Create the new dataset and export it
--- a/src/modules/vectorPlot/WMVectorPlot.cpp
+++ b/src/modules/vectorPlot/WMVectorPlot.cpp
@@ -236,7 +236,7 @@
 
 void WMVectorPlot::transformVerts( osg::ref_ptr< osg::Vec3Array > verts )
 {
-    WMatrix< double > mat = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() )->getTransformationMatrix();
+    WMatrix< double > mat = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() )->getTransformationMatrix();
 
     for( size_t i = 0; i < verts->size(); ++i )
     {
--- a/src/modules/vectorPlot/WMVectorPlot.h
+++ b/src/modules/vectorPlot/WMVectorPlot.h
@@ -184,8 +184,8 @@
 
     WPosition current = WKernel::getRunningKernel()->getSelectionManager()->getCrosshair()->getPosition();
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_dataSet->getGrid() );
-    boost::shared_ptr< WValueSet< ValueType > > vals = boost::shared_dynamic_cast< WValueSet< ValueType > >( m_dataSet->getValueSet() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( m_dataSet->getGrid() );
+    boost::shared_ptr< WValueSet< ValueType > > vals = boost::dynamic_pointer_cast< WValueSet< ValueType > >( m_dataSet->getValueSet() );
 
     int maxX = grid->getNbCoordsX() - 1;
     int maxY = grid->getNbCoordsY() - 1;
--- a/src/modules/voxelizer/WMVoxelizer.cpp
+++ b/src/modules/voxelizer/WMVoxelizer.cpp
@@ -322,9 +322,9 @@
     ref_ptr< osg::Vec3Array > normals = ref_ptr< osg::Vec3Array >( new osg::Vec3Array );
 
     // cycle through all positions in the dataSet
-    boost::shared_ptr< WValueSet< double > > valueset = boost::shared_dynamic_cast< WValueSet< double > >( dataset->getValueSet() );
+    boost::shared_ptr< WValueSet< double > > valueset = boost::dynamic_pointer_cast< WValueSet< double > >( dataset->getValueSet() );
     WAssert( valueset != 0, "No scalar double valueset was given while generating the dataset geode" );
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( dataset->getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( dataset->getGrid() );
     WAssert( grid != 0, "No WGridRegular3D was given while generating the dataset geode"  );
     const std::vector< double >& values = *valueset->rawDataVectorPointer();
     for( size_t i = 0; i < values.size(); ++i )
--- a/src/modules/webglSupport/WMWebglSupport.cpp
+++ b/src/modules/webglSupport/WMWebglSupport.cpp
@@ -185,7 +185,7 @@
 
 void WMWebglSupport::colorTriMeshGray()
 {
-    //boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
+    //boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
     //bool success;
 
     for( size_t i = 0; i < m_triMesh->vertSize(); ++i )
@@ -210,7 +210,7 @@
 
 void WMWebglSupport::colorTriMeshRGB()
 {
-    //boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
+    //boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
     bool success;
 
     for( size_t i = 0; i < m_triMesh->vertSize(); ++i )
@@ -238,7 +238,7 @@
 {
     using namespace boost::filesystem; //NOLINT
 
-    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
+    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
     debugLog() << grid->getNbCoordsX() << " " << grid->getNbCoordsY() << " " << grid->getNbCoordsZ();
 
     osg::ref_ptr< osg::Image > ima = new osg::Image;
@@ -328,7 +328,7 @@
 {
     using namespace boost::filesystem; //NOLINT
 
-//    boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
+//    boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( ( *m_datasetScalar ).getGrid() );
 //    debugLog() << grid->getNbCoordsX() << " " << grid->getNbCoordsY() << " " << grid->getNbCoordsZ();
 
     osg::ref_ptr< osg::Image > ima = new osg::Image;
--- a/src/qt4gui/WMainWindow.cpp
+++ b/src/qt4gui/WMainWindow.cpp
@@ -457,7 +457,7 @@
 
         // data modules contain an member denoting the real data type. Currently we only have one data module and a not very modulated data
         // structures.
-        boost::shared_ptr< WDataModule > dataModule = boost::shared_static_cast< WDataModule >( module );
+        boost::shared_ptr< WDataModule > dataModule = boost::static_pointer_cast< WDataModule >( module );
 
         // grab data and identify type
         if( dataModule->getDataSet()->isA< WDataSetSingle >() && dataModule->getDataSet()->isTexture() )
@@ -813,7 +813,7 @@
         }
 
         ocdwEvent->getFlag()->set( widget );
-        boost::shared_dynamic_cast< QDockWidget >( widget )->toggleViewAction()->activate( QAction::Trigger );
+        boost::dynamic_pointer_cast< QDockWidget >( widget )->toggleViewAction()->activate( QAction::Trigger );
     }
     else if( event->type() == WCloseCustomDockWidgetEvent::CUSTOM_TYPE )
     {
--- a/src/qt4gui/controlPanel/WQtControlPanel.cpp
+++ b/src/qt4gui/controlPanel/WQtControlPanel.cpp
@@ -275,7 +275,7 @@
 
             // finally add the module
             // TODO(schurade): is this differentiation between data and "normal" modules really needed?
-            if( boost::shared_dynamic_cast< WDataModule >( e1->getModule() ).get() )
+            if( boost::dynamic_pointer_cast< WDataModule >( e1->getModule() ).get() )
             {
                 addDataset( e1->getModule(), 0 );
             }
@@ -770,7 +770,7 @@
         if( dynamic_cast< WQtModuleTreeItem* >( *it ) )
         {
             WModule::SPtr currentModule;
-            currentModule = boost::shared_dynamic_cast< WModule >( ( dynamic_cast< WQtModuleTreeItem* >( *it ) )->getModule() );
+            currentModule = boost::dynamic_pointer_cast< WModule >( ( dynamic_cast< WQtModuleTreeItem* >( *it ) )->getModule() );
             if( currentModule )
             {
                 if( currentModule == module )
@@ -783,7 +783,7 @@
         else if( dynamic_cast< WQtDatasetTreeItem* >( *it ) )
         {
             boost::shared_ptr< WDataModule > dataModule;
-            dataModule = boost::shared_dynamic_cast< WDataModule >( ( dynamic_cast< WQtDatasetTreeItem* >( *it ) )->getModule() );
+            dataModule = boost::dynamic_pointer_cast< WDataModule >( ( dynamic_cast< WQtDatasetTreeItem* >( *it ) )->getModule() );
             if( dataModule )
             {
                 if( dataModule == module )
--- a/src/qt4gui/networkEditor/WQtNetworkItem.cpp
+++ b/src/qt4gui/networkEditor/WQtNetworkItem.cpp
@@ -66,7 +66,7 @@
 
     // for captions of data modules
     boost::shared_ptr< WDataModule > dataModule;
-    dataModule = boost::shared_dynamic_cast< WDataModule >( module );
+    dataModule = boost::dynamic_pointer_cast< WDataModule >( module );
     if( dataModule )
     {
         m_subtitleFull = dataModule->getFilename().filename().string();
@@ -215,7 +215,7 @@
             // if busy indication was active -> update to remove it again
             needUpdate |= m_busyIndicatorShow;
             m_busyIndicatorShow = false;
-            WDataModule::SPtr dataModule = boost::shared_dynamic_cast< WDataModule >( m_module );
+            WDataModule::SPtr dataModule = boost::dynamic_pointer_cast< WDataModule >( m_module );
             if( dataModule )
             {
                 m_subtitleFull = dataModule->getFilename().filename().string();
--- a/src/modules/clusterSlicer/WMClusterSlicer.cpp
+++ b/src/modules/clusterSlicer/WMClusterSlicer.cpp
@@ -235,7 +235,7 @@
     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(); )
@@ -576,7 +576,7 @@
 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 )
     {
--- a/src/modules/fiberStipples/WMFiberStipples.cpp
+++ b/src/modules/fiberStipples/WMFiberStipples.cpp
@@ -234,7 +234,7 @@
     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.";
@@ -304,7 +304,7 @@
         // save data behind connectors since it might change during processing
         boost::shared_ptr< WDataSetVector > vectors = m_vectorIC->getData();
         boost::shared_ptr< WDataSetScalar > probTract = m_probIC->getData();
-        boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( probTract->getGrid() );
+        boost::shared_ptr< WGridRegular3D > grid = boost::dynamic_pointer_cast< WGridRegular3D >( probTract->getGrid() );
 
         if( !( vectors && probTract ) || !grid ) // if data valid
         {
--- a/src/modules/fiberStipples/WSPSliceBuilder.cpp
+++ b/src/modules/fiberStipples/WSPSliceBuilder.cpp
@@ -67,7 +67,7 @@
 //      */
 //     boost::shared_ptr< const WGridRegular3D > ensureWGridRegular3D( boost::shared_ptr< const WDataSetScalar > dataset )
 //     {
-//         boost::shared_ptr< const WGridRegular3D > result = boost::shared_dynamic_cast< WGridRegular3D >( dataset->getGrid() );
+//         boost::shared_ptr< const WGridRegular3D > result = boost::dynamic_pointer_cast< WGridRegular3D >( dataset->getGrid() );
 //         if( !result )
 //         {
 //             wlog::error( "WSPSliceBuilder" ) << "Cast to WGridRegular3D failed.";
