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

Home » Public Forums » archive » Re: object IDLanROI and polyfillv
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: object IDLanROI and polyfillv [message #26594 is a reply to message #26588] Thu, 13 September 2001 00:11 Go to previous messageGo to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
Thank you, David. The first answer helped. Do you think that other values for
mask_rule exist?
Attached is a piece of code illustrating at least differences of ComputeMask
and polyfillv.


David Fanning schrieb:

> Karsten Rodenacker (rodena@gsf.de) writes:
>
>> Two object graphics newbie questions:
>>
>> Does anyone know how to get from an IDLanROI object the initial path
>> coordinate data ?
>
> I'm not sure I completely understand this question.
> Do you mean you want the initial polygon points that
> you initialized the object with? If so, then you would
> do something like this:
>
> myRoiObj->GetProperty, Data=myPolygonPts
>
>> Suprisingly using the same contour (path) coordinate data, the IDLanROI
>> object returns with computemask a different one compared with a mask
>> generated by polyfillv. Is there any explication for that?
>
> The Mask_Rule keyword allows you to specify several algorithms
> for which pixels will be included in the mask. You will have
> to set it to whatever it is (nobody knows, I guess) that
> PolyFillV uses. The documentation, of course, doesn't even
> tell you which algorithm the IDLanROI object uses by default,
> so the standard procedure is to spend an hour or so experimenting
> until everything becomes clear. Then we would appreciate it if
> you would write an article about what you learned and publish
> it here. :-)
>

Here is (at least) a small piece of code showing the behaviour .

xroi,bytarr(256,256),regions_out=r1,/block,$
ROI_geom=r1_geo,stat=r1_stat
smii=r1->computemask(dimensions=[256,256],mask_rule=2) ne 0
r1->getProperty,all=ttxyinfo,data=ttxy
reg=polyfillv(ttxy[0,*],ttxy[1,*],256,256)
smjj=bytarr(256,256)
smjj[reg]=1b
tvscl,smii,0
tvscl,smjj,1
tvscl,smii xor smjj,2
end

The third image displayed shows the difference between the output of
myRoiObj->computemask and polyfillv.
Any roi should be drawn and xroi should be left by quitting.

The behaviour has not become clear, but maybe there is some expertise for
explanation. I am not so involved with graphics. Switching between
Mask_rule=1 and Mask_rule=2 shows only deviations on the lower left side of
the mask in contrast to the upper right side. Seemingly the understanding of
interior, boundary and 'interior and boundary' differs a bit throughout idl.

Regards
--
Karsten Rodenacker (LapTop)
------------------------------------------------------------ -------------:-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Tel: +49 89 31873401 | FAX: ...3369 | rodena@gsf.de | Karsten@Rodenacker.de
http://www.gsf.de/ibb/homepages/rodenacker
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Converting Miscrosoft Date/Time into JS?
Next Topic: Re: Error in function js2ymds (JHU/APL/S1R IDL Lib)?

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

Current Time: Fri Oct 10 15:24:37 PDT 2025

Total time taken to generate the page: 1.27929 seconds