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

Home » Public Forums » archive » Re: selfcreating filenames for putput files?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: selfcreating filenames for putput files? [message #38944] Fri, 02 April 2004 15:55
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Thomas Nehls wrote:

> hi there,
>
> I created a pro with which I can compute a list of different images. As
> a result of the computation I want to save the results in a File,
> which?s name should consist of the name of the input-file and a suffix
> indicating which result it is. File is a variable which contains
> alsready the filename of the input-file.
>
> like:
>
> write_tiff, file and"_1st_PC.tif", computed_image,ORIENTATION=2
>
> How can I connect the changing variable file with the constant suffix
> "_1st_PC.tif" ?
>
> Thank you very much!
> Tom


Welcome Thomas,

there are two possibilities

print,strjoin([file,'1st_PC.tif'],'_')
print,file+'_1st_PC.tif'

It is better to use a single quote ' because the double quote is used to
format numbers to octal numbers "10 is 8.

Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: selfcreating filenames for putput files? [message #38953 is a reply to message #38944] Fri, 02 April 2004 08:51 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Paul Van Delst wrote:
> Thomas Nehls wrote:
>
>> hi there,
>>
>> I created a pro with which I can compute a list of different images.
>> As a result of the computation I want to save the results in a File,
>> which�s name should consist of the name of the input-file and a suffix
>> indicating which result it is. File is a variable which contains
>> alsready the filename of the input-file.
>>
>> like:
>>
>
> write_tiff, file + '_1st_PC.tif', computed_image,ORIENTATION=2
>
> or, if you want to use the output filename somewhere else,
>
> outputfile = file + '_1st_PC.tif'
> write_tiff, outputfile, computed_image,ORIENTATION=2
>

Or, if you are in a loop...

For i = 0L, nResults-1 Do Begin

...doStuff...

outputfile = file + StrTrim(i,2) + '_PC.tif'
write_tiff, outputfile, computed_image,ORIENTATION=2

EndFor
Re: selfcreating filenames for putput files? [message #38954 is a reply to message #38953] Fri, 02 April 2004 08:22 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Thomas Nehls wrote:
> hi there,
>
> I created a pro with which I can compute a list of different images. As
> a result of the computation I want to save the results in a File,
> which�s name should consist of the name of the input-file and a suffix
> indicating which result it is. File is a variable which contains
> alsready the filename of the input-file.
>
> like:
>

write_tiff, file + '_1st_PC.tif', computed_image,ORIENTATION=2

or, if you want to use the output filename somewhere else,

outputfile = file + '_1st_PC.tif'
write_tiff, outputfile, computed_image,ORIENTATION=2
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Need help with value_locate and interpolation
Next Topic: Re: Tabulated output

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

Current Time: Wed Oct 08 13:33:20 PDT 2025

Total time taken to generate the page: 0.00642 seconds