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

Home » Public Forums » archive » plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: plot [message #68872 is a reply to message #68668] Mon, 30 November 2009 23:56 Go to previous messageGo to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 5 Nov., 12:35, greg <greg.a...@googlemail.com> wrote:
>> I still think that the problem as stated
>> is ill-posed.
>
> I agree. If you take away the convex condition (as the OP seems to
> ask), then whatever the set of points you can keep reducing the
> surrounding area until you get to zero. You'll get some kind of
> spidery thing, but it's probably not what he had in mind.
>
> Greg

Dear Bing,
like many times the routines from David Fanning will help. So the
following approach solved my own "concavity problem". Here it is -
hope it helps:

function get_mult_inds_from_mask,mask,verbose=verbose
;lines must be 255b, background must be 0b)
; denies dfanning's find_boundary

mask= bytscl(mask)
sz = size(mask,/dimensions)
l = label_region(mask)
h = histogram(l)
n = n_elements(h)
rois=replicate(ptr_new(),n-1)
if keyword_set(verbose) then window,/free,xsize=sz[0],ysize=sz[1]
for i=1,n-1 do begin
r=find_boundary(where(l eq i),xsize=sz[0],ysize=sz[1])
rois[i-1] = ptr_new(lonarr(2,n_elements(r)/2)+1)
*(rois[i-1]) = [[r],[r[*,0]]]

if keyword_set(verbose) then plots, r[0,*],r[1,*],color=255/i
endfor
return,rois
end

Regards

CR

p.s.: My personal favourite is Davids selectimage - it's superb and
I'm hoping that he will extend this routine to open ENVI files (also
spectra)....
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Plot
Next Topic: call_external

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

Current Time: Fri Oct 10 09:39:25 PDT 2025

Total time taken to generate the page: 0.80012 seconds