]> Creatis software - cpPlugins.git/blobdiff - plugins/cpPluginsWidgets/SeedWidget.cxx
More bugs smashed
[cpPlugins.git] / plugins / cpPluginsWidgets / SeedWidget.cxx
index c5c014e3b0ef8f99531eb748b42e867994fb8753..34e8efb01a61394c82e0554e82fa688ebce2b7b9 100644 (file)
@@ -44,34 +44,34 @@ _GenerateData( )
 }
 
 // -------------------------------------------------------------------------
-template< class I >
+template< class _TImage >
 std::string cpPluginsWidgets::SeedWidget::
-_GD0( I* image )
+_GD0( _TImage* image )
 {
   if( image != NULL )
   {
     if( this->m_Parameters.GetBool( "SeedsAreInRealSpace" ) )
-      return( this->_GD1_Points< I >( image ) );
+      return( this->_GD1_Points( image ) );
     else
-      return( this->_GD1_Vertices< I >( image ) );
+      return( this->_GD1_Vertices( image ) );
   }
   else
     return( "Widgets::SeedWidget: Input image dimension not supported." );
 }
 
 // -------------------------------------------------------------------------
-template< class I >
+template< class _TImage >
 std::string cpPluginsWidgets::SeedWidget::
-_GD1_Points( I* image )
+_GD1_Points( _TImage* image )
 {
   typedef cpExtensions::Interaction::ImageInteractorStyle _S;
-  typedef itk::Point< double, I::ImageDimension > _P;
+  typedef itk::Point< double, _TImage::ImageDimension > _P;
   typedef itk::SimpleDataObjectDecorator< std::vector< _P > > _Container;
 
   auto container = this->_CreateITK< _Container >( );
 
   double aux_pnt[ 3 ];
-  unsigned int dim = ( I::ImageDimension < 3 )? I::ImageDimension: 3;
+  unsigned int dim = ( _TImage::ImageDimension < 3 )? _TImage::ImageDimension: 3;
 
   container->Get( ).clear( );
 
@@ -134,18 +134,18 @@ _GD1_Points( I* image )
 }
 
 // -------------------------------------------------------------------------
-template< class I >
+template< class _TImage >
 std::string cpPluginsWidgets::SeedWidget::
-_GD1_Vertices( I* image )
+_GD1_Vertices( _TImage* image )
 {
   typedef cpExtensions::Interaction::ImageInteractorStyle _S;
   typedef
-    itk::SimpleDataObjectDecorator< std::vector< typename I::IndexType > >
+    itk::SimpleDataObjectDecorator< std::vector< typename _TImage::IndexType > >
     _Container;
   auto container = this->_CreateITK< _Container >( );
 
   double aux_pnt[ 3 ];
-  unsigned int dim = ( I::ImageDimension < 3 )? I::ImageDimension: 3;
+  unsigned int dim = ( _TImage::ImageDimension < 3 )? _TImage::ImageDimension: 3;
 
   container->Get( ).clear( );
 
@@ -165,10 +165,10 @@ _GD1_Vertices( I* image )
           for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
           {
             s->GetSeedAsPoint( i, aux_pnt );
-            typename I::PointType seed;
+            typename _TImage::PointType seed;
             for( unsigned int d = 0; d < dim; ++d )
               seed[ d ] = aux_pnt[ d ];
-            typename I::IndexType idx;
+            typename _TImage::IndexType idx;
             if( image->TransformPhysicalPointToIndex( seed, idx ) )
               container->Get( ).push_back( idx );
 
@@ -192,10 +192,10 @@ _GD1_Vertices( I* image )
       for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
       {
         s->GetSeedAsPoint( i, aux_pnt );
-        typename I::PointType seed;
+        typename _TImage::PointType seed;
         for( unsigned int d = 0; d < dim; ++d )
           seed[ d ] = aux_pnt[ d ];
-        typename I::IndexType idx;
+        typename _TImage::IndexType idx;
         if( image->TransformPhysicalPointToIndex( seed, idx ) )
           container->Get( ).push_back( idx );