comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » ROI stack
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
ROI stack [message #60816] Thu, 12 June 2008 14:45
megan17 is currently offline  megan17
Messages: 1
Registered: June 2008
Junior Member
Hello,
Can anyone see where I'm going wrong here? I'm trying to generate a
binary mask of a multislice MRI image. When I run this at the
command line it works, but when I put it in a loop, it fails to return
anything. i.e. all variables of interest are "undefined"
Any help/tips would be appreciated!
Thanks,
Megan
AT COMMAND LINE:
xroi, img[*,*,i], regions_out = roi, /Block
mask = roi -> ComputeMask(Dimensions = dims, Mask_Rule=2)
masks[*,*,i] = mask
LOOP:
pro twodmask
img = read_nifti(dialog_pickfile())
dims = size(img[*,*,3], /dimensions)
s = size(img, /dimensions)
n_slices = 2 ;s[2]
masks = fltarr(dims[0], dims[1], s[2])
for i = 0,n_slices-1 do begin
xroi, img[*,*,i], regions_out = roi, /Block
mask = roi -> ComputeMask(Dimensions = dims, Mask_Rule=2)
masks[*,*,i] = mask
endfor

end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: BANKRUPTCY ATTORNEY
Next Topic: Re: ROI stack

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:52:26 PDT 2025

Total time taken to generate the page: 0.00519 seconds