From gabriel.devenyi at mcgill.ca Mon Jan 22 21:27:55 2018 From: gabriel.devenyi at mcgill.ca (Gabriel A. Devenyi) Date: Mon, 22 Jan 2018 21:27:55 -0500 Subject: [MINC-development] [RFC] [WIP] minc-diff-labels, diff and patch tools for minc label files Message-ID: Hi minc-users, Inspired by a discussion I had with Dr. Mallar Chakravary and Dr. Jason Lerch about tracking changes of label files, I recently attempted to produce a data format and tools to compute differences between label files, and store and apply differences, akin to the diff and patch tools for source code. I've produced a proof of concept implementation of the diff and patch tools at https://github.com/gdevenyi/minc-diff-labels Its probably fragile in a number of places, particularly, renumbering of labels. Right now it assumes the label files are dimensionally is the same. My initial applications are - tracking changes to manual label sets (maybe via special git diff hooks? a la git-latexdiff, https://gitlab.com/git-latexdiff/git-latexdiff) - Comparing segmentations from different tools/parameters for a segmentation pipeline I'd like to hear about your possible applications of something like this. Comments and questions also welcome. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.janke at gmail.com Tue Jan 23 08:57:02 2018 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 23 Jan 2018 23:57:02 +1000 Subject: [MINC-development] [RFC] [WIP] minc-diff-labels, diff and patch tools for minc label files In-Reply-To: References: Message-ID: Looks reasonable. It's sort of for the same purpose (but different), but have you seen this thing? https://github.com/BIC-MNI/classify/blob/master/voldiff.c At times it looks like there is a war going on in the code but it can apparently compare labels and produce comparison stats. I recall using it once or twice. a On 23 January 2018 at 12:27, Gabriel A. Devenyi wrote: > Hi minc-users, > > Inspired by a discussion I had with Dr. Mallar Chakravary and Dr. Jason > Lerch about tracking changes of label files, I recently attempted to produce > a data format and tools to compute differences between label files, and > store and apply differences, akin to the diff and patch tools for source > code. > > I've produced a proof of concept implementation of the diff and patch tools > at https://github.com/gdevenyi/minc-diff-labels > > Its probably fragile in a number of places, particularly, renumbering of > labels. Right now it assumes the label files are dimensionally is the same. > > My initial applications are > - tracking changes to manual label sets (maybe via special git diff hooks? a > la git-latexdiff, https://gitlab.com/git-latexdiff/git-latexdiff) > - Comparing segmentations from different tools/parameters for a segmentation > pipeline > > I'd like to hear about your possible applications of something like this. > Comments and questions also welcome. > > _______________________________________________ > MINC-development mailing list > MINC-development at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development > From gdevenyi at gmail.com Tue Jan 23 11:38:24 2018 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Tue, 23 Jan 2018 11:38:24 -0500 Subject: [MINC-development] [RFC] [WIP] minc-diff-labels, diff and patch tools for minc label files In-Reply-To: <4ec722c5c03d4144ac75819cfc73725a@YTOPR0101MB2284.CANPRD01.PROD.OUTLOOK.COM> References: <4ec722c5c03d4144ac75819cfc73725a@YTOPR0101MB2284.CANPRD01.PROD.OUTLOOK.COM> Message-ID: Thanks for the info Andrew. After a quick poke through it looks like this is to compute summary statistics rather than generate a map of differences between label volumes. I don't see an option to save an output file other than saving the screen output to a file. Very useful tool for doing those stats, but not for this application of diffing/patching label sets. P.S. code updated to address comments from Vlad. Now also doesn't store a volume per label in the patch if there's no changes. -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute Affiliate, Department of Psychiatry McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Tue, Jan 23, 2018 at 8:57 AM, Andrew Janke wrote: > Looks reasonable. > > It's sort of for the same purpose (but different), but have you seen this > thing? > > https://github.com/BIC-MNI/classify/blob/master/voldiff.c > > At times it looks like there is a war going on in the code but it can > apparently compare labels and produce comparison stats. I recall using > it once or twice. > > a > > > On 23 January 2018 at 12:27, Gabriel A. Devenyi > wrote: > > Hi minc-users, > > > > Inspired by a discussion I had with Dr. Mallar Chakravary and Dr. Jason > > Lerch about tracking changes of label files, I recently attempted to > produce > > a data format and tools to compute differences between label files, and > > store and apply differences, akin to the diff and patch tools for source > > code. > > > > I've produced a proof of concept implementation of the diff and patch > tools > > at https://github.com/gdevenyi/minc-diff-labels > > > > Its probably fragile in a number of places, particularly, renumbering of > > labels. Right now it assumes the label files are dimensionally is the > same. > > > > My initial applications are > > - tracking changes to manual label sets (maybe via special git diff > hooks? a > > la git-latexdiff, https://gitlab.com/git-latexdiff/git-latexdiff) > > - Comparing segmentations from different tools/parameters for a > segmentation > > pipeline > > > > I'd like to hear about your possible applications of something like this. > > Comments and questions also welcome. > > > > _______________________________________________ > > MINC-development mailing list > > MINC-development at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development > > > _______________________________________________ > MINC-development mailing list > MINC-development at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.janke at gmail.com Tue Jan 23 16:20:11 2018 From: a.janke at gmail.com (Andrew Janke) Date: Wed, 24 Jan 2018 07:20:11 +1000 Subject: [MINC-development] [RFC] [WIP] minc-diff-labels, diff and patch tools for minc label files In-Reply-To: References: <4ec722c5c03d4144ac75819cfc73725a@YTOPR0101MB2284.CANPRD01.PROD.OUTLOOK.COM> Message-ID: Yup, definitely a different purpose but as a user (who would use this tool on our mouse labels) I want more! Finding small diffs in label files is hard as you have to be in the right slice/plane. I tend to run something to find differences (like voldiff or minccmp. mincdiff is too coarse) in parallel to my own less pretty attempts at what you are doing. a On 24 January 2018 at 02:38, Gabriel A. Devenyi wrote: > Thanks for the info Andrew. > > After a quick poke through it looks like this is to compute summary > statistics rather than generate a map of differences between label volumes. > I don't see an option to save an output file other than saving the screen > output to a file. > > Very useful tool for doing those stats, but not for this application of > diffing/patching label sets. > > P.S. code updated to address comments from Vlad. Now also doesn't store a > volume per label in the patch if there's no changes. > > -- > Gabriel A. Devenyi B.Eng. Ph.D. > Research Computing Associate > Computational Brain Anatomy Laboratory > Cerebral Imaging Center > Douglas Mental Health University Institute > Affiliate, Department of Psychiatry > McGill University > t: 514.761.6131x4781 > e: gdevenyi at gmail.com > > On Tue, Jan 23, 2018 at 8:57 AM, Andrew Janke wrote: >> >> Looks reasonable. >> >> It's sort of for the same purpose (but different), but have you seen this >> thing? >> >> https://github.com/BIC-MNI/classify/blob/master/voldiff.c >> >> At times it looks like there is a war going on in the code but it can >> apparently compare labels and produce comparison stats. I recall using >> it once or twice. >> >> a >> >> >> On 23 January 2018 at 12:27, Gabriel A. Devenyi >> wrote: >> > Hi minc-users, >> > >> > Inspired by a discussion I had with Dr. Mallar Chakravary and Dr. Jason >> > Lerch about tracking changes of label files, I recently attempted to >> > produce >> > a data format and tools to compute differences between label files, and >> > store and apply differences, akin to the diff and patch tools for source >> > code. >> > >> > I've produced a proof of concept implementation of the diff and patch >> > tools >> > at https://github.com/gdevenyi/minc-diff-labels >> > >> > Its probably fragile in a number of places, particularly, renumbering of >> > labels. Right now it assumes the label files are dimensionally is the >> > same. >> > >> > My initial applications are >> > - tracking changes to manual label sets (maybe via special git diff >> > hooks? a >> > la git-latexdiff, https://gitlab.com/git-latexdiff/git-latexdiff) >> > - Comparing segmentations from different tools/parameters for a >> > segmentation >> > pipeline >> > >> > I'd like to hear about your possible applications of something like >> > this. >> > Comments and questions also welcome. >> > >> > _______________________________________________ >> > MINC-development mailing list >> > MINC-development at bic.mni.mcgill.ca >> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development >> > >> _______________________________________________ >> MINC-development mailing list >> MINC-development at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development > > > > _______________________________________________ > MINC-development mailing list > MINC-development at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development >