]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/SignedMaurerDistanceMapImageFilter.cxx
MAC compilation issues solved... Now some tests please
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / SignedMaurerDistanceMapImageFilter.cxx
index 147855535c944a96c4957950860e7465d49539fb..90fa01946e5ef426d477428101e15557eb8b9b0f 100644 (file)
@@ -38,11 +38,7 @@ cpPlugins::BasicFilters::SignedMaurerDistanceMapImageFilter::
 std::string cpPlugins::BasicFilters::SignedMaurerDistanceMapImageFilter::
 _GenerateData( )
 {
-  cpPlugins::Interface::Image* image =
-    this->GetInput< cpPlugins::Interface::Image >( "Input" );
-  if( image == NULL )
-    return( "SignedMaurerDistanceMapImageFilter: No input image." );
-
+  auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
   itk::DataObject* itk_image = NULL;
   std::string r = "";
   cpPlugins_Image_Demangle_AllScalarTypes( 2, image, itk_image, r, _GD0 );
@@ -98,15 +94,9 @@ _RealGD( itk::DataObject* image )
   filter->Update( );
 
   // Connect output
-  cpPlugins::Interface::Image* out =
-    this->GetOutput< cpPlugins::Interface::Image >( "Output" );
-  if( out != NULL )
-  {
-    out->SetITK< O >( filter->GetOutput( ) );
-    return( "" );
-  }
-  else
-    return( "SignedMaurerDistanceMapImageFilter: output not correctly created." );
+  auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" );
+  out->SetITK( filter->GetOutput( ) );
+  return( "" );
 }
 
 // eof - $RCSfile$