Data I/O problem on IBM R6000 [message #3448] |
Mon, 23 January 1995 11:02 |
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
|
|
|