]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/Widgets/SeedWidget.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / Widgets / SeedWidget.cxx
index c5c8383eb2a6813e802184a78e96aa48bbb9e97a..ee8a59dfe3062d763e09ac186fe6164295af5c29 100644 (file)
@@ -35,9 +35,6 @@ _GenerateData( )
 
   auto image =
     this->GetInputData< cpPlugins::Interface::Image >( "ReferenceImage" );
-  if( image == NULL )
-    return( "SeedWidget: No input image." );
-
   itk::DataObject* itk_image = image->GetITK< _2DImage >( );
   if( itk_image != NULL )
     return( this->_GD0< _2DImage >( itk_image ) );
@@ -48,7 +45,6 @@ _GenerateData( )
       return( this->_GD0< _3DImage >( itk_image ) );
 
   } // fi
-
   return( "SeedWidget: Input image dimension not supported." );
 }
 
@@ -100,7 +96,7 @@ _GD0( itk::DataObject* image )
   } // fi
 
   // Single interactor
-  _S* s = dynamic_cast< _S* >( this->m_SingleInteractor.GetPointer( ) );
+  _S* s = dynamic_cast< _S* >( this->m_SingleInteractor );
   if( s != NULL )
   {
     if( this->m_Configured )
@@ -119,33 +115,6 @@ _GD0( itk::DataObject* image )
       s->SeedWidgetOn( );
 
   } // fi
-
-  /* TODO
-  auto iIt = this->m_Interactors.begin( );
-  for( ; iIt != this->m_Interactors.end( ); ++iIt )
-  {
-    _S* s = dynamic_cast< _S* >( ( *iIt )->GetInteractorStyle( ) );
-    if( s != NULL )
-    {
-      if( this->m_Configured )
-      {
-        for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
-        {
-          s->GetSeedAsPoint( i, aux_pnt );
-          typename I::PointType seed;
-          for( unsigned int d = 0; d < dim; ++d )
-            seed[ d ] = aux_pnt[ d ];
-          out->AddPoint( seed );
-
-        } // rof
-      }
-      else
-        s->SeedWidgetOn( );
-
-    } // fi
-
-  } // rof
-  */
   this->m_Configured = true;
   return( "" );
 }