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

Home » Public Forums » archive » Re: does the image size matters?
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: does the image size matters? [message #39768 is a reply to message #39767] Mon, 14 June 2004 08:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Adhara writes:

> Thank you, let me explain you the situation:
> 1. I did the program first to run for one array, as follows:
>
> archivo = READ_ASCII(FILEPATH('gv04.bit', ROOT_DIR='c:\',$
> SUBDIRECTORY=['RSI','IDL55','lib']))
>
> archivo = READ_ASCII(FILEPATH('gv04.bit'))
> WRITE_TIFF,'gv04.tif',archivo.FIELD01
> end
>
> 2. It worked for 50x50,and I actually produced the image. I tried the
> same program but for 200x200, and an error message appears saying:
> % Tag name FIELD01 is undefined for structure <Anonymous>.
> % Execution halted at: $MAIN$ 5
> C:\RSI\IDL55\lib\transform.pro
>
> 4. The image was not produced
>
> 5. The file of [50,50] is exactly like the one [200,200] except for
> the size. When opened in Excel all the numbers of one row appear in
> the same cell. If I change the extension, and open it in notepad, the
> numbers appear separated by tabs. (Ascii file, isn't it??)
>
> 6. Then I used the following program to do it for 69 files:
> files=FindFile('*.bit')
> for j=0,N_Elements(files)-1 DO BEGIN
> cadena2=string([j])
> archivo = READ_ASCII(cadena2)
> cadena = 'gv' + string([j]) + '.tif'
> WRITE_TIFF,cadena,archivo.FIELD01
> endfor
>
> end
>
> 7. I tried: print, Archivo. The 255 and zeros appear (not properly
> aligned, zeros have more decimals than 255s),however, this did not
> show when opening the original file with excel or notepad...I think
> the problem is here....not?

I don't think so. :-)

> 8. If that is the case, how can I get rid of those extra zeros that I
> didn't creat!!??

Judging from the mail this morning, I think we probably need
a tutorial on formatting data. :-)

But do this. Forget READ_ASCII. Try this:

OpenR, lun, 'gv04.bit', /Get_Lun
array = FltArr(50,50) ; Or maybe this is (200,200). You tell me.
ReadF, lun, array
Free_Lun, array
Help, array

Does that work? When you display it as an image, does
it look correct?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: addition
Next Topic: dates transformation

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

Current Time: Fri Oct 10 10:33:54 PDT 2025

Total time taken to generate the page: 1.51953 seconds