#ifndef __fpa__Image__SkeletonFilter__h__
#define __fpa__Image__SkeletonFilter__h__
+#include <vector>
#include <fpa/Image/Dijkstra.h>
#include <cpExtensions/DataStructures/Skeleton.h>
#include <itkSimpleDataObjectDecorator.h>
-#include <functional>
-#include <map>
-#include <set>
-
-/* TODO
- #include <itkProcessObject.h>
- #include <fpa/Image/MinimumSpanningTree.h>
-*/
namespace fpa
{
typedef typename Superclass::TMST TMST;
typedef typename TImage::IndexType TIndex;
-
- typedef
- itk::Functor::IndexLexicographicCompare< Self::Dimension > TIndexCmp;
- typedef std::set< TIndex, TIndexCmp > TIndicesData;
- typedef itk::SimpleDataObjectDecorator< TIndicesData > TIndices;
- typedef itk::Image< unsigned char, Self::Dimension > TMarks;
- typedef
- cpExtensions::DataStructures::Skeleton< Self::Dimension > TSkeleton;
+ typedef itk::Image< unsigned char, Self::Dimension > TMarks;
+ typedef cpExtensions::DataStructures::Skeleton< Self::Dimension > TSkeleton;
protected:
typedef typename Superclass::_TQueueNode _TQueueNode;
- typedef
- std::multimap< double, TIndex, std::greater< double > >
- _TSkeletonQueue;
+ typedef std::multimap< double, TIndex, std::greater< double > > _TSkeletonQueue;
public:
itkNewMacro( Self );
itkTypeMacro( fpa::Image::SkeletonFilter, itk::Object );
public:
- TIndices* GetEndPoints( );
- TIndices* GetBifurcations( );
TSkeleton* GetSkeleton( );
TMarks* GetMarks( );
virtual void _UpdateResult( const _TQueueNode& n ) fpa_OVERRIDE;
virtual void _AfterGenerateData( ) fpa_OVERRIDE;
- void _EndPoints( );
- void _Skeleton( );
-
- /* TODO
- virtual void GenerateData( ) fpa_OVERRIDE;
- const TDistanceMap* dmap,
- const TCostMap* cmap,
- const TMST* mst,
- TIndicesData& end_points
- );
- const TDistanceMap* dmap,
- const TCostMap* cmap,
- const TMST* mst,
- const TIndicesData& end_points,
- TIndicesData& bifurcations,
- TSkeleton* skeleton
- );
- */
+ void _EndPoints( std::vector< TIndex >& end_points );
+ void _Skeleton( const std::vector< TIndex >& end_points );
private:
// Purposely not defined
protected:
_TSkeletonQueue m_SkeletonQueue;
- unsigned long m_EndPointsIdx;
- unsigned long m_BifurcationsIdx;
unsigned long m_SkeletonIdx;
unsigned long m_MarksIdx;
};