import SimpleITK as sitk
from pydicom import dicomio
import lmdb
import numpy as np
# root = '/fileser51/DataRadiology/LABEL/PROJECT/Nodule/detect/DB/nodule/Gold/gold_688_new_20201013/raw_spacing'

# env_ct_info = lmdb.open(root, map_size=int(1e9))
# txn_ct_info = env_ct_info.begin()

# for key, value in txn_ct_info.cursor():
#     print(f'Key: {key}, Value: {value}')
 
# txn_ct_info.commit()
# env_ct_info.close()

# class Debug:
#     def __init__(self):
#         self.x = np.arange(3)
#         self.y = np.arange(3)
#         self.z = np.arange(3)
         
#     def grid(self):
#         X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
#         return X, Y, Z
    
# main = Debug()
# X, Y, Z = main.grid()

# print()
import numpy as np
rpns = np.array([[1,2,3,4,5,6],[1,2,3,4,5,6]])
left_point = np.array([rpns[:,2] - rpns[:,5] / 2,
              rpns[:,1] + rpns[:,4] / 2,
              rpns[:,0] + rpns[:,3] / 2])

print()
