This is a pipeline for zebra fish brain image registration.
This easy-to-use pipeline which can process fish one by one, around 30 minutes for each fish.
- CSV files of ROI coordinates.
- Atlas downloaded from mapzebrain.
- 9 Planes tiffile for each fish (or any number of planes you want ).
- One zstack tiffile for each fish.
- Jupyter notebook.
- Fuji (imageJ).
- Motion correction.
- Confirm the direction of atlas and your zstack being consistent.
- Copy and save each zstack as nrrd format.
import matplotlib.pyplot as plt
import os
import numpy as np
import cv2
import tifffile
import glob
import bg_space as bg
import pandas as pd
import time
In this folder, there are all your inputs of one fish, like zstack and planes.
main_dir = "/media/semmelhacklab/David_Behavior_Experiment/testfish/2023-07-06_F1_lowintensity_test"
Change fish number here.
img2 = tifffile.imread(main_dir+'/F1_zscan.tif')
Change your atlas path here.
reference_path = "/media/semmelhacklab/David_Behavior_Experiment/testfish/HSA.nrrd"
Also, the fish name.
with open(sh_reg3d_path,'w') as f:
s = 'reference='+reference_path+'\n'+\
'directory_3d='+directory_3d+'\n'+\
'moving_file=${directory_3d}/F1_zscan.nrrd\n'+\
3D: Open warped zstack and atlas in ImageJ, merge them with different colors and check if they match well.
-You can use this code for changing titles.