You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
732 B

  1. from nd2reader import Nd2
  2. from pprint import pprint
  3. import numpy as np
  4. from skimage import io
  5. # n = Nd2("/home/jim/Desktop/nd2hacking/test-141111.nd2")
  6. n = Nd2("/home/jim/Desktop/nd2hacking/YFP-dsRed-GFP-BF.nd2")
  7. # print("Height: ", n.height)
  8. # print("Width: ", n.width)
  9. # for fov in n.fields_of_view:
  10. # print(fov.number, fov.x, fov.y, fov.z, fov.pfs_offset)
  11. #
  12. print(n.timepoint_count)
  13. print(n.fov_count)
  14. print(n.channel_count)
  15. for fov in n.fields_of_view:
  16. print(fov.number, fov.x, fov.y, fov.z)
  17. # pprint(len(n.metadata['ImageMetadata']['SLxExperiment']['uLoopPars']['pPeriod']['']))
  18. # res = n.get_image(6)
  19. # print(res[0])
  20. # arr = np.reshape(res[1], (n.height, n.width))
  21. # io.imshow(arr)
  22. # io.show()
  23. # pprint(n.metadata)