External Email - Use Caution
I have encountered the problem that chrisadamsonmcrihttps://secure-web.cisco.com/1xWGWxoOiHrVvr8AONbdJmSDQHTmtv9-28Mk5n8yl42uZZFuoMAQQUxVbuSJ_bnLpivR1APeZnYLRzLCQkUc6mCZX0cTHbqAbV0r9yh3kDijwznIOAGT_7arlILqKT_D2sEQ49W0KZEtX-qcNj7YuA5UUMh948jk1XxvZ-JXzlsxm3Q2EtF5TCtUzC1SWTwmztvvVKBpQx_3pb2AoiyQ3bTDNAGg_FZalY_oAVeeYHo69i4YFRU6c5QEXk7_nDG091L4HqLYatBu_KvBwfK05ZwN44U-JX9BiwAUwGrqcnUv2fHJrR-6eHjO3EBUvkxZt/https%3A%2F%2Fgithub.com%2Fchrisadamsonmcri describes in issue 898https://secure-web.cisco.com/1m61bxpBwgxqKDi9Ogsq79O03id3L1GGsM-889UgjAYymOGyG_wpC_8q7kzQFnhZ1oTggchjOJNUAlYSY42udbv0ezecLgcftfdaAcijtQUR1XTns1wUlvhEyo-3b99ocX32VHnJj3JczduO6MJdFQ02B3b50SRl_3jZDHmYz8_xA_0DZGjtUOjOHZ6n4B9GDrABBvQJmfK3r3ycg3TA4lYpwLrAkoSPR_nGOUNIn1cEYwXDCwEA7Rum2-H0TptR45ws3O9H_BEoHvM1s615JMegva0B8sREKTDkkiUl2P1SJXAfL98E0-dca8rB4daCL/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fissues%2F898. The last time I used mri_binarize was using FS v6, where it behaves like this:
mri_binarize --replace A B --replace B C
Label A would become B in the output. Label B would become C in the output.
here's an example:
--replace 11 15 # map "4th Ventricle" -> "4th-Ventricle"\ --replace 15 72 # map "5th Ventricle" -> "5th-Ventricle"\
i want to convert a seg where the LUT maps 11 as 4th ventricle and 15 as 5th ventricle. i want to convert these to the FS LUT (using the replacements shown, 15 and 72). But this results in 4th ventricle getting labeled as 5th ventricle! Four years ago i ran a script performing 230 replace functions to map Neuromorphometrics labels to FS, and it worked fine (evidenced by Dice testing and inspection). Today i ran the same script on the same data and get funky results on a half dozen or so structures that follow the example replacement scheme. My current workaround is to use mri_binarize from v6.
---------------------------------------------------------------------- The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to lfoster@radnet.com and destroy this message. Please be aware that e-mail communication can be intercepted in transmission or misdirected. Your use of e-mail to communicate protected health information to us indicates that you acknowledge and accept the possible risks associated with such communication. Please consider communicating any sensitive information by telephone, facsimile or regular U.S. mail. If you do not wish to have your information sent by e-mail, please contact the sender immediately.
Nick, what happens if you reverse the order (ie, do 15 72 first, then 11 15)?
On 11/28/2023 12:27 PM, Nick Schmansky wrote:
External Email - Use Caution
I have encountered the problem that chrisadamsonmcri https://secure-web.cisco.com/1xWGWxoOiHrVvr8AONbdJmSDQHTmtv9-28Mk5n8yl42uZZFuoMAQQUxVbuSJ_bnLpivR1APeZnYLRzLCQkUc6mCZX0cTHbqAbV0r9yh3kDijwznIOAGT_7arlILqKT_D2sEQ49W0KZEtX-qcNj7YuA5UUMh948jk1XxvZ-JXzlsxm3Q2EtF5TCtUzC1SWTwmztvvVKBpQx_3pb2AoiyQ3bTDNAGg_FZalY_oAVeeYHo69i4YFRU6c5QEXk7_nDG091L4HqLYatBu_KvBwfK05ZwN44U-JX9BiwAUwGrqcnUv2fHJrR-6eHjO3EBUvkxZt/https%3A%2F%2Fgithub.com%2Fchrisadamsonmcri describes in issue 898 https://secure-web.cisco.com/1m61bxpBwgxqKDi9Ogsq79O03id3L1GGsM-889UgjAYymOGyG_wpC_8q7kzQFnhZ1oTggchjOJNUAlYSY42udbv0ezecLgcftfdaAcijtQUR1XTns1wUlvhEyo-3b99ocX32VHnJj3JczduO6MJdFQ02B3b50SRl_3jZDHmYz8_xA_0DZGjtUOjOHZ6n4B9GDrABBvQJmfK3r3ycg3TA4lYpwLrAkoSPR_nGOUNIn1cEYwXDCwEA7Rum2-H0TptR45ws3O9H_BEoHvM1s615JMegva0B8sREKTDkkiUl2P1SJXAfL98E0-dca8rB4daCL/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fissues%2F898. The last time I used mri_binarize was using FS v6, where it behaves like this:
mri_binarize --replace A B --replace B C
Label A would become B in the output. Label B would become C in the output.
here's an example:
--replace 11 15 # map "4th Ventricle" -> "4th-Ventricle"\ --replace 15 72 # map "5th Ventricle" -> "5th-Ventricle"\
i want to convert a seg where the LUT maps 11 as 4th ventricle and 15 as 5th ventricle. i want to convert these to the FS LUT (using the replacements shown, 15 and 72). But this results in 4th ventricle getting labeled as 5th ventricle! Four years ago i ran a script performing 230 replace functions to map Neuromorphometrics labels to FS, and it worked fine (evidenced by Dice testing and inspection). Today i ran the same script on the same data and get funky results on a half dozen or so structures that follow the example replacement scheme. My current workaround is to use mri_binarize from v6.
The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to lfoster@radnet.com and destroy this message. Please be aware that e-mail communication can be intercepted in transmission or misdirected. Your use of e-mail to communicate protected health information to us indicates that you acknowledge and accept the possible risks associated with such communication. Please consider communicating any sensitive information by telephone, facsimile or regular U.S. mail. If you do not wish to have your information sent by e-mail, please contact the sender immediately.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
External Email - Use Caution
That could work in a simple case, but in a more complex case (10+ `--replace X Y` flags, for example) this would be more difficult to do. Also, then the ordering of the flags matter which adds more complication to constructing a command line call.
the workaround now would be to separate out into multiple `mri_binarize` commands if there are any overlap in labels, but the old behavior is preferable
On Wed, Nov 29, 2023 at 7:07 AM Douglas N. Greve dgreve@mgh.harvard.edu wrote:
Nick, what happens if you reverse the order (ie, do 15 72 first, then 11 15)?
On 11/28/2023 12:27 PM, Nick Schmansky wrote:
External Email - Use CautionI have encountered the problem that chrisadamsonmcri https://secure-web.cisco.com/1xWGWxoOiHrVvr8AONbdJmSDQHTmtv9-28Mk5n8yl42uZZFuoMAQQUxVbuSJ_bnLpivR1APeZnYLRzLCQkUc6mCZX0cTHbqAbV0r9yh3kDijwznIOAGT_7arlILqKT_D2sEQ49W0KZEtX-qcNj7YuA5UUMh948jk1XxvZ-JXzlsxm3Q2EtF5TCtUzC1SWTwmztvvVKBpQx_3pb2AoiyQ3bTDNAGg_FZalY_oAVeeYHo69i4YFRU6c5QEXk7_nDG091L4HqLYatBu_KvBwfK05ZwN44U-JX9BiwAUwGrqcnUv2fHJrR-6eHjO3EBUvkxZt/https%3A%2F%2Fgithub.com%2Fchrisadamsonmcri describes in issue 898 https://secure-web.cisco.com/1m61bxpBwgxqKDi9Ogsq79O03id3L1GGsM-889UgjAYymOGyG_wpC_8q7kzQFnhZ1oTggchjOJNUAlYSY42udbv0ezecLgcftfdaAcijtQUR1XTns1wUlvhEyo-3b99ocX32VHnJj3JczduO6MJdFQ02B3b50SRl_3jZDHmYz8_xA_0DZGjtUOjOHZ6n4B9GDrABBvQJmfK3r3ycg3TA4lYpwLrAkoSPR_nGOUNIn1cEYwXDCwEA7Rum2-H0TptR45ws3O9H_BEoHvM1s615JMegva0B8sREKTDkkiUl2P1SJXAfL98E0-dca8rB4daCL/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fissues%2F898. The last time I used mri_binarize was using FS v6, where it behaves like this:
mri_binarize --replace A B --replace B C
Label A would become B in the output. Label B would become C in the output.
here's an example:
--replace 11 15 # map "4th Ventricle" -> "4th-Ventricle"\ --replace 15 72 # map "5th Ventricle" -> "5th-Ventricle"\
i want to convert a seg where the LUT maps 11 as 4th ventricle and 15 as 5th ventricle. i want to convert these to the FS LUT (using the replacements shown, 15 and 72). But this results in 4th ventricle getting labeled as 5th ventricle! Four years ago i ran a script performing 230 replace functions to map Neuromorphometrics labels to FS, and it worked fine (evidenced by Dice testing and inspection). Today i ran the same script on the same data and get funky results on a half dozen or so structures that follow the example replacement scheme. My current workaround is to use mri_binarize from v6.
The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to lfoster@radnet.com and destroy this message. Please be aware that e-mail communication can be intercepted in transmission or misdirected. Your use of e-mail to communicate protected health information to us indicates that you acknowledge and accept the possible risks associated with such communication. Please consider communicating any sensitive information by telephone, facsimile or regular U.S. mail. If you do not wish to have your information sent by e-mail, please contact the sender immediately.
Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://secure-web.cisco.com/1u-RH7gY07MmE_QA9dy6BBreiB0jB7TuHdfiMMiqZnDSzXm... The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://secure-web.cisco.com/1BPWmhINfQlvcetJsImw_FmOu_qBkBysm7tJZwDgeonWCe_... < https://secure-web.cisco.com/1BPWmhINfQlvcetJsImw_FmOu_qBkBysm7tJZwDgeonWCe_... . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.
Hi,
‘mri_binarize –replace v1 v2’ performs transitive replacements if multiple ‘–replace’ args are specified. This has been the behavior since May 25, 2021 commit.
Now, new mri_binarize option '--no-transitive-replace' is introduced to turn off the transitive replacements. Let me know if this works for you. The changes should be available in Freesurfer dev version tomorrow.
Best,
Yujing
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of Lee Tirrell Sent: Tuesday, November 28, 2023 8:19 PM To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Reopen issue 898: mri_binarize --replace misbehavior
External Email - Use Caution That could work in a simple case, but in a more complex case (10+ `--replace X Y` flags, for example) this would be more difficult to do. Also, then the ordering of the flags matter which adds more complication to constructing a command line call.
the workaround now would be to separate out into multiple `mri_binarize` commands if there are any overlap in labels, but the old behavior is preferable
On Wed, Nov 29, 2023 at 7:07 AM Douglas N. Greve <dgreve@mgh.harvard.edumailto:dgreve@mgh.harvard.edu> wrote: Nick, what happens if you reverse the order (ie, do 15 72 first, then 11 15)? On 11/28/2023 12:27 PM, Nick Schmansky wrote:
External Email - Use Caution
I have encountered the problem that chrisadamsonmcrihttps://secure-web.cisco.com/1xWGWxoOiHrVvr8AONbdJmSDQHTmtv9-28Mk5n8yl42uZZFuoMAQQUxVbuSJ_bnLpivR1APeZnYLRzLCQkUc6mCZX0cTHbqAbV0r9yh3kDijwznIOAGT_7arlILqKT_D2sEQ49W0KZEtX-qcNj7YuA5UUMh948jk1XxvZ-JXzlsxm3Q2EtF5TCtUzC1SWTwmztvvVKBpQx_3pb2AoiyQ3bTDNAGg_FZalY_oAVeeYHo69i4YFRU6c5QEXk7_nDG091L4HqLYatBu_KvBwfK05ZwN44U-JX9BiwAUwGrqcnUv2fHJrR-6eHjO3EBUvkxZt/https%3A%2F%2Fgithub.com%2Fchrisadamsonmcri describes in issue 898https://secure-web.cisco.com/1m61bxpBwgxqKDi9Ogsq79O03id3L1GGsM-889UgjAYymOGyG_wpC_8q7kzQFnhZ1oTggchjOJNUAlYSY42udbv0ezecLgcftfdaAcijtQUR1XTns1wUlvhEyo-3b99ocX32VHnJj3JczduO6MJdFQ02B3b50SRl_3jZDHmYz8_xA_0DZGjtUOjOHZ6n4B9GDrABBvQJmfK3r3ycg3TA4lYpwLrAkoSPR_nGOUNIn1cEYwXDCwEA7Rum2-H0TptR45ws3O9H_BEoHvM1s615JMegva0B8sREKTDkkiUl2P1SJXAfL98E0-dca8rB4daCL/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fissues%2F898. The last time I used mri_binarize was using FS v6, where it behaves like this:
mri_binarize --replace A B --replace B C
Label A would become B in the output. Label B would become C in the output.
here's an example:
--replace 11 15 # map "4th Ventricle" -> "4th-Ventricle"\ --replace 15 72 # map "5th Ventricle" -> "5th-Ventricle"\
i want to convert a seg where the LUT maps 11 as 4th ventricle and 15 as 5th ventricle. i want to convert these to the FS LUT (using the replacements shown, 15 and 72). But this results in 4th ventricle getting labeled as 5th ventricle! Four years ago i ran a script performing 230 replace functions to map Neuromorphometrics labels to FS, and it worked fine (evidenced by Dice testing and inspection). Today i ran the same script on the same data and get funky results on a half dozen or so structures that follow the example replacement scheme. My current workaround is to use mri_binarize from v6.
________________________________ The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to lfoster@radnet.commailto:lfoster@radnet.com and destroy this message. Please be aware that e-mail communication can be intercepted in transmission or misdirected. Your use of e-mail to communicate protected health information to us indicates that you acknowledge and accept the possible risks associated with such communication. Please consider communicating any sensitive information by telephone, facsimile or regular U.S. mail. If you do not wish to have your information sent by e-mail, please contact the sender immediately.
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurferhttps://secure-web.cisco.com/1u-RH7gY07MmE_QA9dy6BBreiB0jB7TuHdfiMMiqZnDSzXmiMflK37DeE2P0jCUF5Qjk1pGj5wYz9FJBN-a8wi33cIX6VuKmIM1nbM4R27Wh98zLKoNRKk6bJ-X1mnOB8IlnI-cal3_ZlQWKodA1iqswtC7peSptTq6UUk6vGI3srU_gzgYq9cXBLfiGN00cR6m_g8lTnDZybrG__-ErIOvmZPXvCqqLAGkgFiBaXTGmDyl-jQgMrp4hQivV3A88RBbc0g2oaC518JEgvs7NVDhCJAQSPoHw8NtkvxQNDNBgASv8vdQtoFvYKDUPc5oTmvRakJIQa8q5qbGQu4FAAfA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurferhttps://secure-web.cisco.com/1u-RH7gY07MmE_QA9dy6BBreiB0jB7TuHdfiMMiqZnDSzXmiMflK37DeE2P0jCUF5Qjk1pGj5wYz9FJBN-a8wi33cIX6VuKmIM1nbM4R27Wh98zLKoNRKk6bJ-X1mnOB8IlnI-cal3_ZlQWKodA1iqswtC7peSptTq6UUk6vGI3srU_gzgYq9cXBLfiGN00cR6m_g8lTnDZybrG__-ErIOvmZPXvCqqLAGkgFiBaXTGmDyl-jQgMrp4hQivV3A88RBbc0g2oaC518JEgvs7NVDhCJAQSPoHw8NtkvxQNDNBgASv8vdQtoFvYKDUPc5oTmvRakJIQa8q5qbGQu4FAAfA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/compliancelinehttps://secure-web.cisco.com/1BPWmhINfQlvcetJsImw_FmOu_qBkBysm7tJZwDgeonWCe_sY8ICehpmGZo6dj86G_-jJvB5Xn9nyYWgmQ2WQ4v2kWvG32BFAYlwzMAnVsakPR7UqL58WuSf-WbRcNdOGFuSwe_R-DKVImHHxjTf2UDURZGroDU0APsSbrXuHqSoFCogltjFg8ehQrfflHItZuo3FoieRfl-hi8Vvypm2gMY8O0oi4bOSKssJKFZ8rSEYSQ3ZFMy3eq1DDO-AnHzIMG_B_krTVhBhL6610shbjYT1k4mU1PZZg68wfWm7kH0oldanSKzrvFdOaMv7xeRMS8vZQ7xLdZX1Q-aP0Vs4DQ/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline <MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/compliancelinehttps://secure-web.cisco.com/1BPWmhINfQlvcetJsImw_FmOu_qBkBysm7tJZwDgeonWCe_sY8ICehpmGZo6dj86G_-jJvB5Xn9nyYWgmQ2WQ4v2kWvG32BFAYlwzMAnVsakPR7UqL58WuSf-WbRcNdOGFuSwe_R-DKVImHHxjTf2UDURZGroDU0APsSbrXuHqSoFCogltjFg8ehQrfflHItZuo3FoieRfl-hi8Vvypm2gMY8O0oi4bOSKssJKFZ8rSEYSQ3ZFMy3eq1DDO-AnHzIMG_B_krTVhBhL6610shbjYT1k4mU1PZZg68wfWm7kH0oldanSKzrvFdOaMv7xeRMS8vZQ7xLdZX1Q-aP0Vs4DQ/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.
freesurfer@nmr.mgh.harvard.edu