Skip to content
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

mosiac_nrrd: mosaic tile nrrds incorrectly referenced in OM #2

Closed
cpoczatek opened this issue May 31, 2016 · 1 comment
Closed

mosiac_nrrd: mosaic tile nrrds incorrectly referenced in OM #2

cpoczatek opened this issue May 31, 2016 · 1 comment
Labels

Comments

@cpoczatek
Copy link
Member

On mosaic nrrd files OpenMIMS reads references in the header for file names and stage coordinates of the individual tiles, and maps the pixel position of the mouse on an image to the correct file. This appears to be broken. It looks like this is happening because the stage position and raster fields are written incorrectly to the mosaic nrrd file.

To reproduce, in a terminal run:

wget https://github.com/BWHCNI/workflow/raw/master/mosaic_nrrd/test_data/090708-2-1_{11,12,13,14}-4x10.nrrd
mosaic_nrrd -t fluid -o test.nrrd 090708-2-1_1*.nrrd
unu head test.nrrd | grep tile

Mims_tile_positions:=090708-2-1_11-4x10.nrrd,-842,-12937;090708-2-1_12-4x10.nrrd,-842,-12857;090708-2-1_13-4x10.nrrd,-762,-12857;090708-2-1_14-4x10.nrrd,-762,-12937

Here we can see that the tile positions (which is the center of each image) are on an 80x80 micron grid. But if we compare the nrrd header of the new file to the existing example in the repo, there are 2 fields that are different.

wget https://github.com/BWHCNI/workflow/raw/master/mosaic_nrrd/test_data/mosaic_fluid.nrrd
diff -y --suppress-common-lines <(unu head test.nrrd) <(unu head mosaic_fluid.nrrd)

Mims_position:=-842,-12937                    | Mims_position:=-802,-12897
Mims_raster:=79939                        | Mims_raster:=160,160

At some point we changed the script to record a 2D raster size and shift the stage position to the center of the mosaic. This is a regression, and I'm not sure when it happened. Maybe the change was lost in the svn->git migration because it wasn't committed? I need to search for other versions on the file server.

@cpoczatek
Copy link
Member Author

Should be fixed. Added quick test script. Noticed additional bugs with grid mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant