[Insight-users] How to create my own NeighborhoodOperator ?

SERIOT Rémi DEC/SPUA/LTEC SERIOT at DRNCAD . CEA . FR
Thu, 12 Jun 2003 16:19:02 +0200


Hi all

I would like to apply my own 3x3 operator with
NeighborhoodOperatorImageFilter, but I don't how I can create this operator.

 I already write this code
 
   std::vector< double > coeff(9);
 
   double val =3D -(1-alpha) / (8*alpha);
   for(int i=3D0; i<9; i++)
 	coeff[i] =3D val;
   coeff[4] =3D 1/alpha;
 
   itk::NeighborhoodOperatorImageFilter<ImageType, ImageType>::Pointer =
filter
     itk::NeighborhoodOperatorImageFilter<ImageType, ImageType>::New();
 
   //filter->SetOperator( oper );
   filter->SetInput( m_image );
   filter->Update();
 
 So could you explain me, how I can create the Neighborhood Operator
 
 Thanks
 
Rémi