NHPatterson / napari-wsireg

Whole slide image registration through wsireg in napari.
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

Napari crash after registration #8

Open Nal44 opened 1 year ago

Nal44 commented 1 year ago

Hi,

I really like your plugin !, very well done and easy to use.

I have an issue when the registration is done, Napari crashes and close, BUT the files are created as expected. I would like to see the result in Napari instead of if crashing if possible .

here is a copy of the log :

Creating the TransformParameterFile took 0.04s

Registration result checksum: 2866311831

Final metric value = -0.717203 Settings of AdaptiveStochasticGradientDescent for all resolutions: ( SP_a 316255.125498 240615.959508 172312.626063 139433.121143 69180.222893 13244.827490 4095.628960 1984.522654 501.394536 50.784041 ) ( SP_A 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 ) ( SP_alpha 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 ) ( SigmoidMax 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 ) ( SigmoidMin -0.018188 -0.032507 -0.027833 -0.048982 -0.175360 -0.765764 -0.855837 -0.932123 -0.953645 -0.953852 ) ( SigmoidScale 0.000000 0.000000 0.000000 0.000000 0.000000 0.000001 0.000002 0.000003 0.000008 0.000033 )

Time spent on saving the results, applying the final transform etc.: 60 ms. using default compression saving to Y:\REGISTRATION DAPI\registration skin brain 5um dapi\register\brain\test2\testsimilaritaffine-b1_to_b2_registered.ome.tiff transforming : 0 transformed : 0 saving writing channel 0 - shape: (19365, 20145) pyramid index 1 : channel 0 shape: (9682, 10072) pyramid index 2 : channel 0 shape: (4841, 5036) pyramid index 3 : channel 0 shape: (2420, 2518) pyramid index 4 : channel 0 shape: (1210, 1259) pyramid index 5 : channel 0 shape: (605, 629) using default compression saving to Y:\REGISTRATION DAPI\registration skin brain 5um dapi\register\brain\test2\testsimilaritaffine-b3_to_b2_registered.ome.tiff transforming : 0 transformed : 0 saving writing channel 0 - shape: (19365, 20145) pyramid index 1 : channel 0 shape: (9682, 10072) pyramid index 2 : channel 0 shape: (4841, 5036) pyramid index 3 : channel 0 shape: (2420, 2518) pyramid index 4 : channel 0 shape: (1210, 1259) pyramid index 5 : channel 0 shape: (605, 629) C:\python39\site-packages\ome_types_convenience.py:106: FutureWarning: The default XML parser will be changing from 'xmlschema' to 'lxml' in version 0.4.0. To silence this warning, please provide the parser argument, specifying either 'lxml' (to opt into the new behavior), or'xmlschema' (to retain the old behavior).! C:\Python39\site-packages\ome_types_convenience.py:106: FutureWarning: The default XML parser will be changing from 'xmlschema' to 'lxml' in version 0.4.0. To silence this warning, please provide the parser argument, specifying either 'lxml' (to opt into the new behavior), or'xmlschema' (to retain the old behavior).!

and crash !

Not sure where the issue is coming from but if you have an idea that will be great ! thanks,

NHPatterson commented 1 year ago

That's strange, what you are showing indicates the data was registered and the images written, so it must be on the reload... Can you double check the output folder and verify new OME-TIFFs are generated?

Nal44 commented 1 year ago

thank for the response , yes the files are generated, I can open them in FIJI without any problem. Not sure where the problem comes from, memory issue perhaps ?

Also, with your plugin is there any way to affine manually the registration ?, it works well but not accurate I have a large shift in the final registration which need to be corrected manually somehow.

Or any suggestion to perform the registration ? I can share my images as well , perhaps that will make it easier to visualize the issue ?

Thanks

NHPatterson commented 1 year ago

Hi @Nal44 There are some ways to use wsireg to prepare images so you shouldnt need an initial affine transform. If you share your images, and relevant info like spatial resolution of the images, I can make a quick demo to explain. It may be easier than me trying to type it all out here.

Nal44 commented 1 year ago

Sure thanks a lot :) , I really appreciate your help, I can share the file via my institution dropbox, can you send me your email ?

Rational of the project :

The images are consecutives sections tile scans , all taken at 20x using DAPI. The idea is to register image 1 to image 2, and image 3 to image 2, and combine all 3. I want to know the overlap of the sections (5um section) and estimate the % of overlap.

Depending on the results I want to perform serial sections staining then register to have data per nucleus ( hence I need accurate alignment).

Hence the registration is a crucial step to measure if the strategy is worth pursuing or find something else.

thanks a lot,

NHPatterson commented 1 year ago

You can send a Dropbox link to @.***

On Sat, Apr 22, 2023, 12:03 PM Nal44 @.***> wrote:

Sure thanks a lot :) , I really appreciate your help, I can share the file via my institution dropbox, can you send me your email ?

Rational of the project :

The images are consecutives sections tile scans , all taken at 20x using DAPI. The idea is to register image 1 to image 2, and image 3 to image 2, and combine all 3. I want to know the overlap of the sections (5um section) and estimate the % of overlap.

Depending on the results I want to perform serial sections staining then register to have data per nucleus ( hence I need accurate alignment).

Hence the registration is a crucial step to measure if the strategy is worth pursuing or find something else.

thanks a lot,

— Reply to this email directly, view it on GitHub https://github.com/NHPatterson/napari-wsireg/issues/8#issuecomment-1518706201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIHKFGM6BGRVE7FDQCTKS3XCQFODANCNFSM6AAAAAAW2TOIHY . You are receiving this because you commented.Message ID: @.***>

Nal44 commented 1 year ago

I sent you a share file invite on your vanderbilt email address.

Please dont hesitate to ask if you have any questions, Really appreciate your help , Thanks a lot,

NHPatterson commented 1 year ago

Hello again, I did not receive any invitation.

Nal44 commented 1 year ago

Hello, ok , just resend on your vanderbilt and gmail addresses. Let me know if it works, please. Thanks

NHPatterson commented 1 year ago

Worked this time, thanks.

Heath

On Mon, Apr 24, 2023 at 1:12 PM Nal44 @.***> wrote:

Hello, ok , just resend on your vanderbilt and gmail addresses. Let me know if it works, please. Thanks

— Reply to this email directly, view it on GitHub https://github.com/NHPatterson/napari-wsireg/issues/8#issuecomment-1520617014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIHKFDLP4ZRRKNGR4B43GTXC267NANCNFSM6AAAAAAW2TOIHY . You are receiving this because you commented.Message ID: @.***>

Nal44 commented 1 year ago

Hi , any luck with my images ? thanks

Nal44 commented 1 year ago

hi, Any updates ? mainly I want to know the type of registration i need to apply (rigid, similarity ,affine, combo ?) . That would be really helpful. thanks

NHPatterson commented 1 year ago

Hi @Nal44 I did download your data and it worked ok for me. I will get back to you later this week, early next week. Apologies for the delay.

I think for your case, a rigid -> nl would be good or rigid -> affine -> nl

nl is non-linear, or non-rigid type registration.

Nal44 commented 1 year ago

Hi, Ok thanks a lot, no problem for the delay, we are all super busy... thanks for taking the time,

One more question : how to deal with TIFF with multiple channels ? like Dapi + staining x +staining y ... ? Does it work the same ?

We could also do zoom call if this is easier to discuss, thanks, antho