Closed npucino closed 3 years ago
That is odd. Can you tell me the min and max data values for the image cube?
Actually, it would be helpful to know the data limits for the top of the cube, as well as the entire cube. So something like this:
x = img.read_bands((1, 12, 2))
print(np.min(x), np.max(x))
x = img.load()
print(np.min(x), np.max(x))
Thanks for the prompt reply.
Here is the result:
0.0 1.017753
0.0 1.1102917
SOLVED.
Sorry it was a banal problem. My image data boundaries were all zeroes. In other words, the image was not cropped to valid data only. By reading only a subset of the cube where the boudaries are all valid, with:
img_sub=img.read_subregion((200,650),(2400,2850))
when running:
view_cube(img_sub, bands=[1, 12, 2])
displayed the z dimension correctly.
Thanks for this package! Nick
When I run
view_cube(img, bands=[1, 12, 2])
, the returned interactive cube correctly display the top image but misses all the other bands, displaying all white in the z dimension.`Data Source: 'C:\test_hsi\multi_1_rd_rf_or'
Rows: 860