Mouse-Imaging-Centre / pydpiper

Python code for flexible pipeline control
Other
25 stars 10 forks source link

Protocols for Neonates and/or recommended settings? #409

Open gdevenyi opened 5 years ago

gdevenyi commented 5 years ago

We have a collection of neonate scans (and soon to come embryos) collected at MiCe. We also have a neonate atlas for pydpiper, however, we don't have any protocols for neonates, are there any recommended protocols?

Thanks.

bcdarwin commented 5 years ago

Generally we use similar protocols for neonatal imaging; I found the following Pydpiper_ANTS_Embryo_SyN_0.2_Gauss_2_1.pl (with finer blurring, and, for some reason, fewer iterations (x10) in the second template-building stage??) but I've never really done embryo imaging:

"blur";-1,0.027;-1,0.027;-1,0.027 "gradient";False,True;False,True;False,True "similarity_metric";"CC,CC";"CC,CC";"CC,CC" "weight";"1,1";"1,1";"1,1" "radius_or_histo";"3,3";"3,3";"3,3" "transformation";"SyN[0.2]";"SyN[0.2]";"SyN[0.2]" "regularization";"Gauss[2,1]";"Gauss[2,1]";"Gauss[2,1]" "iterations";"100x100x100x0";"100x100x100x10";"100x100x100x100" "useMask";False;True;True


