[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fill in a logic image: possible in IDL ?



jsilva@ci.uc.pt wrote:
> 
> Hello
> To explain what I?m trying to do about a FILL in a logic image, I give an
> example (see the Computer Tomography lung image in
> http://www.ci.uc.pt/pessoal/jsilva/idl_fill.jpg )
> Thanks in advance for any suggestion.
> Jose Silva
> Physics Dep., FCTUC, Portugal
> 

mask = byte(median(image gt 50, 9))
roi = search2d(mask, 0, 510, 0, 0)
msk1 = mask*0b
msk1[roi] = 1
roi = search2d(mask, 27, 32, 0, 0)
msk2 = mask*0b
msk2[roi] = 1

back_mask = msk1 or msk2
image_mask = 1 - back_mask


-- 
Ivan Zimine                   |   ivan.zimine@physics.unige.ch
Dpt. of Radiology             |   (+41 22) 372 70 70
Geneva University Hospitals   |