]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx
MAC compilation issues solved... Now some tests please
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / MarchingCubes.cxx
index 51bc93708e844324918be8f7e5906b8696224e1d..388b75e293ef3f4f202d4351fcdf8614cde72877 100644 (file)
@@ -12,7 +12,7 @@ MarchingCubes( )
   : Superclass( )
 {
   this->_AddInput( "Input" );
-  this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" );
+  this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
 
   this->m_Parameters->ConfigureAsRealList( "Thresholds" );
 }
@@ -28,10 +28,7 @@ std::string cpPlugins::BasicFilters::MarchingCubes::
 _GenerateData( )
 {
   // Get input
-  cpPlugins::Interface::Image* image =
-    this->GetInput< cpPlugins::Interface::Image >( "Input" );
-  if( image == NULL )
-    return( "MarchingCubes: Input data is not a valid image." );
+  auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
   vtkImageData* vtk_image = image->GetVTK< vtkImageData >( );
   if( vtk_image == NULL )
     return( "MarchingCubes: Input does not have a valid VTK conversion." );
@@ -62,8 +59,7 @@ _GenerateData( )
     return( "MarchingCubes: Input data does not have a valid dimension." );
 
   // Execute filter
-  cpPlugins::Interface::Mesh* out =
-    this->GetOutput< cpPlugins::Interface::Mesh >( "Output" );
+  auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
   out->SetVTK( pd );
   return( "" );
 }