}
// -------------------------------------------------------------------------
-std::string fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
+void fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
_GenerateData( )
{
auto image = this->GetInputData( "CostsImage" )->GetITK< itk::DataObject >( );
- std::string r = cpPlugin_Image_Demangle_Pixel_Dim( _GD0, image, float, 2 );
- if( r != "" ) r = cpPlugin_Image_Demangle_Pixel_Dim( _GD0, image, double, 2 );
- if( r != "" ) r = cpPlugin_Image_Demangle_Pixel_Dim( _GD0, image, float, 3 );
- if( r != "" ) r = cpPlugin_Image_Demangle_Pixel_Dim( _GD0, image, double, 3 );
- return( r );
+ cpPlugins_Image_Demangle_Pixel_AllFloats ( _GD0, image, 2 );
+ else cpPlugins_Image_Demangle_Pixel_AllFloats( _GD0, image, 3 );
+ else this->_Error( "Invalid input costs." );
}
// -------------------------------------------------------------------------
template< class _TImage >
-std::string fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
+void fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
_GD0( _TImage* image )
{
typedef fpa::Image::MinimumSpanningTree< _TImage::ImageDimension > _TMST;
typedef fpa::Image::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree< _TImage, _TMST > _TFilter;
// Check input objects' integrity
- if( image == NULL )
- return(
- "fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree: No valid input costs image."
- );
auto dmap = this->GetInputData( "DistanceMap" )->GetITK< _TImage >( );
if( dmap == NULL )
- return(
- "fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree: Distance map does not have the same type as the costs image."
- );
+ this->_Error( "Distance map does not have the same type as the costs image." );
auto mst = this->GetInputData( "MST" )->GetITK< _TMST >( );
if( mst == NULL )
- return(
- "fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree: No valid input tree."
- );
+ this->_Error( "No valid input tree." );
// Create filter and connect inputs
_TFilter* filter = this->_CreateITK< _TFilter >( );
this->GetOutputData( "Bifurcations" )->SetITK( filter->GetBifurcations( ) );
this->GetOutputData( "Collisions" )->SetITK( filter->GetCollisions( ) );
this->GetOutputData( "Skeleton" )->SetITK( filter->GetSkeleton( ) );
- return( "" );
}
// eof - $RCSfile$