ee7dc09812df5dded34adcde4267d9c754e3b655,plantcv/plantcv/hyperspectral/read_data.py,,read_data,#,10
Before Change
def read_data(scandir, imgname):
raw = np.fromfile(os.path.join(scandir, imgname), np.float32, -1)
bil_rcb = raw.reshape(1704, 978, 1600).transpose((0, 2, 1))
return bil_rcb
After Change
header = open(headername)
// Loop through and create a dictonary from the header file
for i, string in enumerate(header):
if "=" in string:
header_data = header[i].split(" = ")
header_dict.update({header_data[0]: header_data[1].rstrip()})
bands = header_dict["bands"]
return raw_data, bands
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: danforthcenter/plantcv
Commit Name: ee7dc09812df5dded34adcde4267d9c754e3b655
Time: 2019-09-11
Author: haleyschuhl@gmail.com
File Name: plantcv/plantcv/hyperspectral/read_data.py
Class Name:
Method Name: read_data
Project Name: matthewwithanm/django-imagekit
Commit Name: 68b8d46a2fef57d6ebed1af2f2457ec4b0244ca4
Time: 2009-07-19
Author: justin@driscolldev.com
File Name: imagekit/processors.py
Class Name: Transpose
Method Name: process
Project Name: ncullen93/torchsample
Commit Name: f4ca9b361adb382423c753f7f864a5dd0e454964
Time: 2017-05-12
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: Transpose
Method Name: __call__