MarkZaidi/QuASI

Running the Calculate-Transforms.groovy code

Closed this issue · 2 comments

Hi Mark

Can you please share the tiff images which you had used as an example ?
If you can give me your examples I can replicate your results.

I tried to use your code to run on some jpeg example images but could not successfully complete it.
First I took one image *.jpeg --> _reference.jpeg
and then in Fiji I rotated the image twice to create two examples and renamed it as _PANEL1.jpeg, _PANEL2.jpeg
and made the following change in the code:
String wsiExt = ".jpeg" //image name extension

The script ran successfully and is saying Done!
However, where can I find out the output aligned images ?
In the folder AFFINE I see that two images with *.jpeg extension has been created but none of the softwares can read the image.

Perhaps the error is here ?

new File(path).withObjectOutputStream {
                it.writeObject(matrix)

Can you please let me know how to solve it ?

Thanks
Devraj

You can follow the example tutorial that I've recorded here: https://www.youtube.com/watch?v=2XKdWE1Xweg
Unfortunately, I can't share the images used in this, as they don't belong to me. However, you should be able to substitute those images for your own, providing that you can load them into QuPath.

The alignment works in 2 parts, and consequently, 2 groovy scripts. Calculate-Transforms.groovy will attempt to automatically calculate the transformation matrix, and write it out as a 3x3 matrix in the Affine folder. These are not images, rather the information needed to align 2 images together. Based on what you're saying, it sounds like you generated the transformation matrix, but you haven't actually applied it to an image.

Running apply-transforms.groovy will apply the transform generate by calculate-transforms.groovy (or Alignment - StoreMatrix automatic.groovy if you wanted to do it manually), and can write out the aligned images as a multichannel ome.tiff

Best regards,

Mark

Updated QuASI with a video tutorial