morphsnakes icon indicating copy to clipboard operation
morphsnakes copied to clipboard

morphsnakes using a reclangle levelset

Open Jorg3MorenoD opened this issue 9 years ago • 1 comments

Hi,

How can I use a rectangle similar to you use at "europe.gif"?. I want to use the coordinates of a rectangle instead of a circle.

Thanks.

Jorg3MorenoD avatar Jul 07 '16 23:07 Jorg3MorenoD

once the MorphACWE or MorphGAC object is instantiated, change the levelset property to have 1s where you want the rectangle. for instance i believe this will have the desired effect:

macwe.levelset[:,:] = 1
macwe.levelset[2:-2,2:-2] = 0

stevendbrown avatar Aug 03 '16 16:08 stevendbrown