]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/Widgets/SeedWidget.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / Widgets / SeedWidget.cxx
index 8dbaf9fe96ddcd372fb098cd5e409b8c41ab989e..383b4a202804249da69d0187b3caf6729938a3b6 100644 (file)
@@ -13,7 +13,7 @@ SeedWidget( )
   : Superclass( ),
     m_Configured( false )
 {
-  this->_AddInput( "ReferenceImage" );
+  this->_AddInput( "ReferenceImage", true );
   this->_AddOutput< cpPlugins::Interface::PointList >( "Output" );
 
   this->m_Parameters->ConfigureAsBool( "SeedsAreInRealSpace" );
@@ -33,8 +33,8 @@ _GenerateData( )
   typedef itk::ImageBase< 2 > _2DImage;
   typedef itk::ImageBase< 3 > _3DImage;
 
-  cpPlugins::Interface::Image* image =
-    this->GetInput< cpPlugins::Interface::Image >( "ReferenceImage" );
+  auto image =
+    this->GetInputData< cpPlugins::Interface::Image >( "ReferenceImage" );
   if( image == NULL )
     return( "SeedWidget: No input image." );
 
@@ -60,8 +60,8 @@ _GD0( itk::DataObject* image )
   typedef cpExtensions::Interaction::ImageInteractorStyle _S;
 
   I* base_image = dynamic_cast< I* >( image );
-  cpPlugins::Interface::PointList* out =
-    this->GetOutput< cpPlugins::Interface::PointList >( "Output" );
+  auto out =
+    this->GetOutputData< cpPlugins::Interface::PointList >( "Output" );
   double aux_pnt[ 3 ];
   unsigned int dim = ( I::ImageDimension < 3 )? I::ImageDimension: 3;
 
@@ -100,7 +100,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 )