]> Creatis software - cpPlugins.git/blobdiff - plugins/cpPluginsImageMeshFilters/TriangleMeshToBinaryImageFilter.cxx
...
[cpPlugins.git] / plugins / cpPluginsImageMeshFilters / TriangleMeshToBinaryImageFilter.cxx
index 4ee256fc2fc0f5f5eba0a5fff60693f5f0c8d33d..c2442a690047f6d7b6c9fe43bf86e7b6a9682420 100644 (file)
@@ -36,8 +36,8 @@ _GenerateData( )
   typedef itk::Mesh< float, 3 >  _3F;
   typedef itk::Mesh< double, 3 > _3D;
 
-  auto _3f = this->GetInputData( "Input" )->GetITK< _3F >( );
-  auto _3d = this->GetInputData( "Input" )->GetITK< _3D >( );
+  auto _3f = this->GetInputData< _3F >( "Input" );
+  auto _3d = this->GetInputData< _3D >( "Input" );
   if     ( _3f != NULL ) this->_GD0( _3f );
   else if( _3d != NULL ) this->_GD0( _3d );
   else this->_Error( "No valid input mesh." );
@@ -65,7 +65,7 @@ _GD1( _TMesh* mesh )
 
   _TFilter* filter = this->_CreateITK< _TFilter >( );
 
-  auto in_bb = dynamic_cast< _TBB* >( this->GetInputData( "BoundingBox" ) );
+  auto in_bb = dynamic_cast< _TBB* >( this->GetInput( "BoundingBox" ) );
   _TPoint minBB, maxBB;
   if( in_bb == NULL )
   {
@@ -127,8 +127,7 @@ _GD1( _TMesh* mesh )
   filter->Update( );
 
   // Connect output
-  auto out = this->GetOutputData( "Output" );
-  out->SetITK( filter->GetOutput( ) );
+  this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
 }
 
 // eof - $RCSfile$