]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/TriangleMeshToBinaryImageFilter.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / TriangleMeshToBinaryImageFilter.cxx
index e3800292ca6086db6cae1e3d1670c5c793de5371..5dc3f68c6d2bf18cdb13f7e605758048b27bac48 100644 (file)
@@ -10,7 +10,7 @@ cpPlugins::BasicFilters::TriangleMeshToBinaryImageFilter::
 TriangleMeshToBinaryImageFilter( )
   : Superclass( )
 {
-  this->_AddInput( "Input", true );
+  this->_AddInput( "Input" );
   this->_AddOutput< cpPlugins::Interface::Image >( "Output" );
 
   this->m_Parameters->ConfigureAsUint( "InsideValue" );
@@ -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$