From: Gabriel A. Devenyi notifications@github.com Sent: November 14, 2018 1:57:37 PM To: Mouse-Imaging-Centre/pydpiper Cc: Subscribed Subject: [Mouse-Imaging-Centre/pydpiper] Protocols for Neonates and/or recommended settings? (#409)

We have a collection of neonate scans (and soon to come embryos) collected at MiCe. We also have a neonate atlas for pydpiper, however, we don't have any protocols for neonates, are there any recommended protocols?

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_pydpiper_issues_409&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=9qRmIpdehOnIU8Zh__eeOraIB_Kz1ysdPI2RNTBShE0&s=tqTr0n-mqg8fsBuDKRzDL03Q54CtY5ZP2yf1I7lBiYg&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKBNFDP7gSwrDlTaO6hcv-5FraoAsliqnks5uvGehgaJpZM4YeXyd&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=9qRmIpdehOnIU8Zh__eeOraIB_Kz1ysdPI2RNTBShE0&s=T5KyUwa9ujk4tgQQI21ncFG8cmz-OlBDZGcA7rugt4M&e=.


This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

gdevenyi commented 5 years ago

Trying to use this file results in this line spamming the terminal: https://github.com/Mouse-Imaging-Centre/pydpiper/blob/b62b1161fd13ba6ea1c8ca0a5493f857e86f454f/pydpiper/minc/ANTS.py#L283

bcdarwin commented 5 years ago

So this protocol file is meant for a hierarchical registration but is likely being used for a single-shot source-to-target registration -- my guess is you're using it for MAGeT? Unfortunately (line 285) it uses the coarsest instead of finest part of the protocol in this case. For MAGeT you could try something like:

"blur";-1,0.027 "gradient";False,True "similarity_metric";"CC,CC" "weight";"1,1" "radius_or_histo";"3,3" "transformation";"SyN[0.2]" "regularization";"Gauss[2,1]" "iterations";"100x100x100x100" "useMask";True

There's a chance it could be a code bug as well of course ...


From: Gabriel A. Devenyi notifications@github.com Sent: December 4, 2018 11:48:26 AM To: Mouse-Imaging-Centre/pydpiper Cc: Ben Darwin; Comment Subject: Re: [Mouse-Imaging-Centre/pydpiper] Protocols for Neonates and/or recommended settings? (#409)

Trying to use this file results in this line spamming the terminal: https://github.com/Mouse-Imaging-Centre/pydpiper/blob/b62b1161fd13ba6ea1c8ca0a5493f857e86f454f/pydpiper/minc/ANTS.py#L283https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_pydpiper_blob_b62b1161fd13ba6ea1c8ca0a5493f857e86f454f_pydpiper_minc_ANTS.py-23L283&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=kAxQ6-vaGLR_OfEMEuMzAk4kTTFJBTrkVqanzi7E82E&s=31kUJ5k1DmBhIOfzWbHvZcMAas4NRm67rjXO95xPF-0&e=

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_pydpiper_issues_409-23issuecomment-2D444170752&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=kAxQ6-vaGLR_OfEMEuMzAk4kTTFJBTrkVqanzi7E82E&s=f3bPv5-2mJaZl1fYoKtPVu_-w86ohWosJcw20KXvFwA&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKBNAaiHjo2aU2ahoQgzaWbRGOH-5FBgfks5u1qdagaJpZM4YeXyd&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=kAxQ6-vaGLR_OfEMEuMzAk4kTTFJBTrkVqanzi7E82E&s=KbqtXr2zMpuFIkq3IUibNDtzJdDV1iHDgm_XyXVTCn4&e=.


This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

bcdarwin commented 5 years ago

I've also found this minctracc protocol which should work for MBM or MAGeT:

$ cat MBM_nlin_embryo_protocol_w_stiffness_etc.csv

"blur";0.6;0.4;0.2;0.15;0.09;0.054 "step";0.3;0.3;0.2;0.15;0.09;0.054 "iterations";40;40;20;20;10;10 "simplex";3;3;3;3;3;3 "gradient";FALSE;FALSE;FALSE;TRUE;TRUE;FALSE "w_translations";0.4;0.4;0.4;0.4;0.4;0.4 "optimization";"-use_simplex";"-use_simplex";"-use_simplex";"-use_simplex";"-use_simplex";"-use_simplex" "stiffness";0.5;0.5;0.5;0.5;0.5;0.5 "weight";0.3;0.3;0.3;0.3;0.3;0.3 "similarity";0.5;0.5;0.5;0.5;0.5;0.5


From: Ben Darwin Sent: December 4, 2018 12:07:56 PM To: Mouse-Imaging-Centre/pydpiper; Mouse-Imaging-Centre/pydpiper Cc: Comment Subject: Re: [Mouse-Imaging-Centre/pydpiper] Protocols for Neonates and/or recommended settings? (#409)

So this protocol file is meant for a hierarchical registration but is likely being used for a single-shot source-to-target registration -- my guess is you're using it for MAGeT? Unfortunately (line 285) it uses the coarsest instead of finest part of the protocol in this case. For MAGeT you could try something like:

"blur";-1,0.027 "gradient";False,True "similarity_metric";"CC,CC" "weight";"1,1" "radius_or_histo";"3,3" "transformation";"SyN[0.2]" "regularization";"Gauss[2,1]" "iterations";"100x100x100x100" "useMask";True

There's a chance it could be a code bug as well of course ...


From: Gabriel A. Devenyi notifications@github.com Sent: December 4, 2018 11:48:26 AM To: Mouse-Imaging-Centre/pydpiper Cc: Ben Darwin; Comment Subject: Re: [Mouse-Imaging-Centre/pydpiper] Protocols for Neonates and/or recommended settings? (#409)

Trying to use this file results in this line spamming the terminal: https://github.com/Mouse-Imaging-Centre/pydpiper/blob/b62b1161fd13ba6ea1c8ca0a5493f857e86f454f/pydpiper/minc/ANTS.py#L283https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_pydpiper_blob_b62b1161fd13ba6ea1c8ca0a5493f857e86f454f_pydpiper_minc_ANTS.py-23L283&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=kAxQ6-vaGLR_OfEMEuMzAk4kTTFJBTrkVqanzi7E82E&s=31kUJ5k1DmBhIOfzWbHvZcMAas4NRm67rjXO95xPF-0&e=

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_pydpiper_issues_409-23issuecomment-2D444170752&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=kAxQ6-vaGLR_OfEMEuMzAk4kTTFJBTrkVqanzi7E82E&s=f3bPv5-2mJaZl1fYoKtPVu_-w86ohWosJcw20KXvFwA&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKBNAaiHjo2aU2ahoQgzaWbRGOH-5FBgfks5u1qdagaJpZM4YeXyd&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=kAxQ6-vaGLR_OfEMEuMzAk4kTTFJBTrkVqanzi7E82E&s=KbqtXr2zMpuFIkq3IUibNDtzJdDV1iHDgm_XyXVTCn4&e=.


This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

gdevenyi commented 5 years ago

Thanks, I think I get that, will try those out.

Are there docs anywhere on the possible configs of these?

bcdarwin commented 5 years ago

Not yet, sorry. The fields accepted are basically https://github.com/Mouse-Imaging-Centre/pydpiper/blob/b62b1161fd13ba6ea1c8ca0a5493f857e86f454f/pydpiper/minc/ANTS.py#L283 for ANTS or https://github.com/Mouse-Imaging-Centre/pydpiper/blob/b62b1161fd13ba6ea1c8ca0a5493f857e86f454f/pydpiper/minc/registration.py#L1303 for minctracc. In the future what I'd like to do is automatically derive both parser and documentation from the datatype specification, a bit similar to what ArgParse does but more like Dhall (http://www.haskellforall.com/2016/12/dhall-non-turing-complete-configuration.html).


From: Gabriel A. Devenyi notifications@github.com Sent: December 4, 2018 12:23:41 PM To: Mouse-Imaging-Centre/pydpiper Cc: Ben Darwin; Comment Subject: Re: [Mouse-Imaging-Centre/pydpiper] Protocols for Neonates and/or recommended settings? (#409)

Thanks, I think I get that, will try those out.

Are there docs anywhere on the possible configs of these?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_pydpiper_issues_409-23issuecomment-2D444183558&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=m-mUiKmhHItBO85op2fRdulPRphe-2F-oJqiPraKaAY&s=gFAYrti_Mc3WTj2K7xXZRFJIAaO7JlgqDOLayjLJOtM&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKBNJfbHYsn5-2DIkSKd7xcaFpwsyFTzBks5u1q-2DdgaJpZM4YeXyd&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=WbPKw40NU3g_RTKn7pWL3cSAdk6QRKr3kMreWPZzNcg&m=m-mUiKmhHItBO85op2fRdulPRphe-2F-oJqiPraKaAY&s=q5axrLSrHy9cLMvqapGtO1_3q86jHsUbaD0ojJb9u48&e=.


This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

dorkylever commented 5 years ago

Hi Gabriel and Ben,

Were these files microCT images??

If so, did the --minctracc=MBM_nlin_embryo_protocol_w_stiffness_etc.csv protocol work and what was the resolution of your scans?

Kind Regards, Kyle Drover

gdevenyi commented 5 years ago

These are MRIs.