Changeset 3160


Ignore:
Timestamp:
Nov 23, 2017 11:46:20 AM (4 years ago)
Author:
vondreele
Message:

fix new PE importer; it was a 32bit float image not int.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_1TIF.py

    r3159 r3160  
    137137    IFD = {}
    138138    nSlice = 1
     139    if DEBUG: print('byteorder:',byteOrd)
    139140    for ied in range(NED):
    140141        Tag,Type = st.unpack(byteOrd+'Hh',File.read(4))
     
    347348        pixy = [150.,150.]
    348349        File.seek(8)
    349         image = np.array(np.frombuffer(File.read(Npix*4),dtype=np.uint32)//1024,dtype=np.int32)
     350        dt = np.dtype(np.float32)
     351        dt = dt.newbyteorder(byteOrd)
     352        image = np.array(np.frombuffer(File.read(Npix*4),dtype=dt),dtype=np.int32)
    350353#    elif sizexy == [960,960]:
    351354#        tiftype = 'PE-BE'
Note: See TracChangeset for help on using the changeset viewer.