]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/TriangleMeshToBinaryImageFilter.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / TriangleMeshToBinaryImageFilter.cxx
index 8ede24e9ff6d6331bd07e1165eafa505c82d7796..5dc3f68c6d2bf18cdb13f7e605758048b27bac48 100644 (file)
@@ -36,9 +36,6 @@ _GenerateData( )
   typedef itk::Mesh< double, 3 > _3D;
 
   auto input = this->GetInputData< cpPlugins::Interface::Mesh >( "Input" );
-  if( input == NULL )
-    return( "TriangleMeshToBinaryImageFilter: No valid input mesh." );
-
   auto in_3f = input->GetITK< _3F >( );
   auto in_3d = input->GetITK< _3D >( );
   if     ( in_3f != NULL ) return( this->_GD0( in_3f ) );
@@ -120,13 +117,8 @@ _RealGD( M* mesh )
 
   // Connect output
   auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" );
-  if( out != NULL )
-  {
-    out->SetITK< I >( filter->GetOutput( ) );
-    return( "" );
-  }
-  else
-    return( "TriangleMeshToBinaryImageFilter: output not correctly created." );
+  out->SetITK( filter->GetOutput( ) );
+  return( "" );
 }
 
 // eof - $RCSfile$