[Insight-users] Padding a volume

Miller, James V (Research) millerjv at crd.ge.com
Wed Apr 27 08:47:50 EDT 2005


The PadImageFilters do not use the BoundaryCondition objects. You are correct
that there is a cut-and-paste error in the MirrorPad documentation.  

In WrapPadImageFilter, when a pixel needs to be assigned from outside the
original volume, the value is taken from the opposite side of the image 
(as if the image is a N-dimensional torus).  For example, if you want
pixel at index -2, the value will be taken from the pixel at index (size-2).

In MirrorPadImageFilter, if you wanted the pixel at index -2, the value
will be taken from the pixel at index 2.

I am guessing MirrorPadImageFilter will be the closest to what you want to do.
But is not the same as a ZeroFlux boundary condition.

If you would like, I could quickly write a filter that will actually pad an
image using a specified BoundaryCondition (defaulting the ZeroFlux condition).

Note, that usually in ITK, we rely on the BoundaryCondition specified on 
NeighborhoodIterators to provide out of image information rather than by
padding an image.  The FaceCalculators are used to divide an image into
several regions, one that will have no boundary conditions and rest with
at least boundary conditions.  This allows us to iterate over the pixels 
that do not have boundary conditions quickly and only check the boundary
conditions on pixels that we know will need to have a boundary condition 
designation.

Jim



-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org]On Behalf Of sigmunau at idi.ntnu.no
Sent: Wednesday, April 27, 2005 6:40 AM
To: Insight-users at itk.org
Subject: [Insight-users] Padding a volume


I need to pad a volume with one voxel on all sides. I want the padding to
behave somewhat similar to ZeroFluxNeumannBoundaryCondition, but I fail to
find how I can use a BoundaryCondition object in a PadImageFilter. Since I
only need one voxel on each side, I think maybe WrapPadImageFilter or
MirrorPadImageFilter will work, but their documentation is a bit unclear. As
a matter of fact the documentation seems to be exactly the same for both of
those classes.

Can anyone tell me which of these will do what I need, or if there are any
other ways to do it?

-- 
Sigmund Augdal
Edgar B. Schieldropsv 29-14
N-7033 Trondheim
Norway
tlf: 91809129
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list