-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to register multiple .ome.tif at the same time & issue registering .ome.tif #12
Comments
Hi @Boehmin thanks for the kind words :) Palom might be able to read h5 files depending on the h5 file structure. If you have a small dataset to share I'll find time to take a look. For the .ome.tif dataset that gave you the error, it looks to me that the file might have some issues. Would you be able to share that? To register multiple files, our recommended approach is to register everything (cycles 2, 3, 4, and so on) to the first cycle. Please checkout the example script and lmk for any questions. |
Hi @Yu-AnChen Thanks for pointing me to the example script. I'll try this! I have a smaller fused example h5 file (only one timepoint) and the ome tif dataset here. The .h5 consists of z-stacks so I do not know if that would be an issue for palom? If not that would be even better. Channel 4 is DAPI and channel 3 is a fiducial channel so in theory I could register over the fiducial channel as well if that helps? Again, thanks for looking into this. |
Thanks for sharing the images, I was able to reproduce the error when using your ome-tiff files as input. Will look into a solution there. On the h5 dataset (seems to be generated with BigDataViewer), I was able to convert it into a pyramidal ome-tiff using palom. Note that installing Since there are Z-stacks, I did a maximum intensity projection on the Z-axis in the following script (the output file size is ~50 MB; it can be opened in QuPath) import palom
import h5py
import dask.array as da
import pathlib
img_path = pathlib.Path('h5_small/small_fuse_fused.h5')
h5_img = h5py.File(img_path)
# X-Y pixel size at full resolution; unit is µm/pixel
PIXEL_SIZE = 1
CHANNEL_NAMES = ['marker-1', 'marker-2', 'marker-fiducial', 'DNA']
mosaics = [
# max projection on the Z axis
da.from_array(h5_img[f"t00000/{channel}/0/cells"]).max(axis=0)
for channel in h5_img['t00000']
]
palom.pyramid.write_pyramid(
mosaics=mosaics,
output_path=img_path.parent / f"{img_path.stem}-pyramid.ome.tif",
pixel_size=PIXEL_SIZE,
channel_names=CHANNEL_NAMES,
downscale_factor=2,
compression='zlib',
tile_size=1024,
save_RAM=True
) With the output ome-tiffs from the above script, I think you should be able to run palom without running into the |
As for the issue of |
Sorry to hijack this, is palom working on 2D files only or did you do a projection to speed it up ? |
@Yu-AnChen, I tried both solutions and they both worked! Thank you. |
The current image file reader and writer only works with images that have 2 or 3 dimensions. In our own application, it's |
Hi @Yu-AnChen !
I just tried palom on two cycles of FISH and the registration so far seems really really impressive (in particular since one of the cycles is half out of focus). First of all, thank you so much for making this tool available!
I was wondering how it would be possible to register multiple .ome.tif images simultaneously. Additionally, the registration worked fine with one of my datasets (converted from .h5 to .ome.tif which was a big pain already), however I have issues with a smaller .ome.tif dataset. I get the below error message:
Thanks ever so much for your help!
The text was updated successfully, but these errors were encountered: