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

Home » Public Forums » archive » Data I/O problem on IBM R6000
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
Data I/O problem on IBM R6000 [message #3448] Mon, 23 January 1995 11:02
pellet is currently offline  pellet
Messages: 12
Registered: October 1994
Junior Member
I'm facing a rather strange problem (bug?) when trying to write
images to file with the WRITE_SRF routine.

If I take a byte array Z, write it to a file and then read it back it is ok.
But if I do the same with a sub-part of that array Z1 then the read image
is incorrect. Both the WRITE_SRF and TIFF_WRITE routines show this behaviour.
I tried this on three different systems and only the IBM R6000 shows the
malfunction. Here's the code that shows it.
;1) Create an image. View, save, read and view again the image.
z=bytarr(256,256)
for i =0,255 do z(i,*)=i
tv, z
write_srf, 'z.img', z
read_srf, 'z.img', zz
window,2
tv, zz
;The 2 images should and are identical.

;2) Take a subframe of that array and do the same operations.
z1 = z(21:200,20:200)
wset, 0
erase
tv, z1
write_srf, 'z1.img', z1
read_srf, 'z1.img', zz1
wset, 2
erase
tv, zz1
result = where(z1 NE zz1, count) & help, count, result

At this point I see 2 different images, and the output of the last
command should be:
COUNT LONG = 0
RESULT LONG = -1

but I get:
COUNT LONG = 3908
RESULT LONG = Array(3908)

So, if anyone has any ideas/suggestions they are very wellcomed (sp?).
Jeff
pellet@inrs-ener.uquebec.ca
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: emacs and IDL
Next Topic: IDL contouring question

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

Current Time: Thu Oct 09 06:40:43 PDT 2025

Total time taken to generate the page: 1.19885 seconds