Re: TVRD on an XROI screen?? [message #40703] |
Wed, 01 September 2004 11:32 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeff writes:
> Well, that's very true, but, the problem with this is that I seem to
> find myself doing this very scratching of the head just about every
> day! :( (and the really depressing thing is that I'm only half-joking
> ...)
Yeah, well, that's why the industry average is about
five good lines of code a day. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: TVRD on an XROI screen?? [message #40704 is a reply to message #40703] |
Wed, 01 September 2004 11:23  |
jnettle1
Messages: 27 Registered: January 2001
|
Junior Member |
|
|
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b9e7e29fa7dfb6e98986f@news.frii.com>...
> Jeff writes:
>
>> Yep, I tried it and it worked perfectly. I wish I'd posted about this
>> a lot sooner...before I decided to try seeing what the group said
>> about my problem, I was about 90% of the way through some other sloppy
>> solution that I won't go into :) Thanks for making life easier though
>> - which you did do even though I had almost done it some other way.
>
> Well, the wonderful thing about objects is that there are
> always multiple ways to do the same thing. Of course, some ways
> are better than others. The rule of thumb I use is if an
> hour has passed and I am still sitting there scratching my
> head and muttering "What the hell...this is getting WAY
> complicated!" then there is probably a better way. :-)
>
Well, that's very true, but, the problem with this is that I seem to
find myself doing this very scratching of the head just about every
day! :( (and the really depressing thing is that I'm only half-joking
...)
|
|
|
Re: TVRD on an XROI screen?? [message #40715 is a reply to message #40704] |
Tue, 31 August 2004 12:33  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Well, the wonderful thing about objects is that there are
> always multiple ways to do the same thing. Of course, some ways
> are better than others. The rule of thumb I use is if an
> hour has passed and I am still sitting there scratching my
> head and muttering "What the hell...this is getting WAY
> complicated!" then there is probably a better way. :-)
Conversely, you know you have found the right solution
when the change takes two minutes, propagates through
*all* your objects, and causes you to scare the bejesus
out of the dog when you scream "I LOVE OBJECTS!!!"
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: TVRD on an XROI screen?? [message #40716 is a reply to message #40715] |
Tue, 31 August 2004 12:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeff writes:
> Yep, I tried it and it worked perfectly. I wish I'd posted about this
> a lot sooner...before I decided to try seeing what the group said
> about my problem, I was about 90% of the way through some other sloppy
> solution that I won't go into :) Thanks for making life easier though
> - which you did do even though I had almost done it some other way.
Well, the wonderful thing about objects is that there are
always multiple ways to do the same thing. Of course, some ways
are better than others. The rule of thumb I use is if an
hour has passed and I am still sitting there scratching my
head and muttering "What the hell...this is getting WAY
complicated!" then there is probably a better way. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: TVRD on an XROI screen?? [message #40717 is a reply to message #40716] |
Tue, 31 August 2004 12:14  |
jnettle1
Messages: 27 Registered: January 2001
|
Junior Member |
|
|
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b9e13e0db53fe5498986e@news.frii.com>...
> Jeff writes:
>
>
>
> No problem. Did you try it? It worked perfectly for me.
>
> Cheers,
>
> David
David,
Yep, I tried it and it worked perfectly. I wish I'd posted about this
a lot sooner...before I decided to try seeing what the group said
about my problem, I was about 90% of the way through some other sloppy
solution that I won't go into :) Thanks for making life easier though
- which you did do even though I had almost done it some other way.
Jeff
|
|
|
Re: TVRD on an XROI screen?? [message #40721 is a reply to message #40717] |
Tue, 31 August 2004 04:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeff writes:
> Thanks for your help. I must be more tired than I thought, though,
> b/c i'm not sure i get what you're saying (sorry...i'm still pretty
> much a newbie here in a lot of ways). When you say you'd define
> another keyword for XROI, do you mean you'd modify the XROI routines
> themselves (the xroi.pro file)?
Yes, that is what I mean.
> And if so, don't you have to more
> than modifiy just the definition so that the routine will handle
> giving you back the OWINDOW object?
Well, I chose the definition judiciously so this should
have happened automatically if you followed my explicit
directions. :-)
> Sorry if this was something I should've already known. Thanks again
> for your help.
No problem. Did you try it? It worked perfectly for me.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: TVRD on an XROI screen?? [message #40722 is a reply to message #40721] |
Mon, 30 August 2004 21:21  |
jnettle1
Messages: 27 Registered: January 2001
|
Junior Member |
|
|
David,
Thanks for your help. I must be more tired than I thought, though,
b/c i'm not sure i get what you're saying (sorry...i'm still pretty
much a newbie here in a lot of ways). When you say you'd define
another keyword for XROI, do you mean you'd modify the XROI routines
themselves (the xroi.pro file)? And if so, don't you have to more
than modifiy just the definition so that the routine will handle
giving you back the OWINDOW object?
Sorry if this was something I should've already known. Thanks again
for your help.
Jeff
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b9d157e1af7fd3798986b@news.frii.com>...
> Jeff writes:
>
>> I have an image loaded into XROI and have drawn a bunch of ROI's on
>> it. Is there a way to quickly and easily write out a tiff file that
>> has the image and the ROI outlines in it..like you could do if you
>> could do a TVRD on an XROI window?
>
> Here is what I would do. I would define another keyword
> for XROI, named OWINDOW. I would define it like this:
>
> XROI, $
> ..., $
> OWINDOW=oWindow, $
> ...
>
> Then, I would call XROI like this:
>
> IDL> XROI, myimagem OWINDOW=win
>
> After I had drawn my ROI's and before I opened any other
> windows, I would do this:
>
> IDL> win -> GetProperty, Image_Data=theImage
> IDL> Write_Tiff, 'myroiimage.tif', Reverse(theImage,3)
>
> There you go. :-)
>
> Cheers,
>
> David
|
|
|
Re: TVRD on an XROI screen?? [message #40726 is a reply to message #40722] |
Mon, 30 August 2004 10:44  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeff writes:
> I have an image loaded into XROI and have drawn a bunch of ROI's on
> it. Is there a way to quickly and easily write out a tiff file that
> has the image and the ROI outlines in it..like you could do if you
> could do a TVRD on an XROI window?
Here is what I would do. I would define another keyword
for XROI, named OWINDOW. I would define it like this:
XROI, $
..., $
OWINDOW=oWindow, $
...
Then, I would call XROI like this:
IDL> XROI, myimagem OWINDOW=win
After I had drawn my ROI's and before I opened any other
windows, I would do this:
IDL> win -> GetProperty, Image_Data=theImage
IDL> Write_Tiff, 'myroiimage.tif', Reverse(theImage,3)
There you go. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|