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

Home » Public Forums » archive » Re: How to define resolution (not dimension!) for IDLanRoi->computeMask
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: How to define resolution (not dimension!) for IDLanRoi->computeMask [message #65051] Mon, 09 February 2009 07:11 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
justspam03@yahoo.de writes:

> eieieiei - I was afraid I'd need to do something like this :-(
> Well, I guess I'll have my own overloaded computeMask... I anyway
> subclass from IDLanRoi.

Well, somehow you have to get from a data coordinate system
into a pixel coordinate system. There are probably other
ways to do it. I showed you what I do in direct graphics.
There are certainly comparable methods in object graphics,
but I don't know what they are. :-)

I suppose you could use the old Scale_Vector/Value_Locate
trick to find the device values of your ROI:

s = Size(image)
xvec = Scale_Vector(Findgen(s[0], 1, 5)
yvec = Scale_Vector(Findgen(s[1], 1, 5)
xdevice = Value_Locate(xvec, x)
ydevice = Value_Locate(yvec, y)
indices = PolyFillv(xdevice, ydevice, s[0], s[1])

I haven't tested that, but it should work. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: NASA IDL Astronomy Library Still There?
Next Topic: Re: How to know how much memory (in Mb) takes an object ? 1700 on memory grObjects is too much?

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

Current Time: Wed Oct 08 19:58:31 PDT 2025

Total time taken to generate the page: 0.00453 seconds