// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __fpa__Common__SliceBySliceRandomWalker__h__ #define __fpa__Common__SliceBySliceRandomWalker__h__ #include #include namespace fpa { namespace Common { /** */ template< class _TImage, class _TLabels, class _TScalarImage > class SliceBySliceRandomWalker : public itk::ImageToImageFilter< _TImage, _TLabels > { public: typedef _TImage TImage; typedef _TLabels TLabels; typedef _TScalarImage TScalarImage; typedef SliceBySliceRandomWalker Self; typedef itk::ImageToImageFilter< TImage, TLabels > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename TImage::PixelType TPixel; typedef typename TLabels::PixelType TLabel; typedef typename TScalarImage::PixelType TScalar; public: itkNewMacro( Self ); itkTypeMacro( fpa::Common::SliceBySliceRandomWalker, itk::ImageToImageFilter ); itkGetConstMacro( Epsilon, TScalar ); itkSetMacro( Epsilon, TScalar ); itkGetConstMacro( Beta, TScalar ); itkSetMacro( Beta, TScalar ); itkGetConstMacro( VesselnessThreshold, TScalar ); itkSetMacro( VesselnessThreshold, TScalar ); ivqITKInputMacro( InputLabels, TLabels ); ivqITKInputMacro( InputVesselness, TScalarImage ); protected: SliceBySliceRandomWalker( ); virtual ~SliceBySliceRandomWalker( ); virtual void GenerateData( ) override; void _Composite( typename TScalarImage::Pointer& composite, const TLabels* labels, const TScalarImage* vesselness, const TScalar& maxVess ); template< class _TSlicePtr, class _TInput > void _Slice( _TSlicePtr& slice, const _TInput* input, typename _TInput::RegionType region ); template< class _TBinaryTree, class _TData3D, class _TFusion > void _RandomWalker( _TBinaryTree& binaryTree, const _TData3D& data3D, const _TFusion& fusion, bool down ); private: // Purposely not implemented SliceBySliceRandomWalker( const Self& other ); Self& operator=( const Self& other ); protected: TScalar m_Epsilon; TScalar m_Beta; TScalar m_VesselnessThreshold; TScalar m_VesselnessValue; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Common__SliceBySliceRandomWalker__h__ // eof - $RCSfile$