Fixed mask with dilate

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fixed mask with dilate

Hannes Cattrysse
If you use the dilate function in ImageJ, ImageJ uses a fixed 3x3 image. Would it be possible to change the change the size of the mask to for exaple 5x5 and/or change it shape?

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Fixed mask with dilate

Michael Schmid
Hi Hannes,

Here are a few possiblities for a 'dilate' with larger radius:

- in Process>Binary Options, set 'count' to 2, then you get a 5x5 mask
(count=3 for a 7x7 mask, etc.).

- Use Process>Filters>Maximum. This will give you a circular mask, in
contrast to the square mask of the Binary commands. In contrast to the
'Binary' commands, these filters don't care about what is displayed as
black or white ('Black background' in Binary Options).
If your foreground has pixel values of 0, not 255, use Minimum instead.

- The external 'Fast Filters' plugin has 'Minimum' and 'Maximum' filters
that do the same, but with square or rectangular mask.
http://imagejdocu.tudor.lu/doku.php?id=plugin:filter:fast_filters:start

- For very large radii, and if you want to use a circular mask, instead of
the Process>Filters, it is faster to create the Euclidian Distance map of
the inverted image and threshold it.

Michael
_________________________________________________________

On Fri, November 2, 2012 18:23, Hannes Cattrysse wrote:
> If you use the dilate function in ImageJ, ImageJ uses a fixed 3x3 image.
> Would it be possible to change the change the size of the mask to for
> exaple 5x5 and/or change it shape?
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html