MATLAB: How to draw multiple lines to a binary image

Image Processing Toolboxmultiple lines to be added to a binary image.

Hi all,
I want to be able to draw multiple lines in a binary image "I". For example I will draw the first line using the right-click on "I" like (imline) function, then I will go to another location and draw another line and so on .
Once I finished, I double click on the last line I draw and all the lines will be added to the image, maybe using (createMask).
Any idea how to do that?
Other ways and suggestions are appreciated.
Thank you.
Meshoo

Best Answer

See attached demo (below the image that it creates).