Q:Hi everyone,

I have recently been using mincmorph to perform various morphomat operations, and I am really happy with that tool which is quite powerful. However, I noticed a small bug. The first slice/column/line get set to zero with the argument ‘-successive G’. Maybe I am just using an old version of the program (I believe the latest version is not available for my system, which is hardy) and that bug has already been fixed. The ‘-version’ tells me it is mincmorph 1.4. http://www.bic.mni.mcgill.ca/pipermail/minc-users/2010-February/002636.html

A:You are right, however I like to call this behaviour a “feature”. :)

This happens because of the shape of the structuring element, in order to gain a bit of speed and skip doing bounds checking while running through a 5 deep for loop, I only run the structuring element (for grouping/dilation/convolution) on the central chunk of the volume which guarantees me to not get edge problems.

The simple fix is to first pad your volume before running the group. the Pad option pads by 1/2 the size of the current structuring element/kernel.

So instead of doing this:

  mincmorph -successive ‘G’ in.mnc out.mnc

do this:

  mincmorph -successive ‘PG’ in.mnc out.mnc

Hope this helps,