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

Home » Public Forums » archive » Re: Pre-written Modules and DWF's drawline (in particular)
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: Pre-written Modules and DWF's drawline (in particular) [message #13613] Tue, 24 November 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Rose (rmlongfield@my-dejanews.com) writes:

> Anyway, I have been implementing DWF's excellent DRAWLINE.pro into an image
> processing tool. One drawback, I found was that there was no way to get the
> information returned from the program for analysis done somewhere else. I
> thought that if a KEYWORD was added, such as
>
> drawline, image,DESTINATION_WIDGET_ID = tlb_of_another_widget
>
> Then this tlb variable could be present in the info structure, then a pseudo
> event can be sent to this tlb_of_another_widget. This pseudo event would
> contain the coordinates of an ROI, for instance. (I haven't connected this to
> CW_ZOOM yet, as someone on this group was trying, but I will be doing it soon)
>
> I like using pre-written programs since they take care of a lot of messy
> stuff like colors and sizing. But I like even better to leave them intact,
> i.e. not have to change them to suit particular needs.

Most of the programs found on my web page *should* be modified,
for a variety of reasons. :-) But mostly because I write them
as simply as I can so they can be understood.

This DrawLine program is one I wrote too simply, I think,
and I have been meaning to change it. In particular, I
have a pointer to the collected ROI points that gets updated for
each point. This is not a very efficient method. If I were
to write this program today, I would pre-allocated a
number of points (say, 100) and keep a counter of how
many I had. When I reached the limit, I would get
another chunk of 100 points, etc. This would be *much*
faster and would use memory better.

But the truth is, I haven't found a very satisfactory
way of incorporating something like ROIs into programs
in a completely generic way. I find I almost always
incorporate this functionality directly into each
program I am writing, and that each program is just
slightly different from the one before. In any case,
a DESTINATION_ID is not a bad way to go, I think.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: Re: 5.2 looks nice
Next Topic: Pre-written Modules and DWF's drawline (in particular)

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

Current Time: Wed Oct 08 18:11:42 PDT 2025

Total time taken to generate the page: 0.00438 seconds