{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":84969,"databundleVersionId":10033515,"sourceType":"competition"}],"dockerImageVersionId":30786,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# CZII zarr image View","metadata":{}},{"cell_type":"markdown","source":"https://www.kaggle.com/code/stpeteishii/czii-zarr-image-view\n\nhttps://www.kaggle.com/code/stpeteishii/czii-data-3d-view","metadata":{}},{"cell_type":"code","source":"!pip install zarr","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-09T03:43:25.846249Z","iopub.execute_input":"2024-11-09T03:43:25.846705Z","iopub.status.idle":"2024-11-09T03:43:37.256024Z","shell.execute_reply.started":"2024-11-09T03:43:25.846666Z","shell.execute_reply":"2024-11-09T03:43:37.254610Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport zarr\nfrom PIL import Image","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-09T03:43:37.258439Z","iopub.execute_input":"2024-11-09T03:43:37.258848Z","iopub.status.idle":"2024-11-09T03:43:37.264746Z","shell.execute_reply.started":"2024-11-09T03:43:37.258803Z","shell.execute_reply":"2024-11-09T03:43:37.263526Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"dir0='/kaggle/input/czii-cryo-et-object-identification/train/static/ExperimentRuns/TS_5_4/VoxelSpacing10.000'","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-09T03:43:37.265826Z","iopub.execute_input":"2024-11-09T03:43:37.266152Z","iopub.status.idle":"2024-11-09T03:43:37.277673Z","shell.execute_reply.started":"2024-11-09T03:43:37.266117Z","shell.execute_reply":"2024-11-09T03:43:37.276452Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"files=os.listdir(dir0)\nZARR=[]\nfor file in files:\n    ZARR+=[os.path.join(dir0,file)]\nprint(ZARR)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-09T03:43:37.279009Z","iopub.execute_input":"2024-11-09T03:43:37.279343Z","iopub.status.idle":"2024-11-09T03:43:37.293701Z","shell.execute_reply.started":"2024-11-09T03:43:37.279309Z","shell.execute_reply":"2024-11-09T03:43:37.292534Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"for j,diri in enumerate(ZARR):\n\n    print(ZARR[j].split('/')[-1]) \n    data = zarr.open(diri, mode='r') \n    fig = plt.figure(figsize=(12,12))\n\n    for i in range(25):\n        ax = plt.subplot(5, 5, i + 1)\n        plt.axis('off')\n        plt.imshow(data[2][i])\n      \n    plt.show()\n \n    print('------------------------------'*2)\n    print()\n    print()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-09T03:44:05.816467Z","iopub.execute_input":"2024-11-09T03:44:05.817382Z","iopub.status.idle":"2024-11-09T03:44:14.318687Z","shell.execute_reply.started":"2024-11-09T03:44:05.817313Z","shell.execute_reply":"2024-11-09T03:44:14.317556Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}