]> Creatis software - FrontAlgorithms.git/blobdiff - plugins/fpa/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.cxx
...
[FrontAlgorithms.git] / plugins / fpa / ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.cxx
index 73fbad0c95e7e2c05508bfde2e6f521dd15f9119..ea2c37abfeb6cd77b9fc72216658165817bfe5f5 100644 (file)
@@ -32,7 +32,7 @@ fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
 void fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
 _GenerateData( )
 {
-  auto image = this->GetInputData( "CostsImage" )->GetITK< itk::DataObject >( );
+  auto image = this->GetInputData< itk::DataObject >( "CostsImage" );
   cpPlugins_Image_Demangle_Pixel_AllFloats     ( _GD0, image, 2 );
   else cpPlugins_Image_Demangle_Pixel_AllFloats( _GD0, image, 3 );
   else this->_Error( "Invalid input costs." );
@@ -47,10 +47,10 @@ _GD0( _TImage* image )
   typedef fpa::Image::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree< _TImage, _TMST > _TFilter;
 
   // Check input objects' integrity
-  auto dmap = this->GetInputData( "DistanceMap" )->GetITK< _TImage >( );
+  auto dmap = this->GetInputData< _TImage >( "DistanceMap" );
   if( dmap == NULL )
     this->_Error( "Distance map does not have the same type as the costs image." );
-  auto mst = this->GetInputData( "MST" )->GetITK< _TMST >( );
+  auto mst = this->GetInputData< _TMST >( "MST" );
   if( mst == NULL )
     this->_Error( "No valid input tree." );
 
@@ -64,10 +64,10 @@ _GD0( _TImage* image )
     );
   filter->Update( );
 
-  this->GetOutputData( "EndPoints" )->SetITK( filter->GetEndPoints( ) );
-  this->GetOutputData( "Bifurcations" )->SetITK( filter->GetBifurcations( ) );
-  this->GetOutputData( "Collisions" )->SetITK( filter->GetCollisions( ) );
-  this->GetOutputData( "Skeleton" )->SetITK( filter->GetSkeleton( ) );
+  this->GetOutput( "EndPoints" )->SetITK( filter->GetEndPoints( ) );
+  this->GetOutput( "Bifurcations" )->SetITK( filter->GetBifurcations( ) );
+  this->GetOutput( "Collisions" )->SetITK( filter->GetCollisions( ) );
+  this->GetOutput( "Skeleton" )->SetITK( filter->GetSkeleton( ) );
 }
 
 // eof - $RCSfile$