[Insight-users] GrayscaleErodeImageFilter and boundary
Miller, James V (Research)
millerjv at crd.ge.com
Fri, 30 Apr 2004 17:04:06 -0400
I modified the superclass so that a boundary condition can be
set by the user. See MorphologyImageFilter::OverrideBoundaryCondition().
I changed the default boundary conditions used by the dilation filters to be
NumericTraits<>::NonpositiveMin() and NumericTraits<>::max() for erosion
filters.
-----Original Message-----
From: Miller, James V (Research)
Sent: Friday, April 30, 2004 12:45 PM
To: 'Yann GAVET'; insight-users at itk.org
Subject: RE: [Insight-users] GrayscaleErodeImageFilter and boundary
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