1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __cpExtensions__Algorithms__SkeletonToImageFilter__h__
6 #define __cpExtensions__Algorithms__SkeletonToImageFilter__h__
8 #include <cpExtensions/Config.h>
9 #include <itkImageSource.h>
11 // -------------------------------------------------------------------------
12 namespace cpExtensions
18 template< class _TSkeleton, class _TImage >
19 class SkeletonToImageFilter
20 : public itk::ImageSource< _TImage >
24 typedef SkeletonToImageFilter Self;
25 typedef itk::ImageSource< _TImage > Superclass;
26 typedef itk::SmartPointer< Self > Pointer;
27 typedef itk::SmartPointer< const Self > ConstPointer;
29 typedef _TSkeleton TSkeleton;
30 typedef _TImage TImage;
31 typedef typename _TImage::IndexType TIndex;
32 typedef typename _TImage::PixelType TPixel;
33 typedef typename _TImage::PointType TPoint;
34 typedef typename _TImage::RegionType TRegion;
35 typedef itk::ImageBase< _TImage::ImageDimension > TImageBase;
39 itkTypeMacro( SkeletonToImageFilter, itk::ImageSource );
41 itkGetConstMacro( InsideValue, TPixel );
42 itkGetConstMacro( OutsideValue, TPixel );
44 itkSetMacro( InsideValue, TPixel );
45 itkSetMacro( OutsideValue, TPixel );
48 const TImageBase* GetTemplateImage( ) const;
49 void SetTemplateImage( const TImageBase* image );
51 const TSkeleton* GetSkeleton( ) const;
52 void SetSkeleton( const TSkeleton* skeleton );
55 SkeletonToImageFilter( );
56 virtual ~SkeletonToImageFilter( );
58 virtual void GenerateData( ) cpExtensions_OVERRIDE;
61 // Purposely not implemented
62 SkeletonToImageFilter( const Self& );
63 void operator=( const Self& );
67 TPixel m_OutsideValue;
74 // -------------------------------------------------------------------------
75 #ifndef ITK_MANUAL_INSTANTIATION
76 # include <cpExtensions/Algorithms/SkeletonToImageFilter.hxx>
77 #endif // ITK_MANUAL_INSTANTIATION
79 #endif // __cpExtensions__Algorithms__SkeletonToImageFilter__h__