Skip to content

Morphology #15

@nilgoyette

Description

@nilgoyette

There's a problem with the border management in the morphological erosion. Currently we are doing:

  • Set all borders to 0, then work on all 3x3x3 windows. Thus avoiding to work with outside voxels.
  • This seems logical, but it always gives a black border, whatever the kernel used.

The consequence of our current method can be seen in the following image.
Wrong

  • In red+pink we have ANTs ImageMath result.
  • in pink, we have ndimage result. We can easily see that we "ate" the border.

I read more and I realized that it's not the right behavior: "Pixels beyond the image border are assigned the maximum value afforded by the data type." Thus all the padded voxels should be set to 1.

Our current method (working with windows to avoid padding) can't work. We can keep the window but we must pad with 1 if we want to avoid border effects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions