// Send Piotr's code to Anna
#include <itkImage.h>
+#include <fpa/Image/Functors/SimpleNeighborhood.h>
// -------------------------------------------------------------------------
template< class _TInputImage, class _TOutputImage >
Algorithm( )
: Superclass( )
{
+ typedef itk::ImageBase< _TInputImage::ImageDimension > _TImageBase;
+ typedef fpa::Image::Functors::SimpleNeighborhood< _TImageBase > _TNeigh;
typedef itk::Image< TFrontId, _TInputImage::ImageDimension > _TMarks;
+
this->m_MarksIdx = this->GetNumberOfRequiredOutputs( );
this->itk::ProcessObject::SetNumberOfRequiredOutputs( this->m_MarksIdx + 1 );
typename _TMarks::Pointer marks = _TMarks::New( );
this->SetNthOutput( this->m_MarksIdx, marks );
+
+ typename _TNeigh::Pointer neigh = _TNeigh::New( );
+ this->SetNeighborhoodFunction( neigh );
}
// -------------------------------------------------------------------------
this->AllocateOutputs( );
TNeighborhoodFunction* neighFunc =
- dynamic_cast< TNeighborhoodFunction* >( this->GetNeighborhoodFunction( ) );
+ dynamic_cast< TNeighborhoodFunction* >(
+ this->GetNeighborhoodFunction( )
+ );
if( neighFunc == NULL )
itkExceptionMacro( << "NeighborhoodFunction not well defined." );
neighFunc->SetImage( this->GetInput( ) );