[Insight-users] GrayscaleErodeImageFilter and boundary

Miller, James V (Research) millerjv at crd.ge.com
Fri, 30 Apr 2004 12:45:08 -0400


The morphology filters default to using a constant (zero) 
boundary condition.  

I can look into adding a capability to override the default 
boundary condition.

In the short term, you can edit itkMorphologyImageFilter.txx and 
change the boundary that is set up at the beginning of the
ThreadedGenerateData() method.

Jim

-----Original Message-----
From: Yann GAVET [mailto:yann.gavet at univ-st-etienne.fr]
Sent: Friday, April 30, 2004 9:08 AM
To: insight-users at itk.org
Subject: [Insight-users] GrayscaleErodeImageFilter and boundary


Hi all.

I cant find how to manage the behavior of the outside of my image with 
grascale erode and dilate filters.
I used :
typedef itk::ConstantBoundaryCondition< InputImageType > 
BoundaryConditionType;
typedef itk::ConstShapedNeighborhoodIterator< InputImageType,
                        BoundaryConditionType > 
ShapedNeighborhoodIteratorType;

in the example given in ShapedNeighborhoodIterator1, and it works pretty 
well. But how can I set the boundary conditions directly from the filter 
(ie. grayscale or binary image filter)?

Do I have to do code erosion and dilation by hand ?

regards.
Yann