+ // End points
+ std::stringstream ePointsStr;
+ std::vector< typename _TInput::TImage::IndexType > ePoints =
+ filter.Get( )->GetEndPoints( );
+ for( typename _TInput::TImage::IndexType i: ePoints )
+ {
+ for( unsigned int d = 0; d < _TInput::VDim; ++d )
+ ePointsStr << i[ d ] << " ";
+ ePointsStr << std::endl;
+
+ } // rof
+
+ std::ofstream ePointsF( pname.c_str( ), std::ofstream::binary );
+ if( !ePointsF )
+ throw std::runtime_error(
+ TString( "Unable to write skeleton to \"" ) + pname + "\""
+ );
+ ePointsF.write( ePointsStr.str( ).c_str( ), ePointsStr.str( ).size( ) );
+