From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From delphine.ribes at epfl.ch Fri Feb 5 09:37:32 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Fri, 5 Feb 2010 15:37:32 +0100 Subject: [MINC-users] Building N3 on cygwin Message-ID: Dear minc users, I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html So first I've installed the lastest version of cygwin: http://www.cygwin.com/ then during the installation process, I've installed gcc, perl and make http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html And the I've followed: http://www.ece.ubc.ca/~alberth/project.html but when I am trying to install minc-1.4, I've obtained to follwong error: conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... Thanks a lot for your help, Have a good day, Delphine From a.janke at gmail.com Mon Feb 8 09:32:56 2010 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 9 Feb 2010 01:32:56 +1100 Subject: [MINC-users] Building N3 on cygwin In-Reply-To: References: Message-ID: Hi Delphine, I was not aware of that page but then I haven't touched Cygwin in a while.. It looks to me like a simple compilation problem. If you are just after N3, then odds are you can skip over the error here with dcm2mnc (a data format converter) with 'make -k'. In the directory you type make (minc-1.4?) instead of typing: $ make type: $ make -k The compilation might just make it through. Failing that send another email and I will update my cygwin tar build and upload it. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 On Sat, Feb 6, 2010 at 01:37, Ribes Delphine wrote: > Dear minc users, > > I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html > > So first I've installed the lastest version of cygwin: > http://www.cygwin.com/ > > then during the installation process, I've installed gcc, perl and make > http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html > > And the I've followed: > > http://www.ece.ubc.ca/~alberth/project.html > > but when I am trying to install minc-1.4, I've obtained to follwong error: > conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. > > I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... > > Thanks a lot for your help, > Have a good day, > Delphine > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From delphine.ribes at epfl.ch Mon Feb 8 09:49:42 2010 From: delphine.ribes at epfl.ch (Ribes Delphine) Date: Mon, 8 Feb 2010 15:49:42 +0100 Subject: [MINC-users] Building N3 on cygwin In-Reply-To: References: Message-ID: Hi, Thanks a lot for your answer!! Finally this morning I've started everything from the beginning and everything went perfectly find. I don't know why it didn't work last week. Maybe too many try with wrong parameters. Now I am able to run n3 without any difficulties. The link http://www.ece.ubc.ca/~alberth/project.html explains very well how to deal with cygwin and N3. Thanks again, Delphine -----Original Message----- From: minc-users-bounces at bic.mni.mcgill.ca [mailto:minc-users-bounces at bic.mni.mcgill.ca] On Behalf Of Andrew Janke Sent: lundi, 8. f?vrier 2010 15:33 To: MINC users mailing list Subject: Re: [MINC-users] Building N3 on cygwin Hi Delphine, I was not aware of that page but then I haven't touched Cygwin in a while.. It looks to me like a simple compilation problem. If you are just after N3, then odds are you can skip over the error here with dcm2mnc (a data format converter) with 'make -k'. In the directory you type make (minc-1.4?) instead of typing: $ make type: $ make -k The compilation might just make it through. Failing that send another email and I will update my cygwin tar build and upload it. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 On Sat, Feb 6, 2010 at 01:37, Ribes Delphine wrote: > Dear minc users, > > I am trying to build N3 on cygwin. I've been following the instruction given by http://www.ece.ubc.ca/~alberth/project.html > > So first I've installed the lastest version of cygwin: > http://www.cygwin.com/ > > then during the installation process, I've installed gcc, perl and make > http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html > > And the I've followed: > > http://www.ece.ubc.ca/~alberth/project.html > > but when I am trying to install minc-1.4, I've obtained to follwong error: > conversion/dcm2monc/.deps/dcm2mnc.Po:1 *** mutiple taget patterns. Stop. > > I am not familiar with cygwin, so I don't know how to deal with this error and what does that mean... > > Thanks a lot for your help, > Have a good day, > Delphine > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > _______________________________________________ MINC-users at bic.mni.mcgill.ca http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users From pbellec at bic.mni.mcgill.ca Wed Feb 10 23:08:51 2010 From: pbellec at bic.mni.mcgill.ca (Pierre Bellec) Date: Wed, 10 Feb 2010 23:08:51 -0500 Subject: [MINC-users] bug in the mincmorph grouping option Message-ID: <6fe841c71002102008x1ba051a0hed04b9e91074bc80@mail.gmail.com> Hi everyone, I have recently been using mincmorph to perform various morphomat operations, and I am really happy with that tool which is quite powerful. However, I noticed a small bug. The first slice/column/line get set to zero with the argument '-successive G'. Maybe I am just using an old version of the program (I believe the latest version is not available for my system, which is hardy) and that bug has already been fixed. The '-version' tells me it is mincmorph 1.4. Regards, Pierre -- Pierre Bellec Post-doctoral fellow McConnel Brain Imaging Center, Webster 2B Montreal Neurological Institute 3801 University Street Montreal, Quebec, Canada H3A 2B4 http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec tel: (001)(514) 398 5220 fax: (001)(514) 398 8948 From a.janke at gmail.com Wed Feb 10 23:59:45 2010 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 11 Feb 2010 15:59:45 +1100 Subject: [MINC-users] bug in the mincmorph grouping option In-Reply-To: <6fe841c71002102008x1ba051a0hed04b9e91074bc80@mail.gmail.com> References: <6fe841c71002102008x1ba051a0hed04b9e91074bc80@mail.gmail.com> Message-ID: Hi Pierre, You are right, however I like to call this behaviour a "feature". :) This happens because of the shape of the structuring element, in order to gain a bit of speed and skip doing bounds checking while running through a 5 deep for loop, I only run the structuring element (for grouping/dilation/convolution) on the central chunk of the volume which guarantees me to not get edge problems. The simple fix is to first pad your volume before running the group. the Pad option pads by 1/2 the size of the current structuring element/kernel. So instead of doing this: mincmorph -successive 'G' in.mnc out.mnc do this: mincmorph -successive 'PG' in.mnc out.mnc Hope this helps, -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 On Thu, Feb 11, 2010 at 15:08, Pierre Bellec wrote: > Hi everyone, > > I have recently been using mincmorph to perform various morphomat > operations, and I am really happy with that tool which is quite powerful. > However, I noticed a small bug. The first slice/column/line get set to zero > with the argument '-successive G'. Maybe I am just using an old version of > the program (I believe the latest version is not available for my system, > which is hardy) and that bug has already been fixed. The '-version' tells me > it is mincmorph 1.4. > > Regards, > > Pierre > > -- > Pierre Bellec > Post-doctoral fellow > McConnel Brain Imaging Center, Webster 2B > Montreal Neurological Institute > 3801 University Street > Montreal, Quebec, Canada H3A 2B4 > http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec > tel: ? ? ? (001)(514) 398 5220 > fax: ? ? ?(001)(514) 398 8948 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From mishkind at gmail.com Tue Feb 16 06:19:07 2010 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Tue, 16 Feb 2010 06:19:07 -0500 Subject: [MINC-users] custom color lookup tables Message-ID: <9c5abb61002160319n148dc879pb08bff7ac58c3883@mail.gmail.com> Hi, I'd like to display a volume using a color lookup table other than the usual spectral,hotmetal etc that are offered in Display. In Display I found: Colour Coding (D) -> UserDefColCode (Q) but it only changes the color map to grey and doesn't prompt for a custom lookup table. Is there another way to use this 'feature'? Alternatively, I think I can use minclookup with the -lookup_table option, and despite the excellent information here: http://wiki.bic.mni.mcgill.ca/index.php/MinclookupManPage I still need some help creating the right lookup table. I found this in minclookup.c: static double spectral_lookup_values[] = { 0.00, 0.0000,0.0000,0.0000, 0.05, 0.4667,0.0000,0.5333, 0.10, 0.5333,0.0000,0.6000, 0.15, 0.0000,0.0000,0.6667, 0.20, 0.0000,0.0000,0.8667, 0.25, 0.0000,0.4667,0.8667, 0.30, 0.0000,0.6000,0.8667, 0.35, 0.0000,0.6667,0.6667, 0.40, 0.0000,0.6667,0.5333, 0.45, 0.0000,0.6000,0.0000, 0.50, 0.0000,0.7333,0.0000, 0.55, 0.0000,0.8667,0.0000, 0.60, 0.0000,1.0000,0.0000, 0.65, 0.7333,1.0000,0.0000, 0.70, 0.9333,0.9333,0.0000, 0.75, 1.0000,0.8000,0.0000, 0.80, 1.0000,0.6000,0.0000, 0.85, 1.0000,0.0000,0.0000, 0.90, 0.8667,0.0000,0.0000, 0.95, 0.8000,0.0000,0.0000, 1.00, 0.8000,0.8000,0.8000 }; I'm guessing the last three columns are RGB values. Is there an algorithm out there that will spit out the incremental RGB values between two (or more) colors? Does anyone have some custom lookup tables they've created and would be willing to share? Ideally, it would be nice to use the rgb color maps already defined and part of the brain-view package (on my machine are here: /usr/local/bic/share/brain-view). As always any help is much appreciated, mishkin From a.janke at gmail.com Tue Feb 16 06:33:40 2010 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 16 Feb 2010 22:33:40 +1100 Subject: [MINC-users] custom color lookup tables In-Reply-To: <9c5abb61002160319n148dc879pb08bff7ac58c3883@mail.gmail.com> References: <9c5abb61002160319n148dc879pb08bff7ac58c3883@mail.gmail.com> Message-ID: Hi Mishkin, > Colour Coding (D) -> UserDefColCode (Q) > but it only changes the color map to grey and doesn't prompt for a > custom lookup table. Is there another way to use this 'feature'? Nor sure about Display but... > Alternatively, I think I can use minclookup with the -lookup_table > option, and despite the excellent information here: > Does anyone have some custom lookup > tables they've created and would be willing to share? Yes: spencer:~$ cat lib/luts/bluered 0.000 0.8 0.8 1.0 0.125 0.4 0.8 1.0 0.250 0.0 0.4 1.0 0.375 0.0 0.0 0.5 0.500 0.0 0.0 0.0 0.625 0.5 0.0 0.0 0.750 1.0 0.4 0.0 0.825 1.0 0.8 0.4 1.000 1.0 0.8 0.8 That what you are after? The first column is the vector value (scaled between 0 and 1) and the last three are the RGB values. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From a.janke at gmail.com Tue Feb 16 06:36:54 2010 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 16 Feb 2010 22:36:54 +1100 Subject: [MINC-users] custom color lookup tables In-Reply-To: <9c5abb61002160319n148dc879pb08bff7ac58c3883@mail.gmail.com> References: <9c5abb61002160319n148dc879pb08bff7ac58c3883@mail.gmail.com> Message-ID: On Tue, Feb 16, 2010 at 22:19, Mishkin Derakhshan wrote: > Is there an > algorithm out there that will spit out the incremental RGB values > between two (or more) colors? On this point, there are a number of ways of doing this and it depends on the colorspace model IIRC, Still here is a nice example that has some javascript code (use page source) that seems to do what you want. http://meyerweb.com/eric/tools/color-blend/ -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From mishkind at gmail.com Tue Feb 16 06:48:14 2010 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Tue, 16 Feb 2010 06:48:14 -0500 Subject: [MINC-users] custom color lookup tables In-Reply-To: References: <9c5abb61002160319n148dc879pb08bff7ac58c3883@mail.gmail.com> Message-ID: <9c5abb61002160348l67b5134by8911e8905ce4d2d5@mail.gmail.com> Exactly the sort of thing I was after thank you. I have the feeling RGB for graphic designers is like binary for engineers ;) On Tue, Feb 16, 2010 at 6:36 AM, Andrew Janke wrote: > On Tue, Feb 16, 2010 at 22:19, Mishkin Derakhshan wrote: >> Is there an >> algorithm out there that will spit out the incremental RGB values >> between two (or more) colors? > > On this point, there are a number of ways of doing this and it depends > on the colorspace model IIRC, Still here is a nice example that has > some javascript code (use page source) that seems to do what you want. > > ? http://meyerweb.com/eric/tools/color-blend/ > > > -- > Andrew Janke > (a.janke at gmail.com || http://a.janke.googlepages.com/) > Canberra->Australia ? ?+61 (402) 700 883 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From anthonin at biospective.com Fri Feb 19 17:22:47 2010 From: anthonin at biospective.com (Anthonin Reilhac) Date: Fri, 19 Feb 2010 17:22:47 -0500 Subject: [MINC-users] minctracc error Message-ID: <44da421f1002191422jaa70281k7cf5382d359ba1@mail.gmail.com> Hello, I am currently experiencing issues with minctracc which crashes and outputs this error: *Error in /usr/local/bic/bin/minctracc in file init_params.c, line 593 Cannot calculate the COG or COV of volume 1.* infos: *a)* The two volumes I am trying to align are 2D sections (written as 3D volumes z->length = 1). *Source:* image dimensions: xspace yspace zspace dimension name length step start -------------- ------ ---- ----- xspace 6720 0.0016 1.9464 yspace 8544 0.0016 6.6568 zspace 1 0.1 0 *Target:* dimension name length step start -------------- ------ ---- ----- xspace 7520 0.0016 1.0248 yspace 8128 0.0016 7.3224 zspace 1 0.1 0 *b)* mincstats -com -world_only gives me correct COG values. *Source*: CoM_real(x,y,z): 7.42142568 13.35683104 0 *Target*: CoM_real(x,y,z): 8.261485204 10.00648279 0 *c)* if I downsample enough both volumes (0.02 mm) using autocrop, I can get minctracc working without crashing: *Source:* dimension name length step start -------------- ------ ---- ----- xspace 538 0.02 1.9464 yspace 684 0.02 6.6568 zspace 1 0.1 0 *Target:* dimension name length step start -------------- ------ ---- ----- xspace 646 0.02 1.0248 yspace 748 0.02 2.9704 zspace 1 0.1 0 minctracc gives: *Source*: COG of v1: 5.848002 12.464701 0.000000 *Target:* COG of v2: 11.014800 10.345677 0.000000 [trans] = 5.166798 -2.119023 0.000000 But the COG values are not correct. For comparison, *mincstats -com -world_only* on the downsampled volumes gives the following values which are not different from when computed in point b. *Source:* CoM_real(x,y,z): 7.42070981 13.35900666 0 *Target:* CoM_real(x,y,z): 8.259952437 10.00411748 0 *d)* If I donwsample further (0.1 mm)*, *the discrepancies between the COG values computed with mincstats & minctracc decrease slightly. * Source:* dimension name length step start -------------- ------ ---- ----- xspace 108 0.1 1.9464 yspace 137 0.1 6.6568 zspace 1 0.1 0 *Target: * dimension name length step start -------------- ------ ---- ----- xspace 130 0.1 1.0248 yspace 150 0.1 2.9704 zspace 1 0.1 0 *minctracc gives: Source:* COG of v1: 6.783619 12.909432 0.000000 *Target:* COG of v2: 10.974800 10.455488 0.000000 [trans] = 4.191181 -2.453944 0.000000 * mincstats still gives the "same" values as in b) and c):* *Source*: CoM_real(x,y,z): 7.426436221 13.35572188 0 *Target:* CoM_real(x,y,z): 8.267742651 9.998513526 0 Am I hitting at a limit of minctracc here? Any clue? Thanks in advance. Anthonin From a.janke at gmail.com Sat Feb 20 07:41:25 2010 From: a.janke at gmail.com (Andrew Janke) Date: Sat, 20 Feb 2010 23:41:25 +1100 Subject: [MINC-users] minctracc error In-Reply-To: <44da421f1002191422jaa70281k7cf5382d359ba1@mail.gmail.com> References: <44da421f1002191422jaa70281k7cf5382d359ba1@mail.gmail.com> Message-ID: Hi Anthonin, On Sat, Feb 20, 2010 at 09:22, Anthonin Reilhac wrote: > I am currently experiencing issues with minctracc which crashes and outputs > this error: > *Error in /usr/local/bic/bin/minctracc in file init_params.c, line 593 > Cannot calculate the COG or COV of volume 1.* minctracc really doesn't do all that well with non 3D data as only a small out of plane registration is needed to send things haywire. You can fiddle with the weights parameters but it still won't help you that much. My suggestions would be to make the problem "more 3D". The easiest way to do this is to turn each of your 2D slices into a thick 3D "cylinder" as such: (assuming 1mm voxels) # First fake 3D block: mincconcat -concat_dimension zspace slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc -step 1 -start 0 block.mnc # then add a few blank slices top and bottom and blur the edges volpad -distance 4 -smooth -smooth_distance 2 block.mnc padded.mnc Then run minctracc on your resulting padded volumes. I would set the out of plane rotations weights to 0: minctracc -w_rotations 0 0 0.0174533 ... Once you have recovered a transformation you can then apply this to the original volumes and hope all goes well. :) volpad can be found here: http://mavis.anu.edu.au/scripts/ -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From nikelski at bic.mni.mcgill.ca Sat Feb 20 12:36:14 2010 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Sat, 20 Feb 2010 09:36:14 -0800 Subject: [MINC-users] 6-parameter fitting with minctracc Message-ID: Hi all, I need some validation and/or suggestions (or both?). I have subject scans (T1) for which each subject was scanned multiple times (same scanner), at difference points in time. For each subject, some of the scans were acquired within the same scanning sessions, some were acquired within a 6-month window. I would like to combine the scans to give me the best SNR for Civet processing. I've tried specifying one of the scans as the "target" and then using "mritoself" to align all others to it; all aligned scans and the "target" would then be mincaverage'd. The results are OK, but not splendid, as Civet spits up during tissue classification on one of the averaged volumes, although the non-averaged scans go through without error. I'm using defaults for the mritoself call, plus "-nocrop". Does anyone have any experience in this. Ideas? Suggestions? Magical incantations? Thanks, -Jim -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University From jason at bic.mni.mcgill.ca Sat Feb 20 12:56:45 2010 From: jason at bic.mni.mcgill.ca (Jason Lerch) Date: Sat, 20 Feb 2010 12:56:45 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: In my limited experience you're much better off processing each of the scans independently and then either averaging the thickness maps at the end or, even better, using mixed effects models and all your data for the analysis. Alternately, if you really want to go the higher SNR route, I have a nonlinear-mritoself perl script that might help. Jason On 2010-02-20, at 12:36 PM, EJ Nikelski wrote: > Hi all, > > I need some validation and/or suggestions (or both?). I have > subject scans (T1) for which each subject was scanned multiple times > (same scanner), at difference points in time. For each subject, some > of the scans were acquired within the same scanning sessions, some > were acquired within a 6-month window. > > I would like to combine the scans to give me the best SNR for > Civet processing. I've tried specifying one of the scans as the > "target" and then using "mritoself" to align all others to it; all > aligned scans and the "target" would then be mincaverage'd. The > results are OK, but not splendid, as Civet spits up during tissue > classification on one of the averaged volumes, although the > non-averaged scans go through without error. I'm using defaults for > the mritoself call, plus "-nocrop". > > Does anyone have any experience in this. Ideas? Suggestions? > Magical incantations? > > Thanks, > > -Jim > > > -- > ================================= > Jim Nikelski, Ph.D. > Postdoctoral Research Fellow > Bloomfield Centre for Research in Aging > Lady Davis Institute for Medical Research > Sir Mortimer B. Davis - Jewish General Hospital > McGill University > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From vladimir.fonov at gmail.com Sat Feb 20 14:13:54 2010 From: vladimir.fonov at gmail.com (Vladimir Fonov) Date: Sat, 20 Feb 2010 14:13:54 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: Hello, I also suggest using nonlinear registration ( 8mm step size should be enough) or at least lsq12 when averaging scans acquired during different scanning sessions. Also, do you normalize intensities between scans ? On Sat, Feb 20, 2010 at 12:56 PM, Jason Lerch wrote: > In my limited experience you're much better off processing each of the scans independently and then either averaging the thickness maps at the end or, even better, using mixed effects models and all your data for the analysis. > > Alternately, if you really want to go the higher SNR route, I have a nonlinear-mritoself perl script that might help. > On 2010-02-20, at 12:36 PM, EJ Nikelski wrote: >> ?I need some validation and/or suggestions (or both?). ?I have >> subject scans (T1) for which each subject was scanned multiple times >> (same scanner), at difference points in time. ?For each subject, some >> of the scans were acquired within the same scanning sessions, some >> were acquired within a 6-month window. >> >> ? ? I would like to combine the scans to give me the best SNR for >> Civet processing. ?I've tried specifying one of the scans as the >> "target" and then using "mritoself" to align all others to it; all >> aligned scans and the "target" would then be mincaverage'd. ?The >> results are OK, but not splendid, as Civet spits up during tissue >> classification on one of the averaged volumes, although the >> non-averaged scans go through without error. ?I'm using defaults for >> the mritoself call, plus "-nocrop". -- Best regards, Vladimir S. Fonov ~ v.s.fonov <@> ilmarin.info From pbellec at bic.mni.mcgill.ca Sat Feb 20 14:20:12 2010 From: pbellec at bic.mni.mcgill.ca (Pierre Bellec) Date: Sat, 20 Feb 2010 14:20:12 -0500 Subject: [MINC-users] minc tools crash in matlab Message-ID: <6fe841c71002201120i11520b47x73891b6dd8999551@mail.gmail.com> Dear MINC users, I just installed the "mincbundle" package on my laptop (with ubuntu hardy). The installation went smoothly and everything I tried so far in the shell worked just fine. Unfortunately, when I start Matlab (7.9.0, R2009b) and try to use the minc tools via system calls I get an error : >> ! mincinfo anat_subject1.mnc.gz mincinfo: symbol lookup error: /usr/lib/libminc2.so.1: undefined symbol: ncerr In a shell, the "mincinfo -version" gives : program: 2.0.14 libminc: 2.0.14 netcdf : "3.6.2" of Feb 8 2008 16:40:20 $ HDF5 : 1.6.5 >From Octave everything works fine. If I source the CIVET quarantine "Feb-14-2008", I don't get any error in matlab. Any thoughts about how to fix that ? Pierre -- Pierre Bellec Post-doctoral fellow McConnel Brain Imaging Center, Webster 2B Montreal Neurological Institute 3801 University Street Montreal, Quebec, Canada H3A 2B4 http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec tel: (001)(514) 398 5220 fax: (001)(514) 398 8948 From claude at bic.mni.mcgill.ca Sat Feb 20 17:59:49 2010 From: claude at bic.mni.mcgill.ca (Claude LEPAGE) Date: Sat, 20 Feb 2010 17:59:49 -0500 Subject: [MINC-users] minc tools crash in matlab In-Reply-To: <6fe841c71002201120i11520b47x73891b6dd8999551@mail.gmail.com> Message-ID: <201002202259.o1KMxnu9017186@grumio.bic.mni.mcgill.ca> Pierre, I don't know how this mincbundle was created, but it looks like it's looking for dynamic libraries (.so). Add the path of libminc2.so.1 (should be somewhere in your mincbundle) to LD_LIBRARY_PATH environment variable. Also, this mincbundle is old. minc 2.0.14. This will not work well with your fmri studies. Claude > I just installed the "mincbundle" package on my laptop (with ubuntu hardy). > The installation went smoothly and everything I tried so far in the shell > worked just fine. Unfortunately, when I start Matlab (7.9.0, R2009b) and try > to use the minc tools via system calls I get an error : > > >> ! mincinfo anat_subject1.mnc.gz > mincinfo: symbol lookup error: /usr/lib/libminc2.so.1: undefined symbol: > ncerr > > In a shell, the "mincinfo -version" gives : > > program: 2.0.14 > libminc: 2.0.14 > netcdf : "3.6.2" of Feb 8 2008 16:40:20 $ > HDF5 : 1.6.5 > > >From Octave everything works fine. If I source the CIVET quarantine > "Feb-14-2008", I don't get any error in matlab. > > Any thoughts about how to fix that ? > > Pierre > > -- > Pierre Bellec > Post-doctoral fellow > McConnel Brain Imaging Center, Webster 2B > Montreal Neurological Institute > 3801 University Street > Montreal, Quebec, Canada H3A 2B4 > http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec > tel: (001)(514) 398 5220 > fax: (001)(514) 398 8948 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From nikelski at bic.mni.mcgill.ca Sun Feb 21 00:52:16 2010 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Sat, 20 Feb 2010 21:52:16 -0800 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: Hi all, Jason, the problem that I'm trying to address is the same problem that you mentioned in your MACACC paper -- poor gray/white tissue contrast in the dorsal motor and somatosensory cortex. As the thickness values are ... ummmm .... of questionable value, processing them separately won't really help. I need to increase my tissue contrast in that region in order to extract anything that looks like reasonable thickness values (reasonable = motor cortex almost twice as thick as the somatosensory). Vlad and Jason (and others) : So in the above scenario, you would recommend non-linear fitting? Would this be (1) fitting both scans to a model (like the ICBM symmetrical), or (2) nl-fitting a given subject's scan #1 against their scan #2? I have to admit that using a non-linear fit when fitting a given subject's scan to his/her own scan -- possibly acquired during the same scanning session -- seems counter-intuitive. I would have thought that rigid-body would be the way to go ... Jason: Yes, please send me your nonlinear-mritoself perl script ... it's certainly worth a shot. Vlad: Do you mean the "-normalize" switch on mincaverage, or something more diabolical? For my initial tests, both scans were acquired back-to-back, during the same scanning session, so I didn't do intensity normalization. Once I'm able to get the 2 within-scan scans to align properly, I plan to add in the additional scans ... and use intensity normalization during averaging. BTW, as these are ADNI scans, they've also already had one run through of N3 (off topic, but related). Any additional ideas would certainly be welcome ... and I'd be willing to test all reasonable suggestions (I have 5 test subjects that I'm currently using). Thanks, -Jim On Sat, Feb 20, 2010 at 11:13 AM, Vladimir Fonov wrote: > Hello, > > I also suggest using nonlinear registration ( 8mm step size should be > enough) or at least lsq12 when averaging scans acquired during > different scanning sessions. Also, do you normalize intensities > between scans ? > > > On Sat, Feb 20, 2010 at 12:56 PM, Jason Lerch wrote: >> In my limited experience you're much better off processing each of the scans independently and then either averaging the thickness maps at the end or, even better, using mixed effects models and all your data for the analysis. >> >> Alternately, if you really want to go the higher SNR route, I have a nonlinear-mritoself perl script that might help. > >> On 2010-02-20, at 12:36 PM, EJ Nikelski wrote: >>> ?I need some validation and/or suggestions (or both?). ?I have >>> subject scans (T1) for which each subject was scanned multiple times >>> (same scanner), at difference points in time. ?For each subject, some >>> of the scans were acquired within the same scanning sessions, some >>> were acquired within a 6-month window. >>> >>> ? ? I would like to combine the scans to give me the best SNR for >>> Civet processing. ?I've tried specifying one of the scans as the >>> "target" and then using "mritoself" to align all others to it; all >>> aligned scans and the "target" would then be mincaverage'd. ?The >>> results are OK, but not splendid, as Civet spits up during tissue >>> classification on one of the averaged volumes, although the >>> non-averaged scans go through without error. ?I'm using defaults for >>> the mritoself call, plus "-nocrop". > > > > > -- > Best regards, > ?Vladimir S. Fonov ~ v.s.fonov <@> ilmarin.info > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University From a.janke at gmail.com Sun Feb 21 00:54:11 2010 From: a.janke at gmail.com (Andrew Janke) Date: Sun, 21 Feb 2010 16:54:11 +1100 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: Hi Jim, On Sun, Feb 21, 2010 at 06:13, Vladimir Fonov wrote: > I also suggest using nonlinear registration ( 8mm step size should be > enough) or at least lsq12 when averaging scans acquired during > different scanning sessions. Also, do you normalize intensities > between scans ? And to follow on from others comments one of the more interesting points you should consider is that you should be resampling all your files equally (or transforming them as much as all the others) in order than you don't bias your result to one image. I am being pedantic I know but it's fun. So to this end I wrote a thing called volcombine for just this reason (joining up 2 T1's).. :) It generates a fit mask as part of the process as often subjects tend to move their faces and the likes. It makes sure the result is 1/2 between the two input images. Get it here: http://mavis.anu.edu.au/scripts/volcombine mavis:~$ volcombine -help Usage: volcombine [options] volcombine uses linear registration to combine two volumes into one. These volumes are typically from a dual-acquisition that is used to improve SNR and/or reduce movement artifact $ volcombine T1-1.mnc T1-2.mnc outfile.mnc If you have more than 2 files then you could always use volgenmodel from here: http://mavis.anu.edu.au/scripts/volgenmodel I would run it with this magic incantation: $ volgenmodel in1.mnc in2.mnc in3.mnc ... \ -output_model all-together-now.mnc \ -fit_stages lin,lin,lin,0,0,0,1,1,1 This will do 3 linear fits and then 3 nonlinear fits at the 16mm level. You can change the fit parameters if you want with -config_file. Also if you have a SGE batch system and qbatch you can add a -batch option and it will suck up all the CPU's it can find. With both of these there may be a few other scripts that you will have to download from the same directory.. Good luck! -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From alex at bic.mni.mcgill.ca Sun Feb 21 01:00:23 2010 From: alex at bic.mni.mcgill.ca (Alex Zijdenbos) Date: Sun, 21 Feb 2010 01:00:23 -0500 Subject: [MINC-users] minc tools crash in matlab In-Reply-To: <201002202259.o1KMxnu9017186@grumio.bic.mni.mcgill.ca> References: <6fe841c71002201120i11520b47x73891b6dd8999551@mail.gmail.com> <201002202259.o1KMxnu9017186@grumio.bic.mni.mcgill.ca> Message-ID: Hi Pierre, As far as I know, 'mincbundle' for Hardy contains (at least) 2.0.17, and installs in /usr/local/bic, not /usr as your error message suggests. I suspect you may have also installed the minc-tools package which lives in the Hardy repositories, but which is rather outdated/obsolete. See what happens if you run 'apt-get remove libminc2-1'. -- Alex On Sat, Feb 20, 2010 at 5:59 PM, Claude LEPAGE wrote: > Pierre, > > I don't know how this mincbundle was created, but it looks > like it's looking for dynamic libraries (.so). Add the path > of libminc2.so.1 (should be somewhere in your mincbundle) > to LD_LIBRARY_PATH environment variable. > > Also, this mincbundle is old. minc 2.0.14. This will not > work well with your fmri studies. > > Claude > > >> I just installed the "mincbundle" package on my laptop (with ubuntu hardy). >> The installation went smoothly and everything I tried so far in the shell >> worked just fine. Unfortunately, when I start Matlab (7.9.0, R2009b) and try >> to use the minc tools via system calls I get an error : >> >> >> ! mincinfo anat_subject1.mnc.gz >> mincinfo: symbol lookup error: /usr/lib/libminc2.so.1: undefined symbol: >> ncerr >> >> In a shell, the "mincinfo -version" gives : >> >> program: 2.0.14 >> libminc: 2.0.14 >> netcdf : "3.6.2" of Feb ?8 2008 16:40:20 $ >> HDF5 ? : 1.6.5 >> >> >From Octave everything works fine. If I source the CIVET quarantine >> "Feb-14-2008", I don't get any error in matlab. >> >> Any thoughts about how to fix that ? >> >> Pierre >> >> -- >> Pierre Bellec >> Post-doctoral fellow >> McConnel Brain Imaging Center, Webster 2B >> Montreal Neurological Institute >> 3801 University Street >> Montreal, Quebec, Canada H3A 2B4 >> http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec >> tel: ? ? ? (001)(514) 398 5220 >> fax: ? ? ?(001)(514) 398 8948 >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > From nikelski at bic.mni.mcgill.ca Sun Feb 21 01:27:51 2010 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Sat, 20 Feb 2010 22:27:51 -0800 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: Hi all, Thanks Andrew, I shall try your magic and report back to the list for completeness ... although the reason for non-linear fitting still confuses and angers me ... -Jim On Sat, Feb 20, 2010 at 9:54 PM, Andrew Janke wrote: > Hi Jim, > > On Sun, Feb 21, 2010 at 06:13, Vladimir Fonov wrote: >> I also suggest using nonlinear registration ( 8mm step size should be >> enough) or at least lsq12 when averaging scans acquired during >> different scanning sessions. Also, do you normalize intensities >> between scans ? > > And to follow on from others comments one of the more interesting > points you should consider is that you should be resampling all your > files equally (or transforming them as much as all the others) in > order than you don't bias your result to one image. ?I am being > pedantic I know but it's fun. > > So to this end I wrote a thing called volcombine for just this reason > (joining up 2 T1's).. :) ?It generates a fit mask as part of the > process as often subjects tend to move their faces and the likes. ?It > makes sure the result is 1/2 between the two input images. Get it > here: > > ? http://mavis.anu.edu.au/scripts/volcombine > > mavis:~$ volcombine -help > Usage: > ? ?volcombine [options] > > ? ?volcombine uses linear registration to combine two volumes into one. > ? ?These volumes are typically from a dual-acquisition that is used to > ? ?improve SNR and/or reduce movement artifact > > ? ? ? $ volcombine T1-1.mnc T1-2.mnc outfile.mnc > > If you have more than 2 files then you could always use volgenmodel from here: > > ? http://mavis.anu.edu.au/scripts/volgenmodel > > I would run it with this magic incantation: > > ? $ volgenmodel in1.mnc in2.mnc in3.mnc ... \ > ? ? ? ? -output_model all-together-now.mnc \ > ? ? ? ? -fit_stages lin,lin,lin,0,0,0,1,1,1 > > This will do 3 linear fits and then 3 nonlinear fits at the 16mm > level. ?You can change the fit parameters if you want with > -config_file. Also if you have a SGE batch system and qbatch you can > add a -batch option and it will suck up all the CPU's it can find. > > With both of these there may be a few other scripts that you will have > to download from the same directory.. > > Good luck! > > > -- > Andrew Janke > (a.janke at gmail.com || http://a.janke.googlepages.com/) > Canberra->Australia ? ?+61 (402) 700 883 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University From a.janke at gmail.com Sun Feb 21 03:25:31 2010 From: a.janke at gmail.com (Andrew Janke) Date: Sun, 21 Feb 2010 19:25:31 +1100 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: On Sun, Feb 21, 2010 at 17:27, EJ Nikelski wrote: > ? Thanks Andrew, I shall try your magic and report back to the list > for completeness ... although the reason for non-linear fitting still > confuses and angers me ... One of the main reasons for a lowres nonlinear fit is that heads are difficult to get back into the magnet perfectly the same as the last time meaning there _will_ be some geometric distortion. If you are scanning a phantom/plotting gradients/something else to correct this then good and well. If not there will be small non-linear differences. That and as mentioned the "non-brain bits" tend to move so if you do a whole head registration (no masking) you will expect a single linear registration to do a poor job of optimising both the non-moving bits and the mobile bits. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From claude at bic.mni.mcgill.ca Sun Feb 21 11:12:01 2010 From: claude at bic.mni.mcgill.ca (Claude LEPAGE) Date: Sun, 21 Feb 2010 11:12:01 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: Message-ID: <201002211612.o1LGC1et010799@grumio.bic.mni.mcgill.ca> Hi Jim, > BTW, as these are ADNI > scans, they've also already had one run through of N3 (off topic, but > related). Last summer, we had a meeting to sort out the differences with your CIVET output of ADNI and Alex' output. Those differences were very substantial. It turned out that Alex used the raw native images while you used the pre-processed ADNI images. The pre-processing steps included gradient corrections, B1 field correction (to account for multi-site acquisitions), and finally some N3. Since ADNI has some scans at 3T (N3 with spline distance of 50mm) and some scans at 1.5T (N3 with spline distance of 200mm), the ADNI people decided to take a weighted average of the 1.5T and 3T scans and run N3 at an intermediate spline distance of 150mm, which is wrong for both 1.5T and 3T. It was clear in my recommendations that you should not use the N3-corrected images provided by ADNI, but use only the images after the corrections for the site. I don't know if this will solve the problem with the cortical thickness values in the motor area, but you should try this. Alan and Alex also received a copy of my recommendations for this study. Claude From nikelski at bic.mni.mcgill.ca Sun Feb 21 13:57:50 2010 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Sun, 21 Feb 2010 10:57:50 -0800 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: <201002211612.o1LGC1et010799@grumio.bic.mni.mcgill.ca> References: <201002211612.o1LGC1et010799@grumio.bic.mni.mcgill.ca> Message-ID: Hi Claude, Yup, I recall the meeting last summer, and I'll be certain to use the non-N3-corrected scans for all future analyses. Having said that, the low tissue contrast issues have also been reported by Jason Lerch in his MACACC paper, and can also be seen in the ICBM-152 dataset verification images, so - as you suggested - what I am seeing is likely not primarily an ADNI N3 issue. I'm very curious to determine precisely how many acquisitions one needs before the thickness values in the motor cortex stabilize. I would also like to state explicitly that I do *not* believe that this tissue contrast issue is Civet/Insect-specific. Other studies interested in dorsal cortex, using other tools (e.g., FreeSurfer), routinely use > 1 scans ... sometimes quite a few more. Thanks, -Jim On Sun, Feb 21, 2010 at 8:12 AM, Claude LEPAGE wrote: > Hi Jim, > >> BTW, as these are ADNI >> scans, they've also already had one run through of N3 (off topic, but >> related). > > Last summer, we had a meeting to sort out the differences with > your CIVET output of ADNI and Alex' output. Those differences > were very substantial. It turned out that Alex used the raw > native images while you used the pre-processed ADNI images. > The pre-processing steps included gradient corrections, B1 > field correction (to account for multi-site acquisitions), > and finally some N3. Since ADNI has some scans at 3T (N3 with > spline distance of 50mm) and some scans at 1.5T (N3 with > spline distance of 200mm), the ADNI people decided to take a > weighted average of the 1.5T and 3T scans and run N3 at an > intermediate spline distance of 150mm, which is wrong for > both 1.5T and 3T. It was clear in my recommendations that you > should not use the N3-corrected images provided by ADNI, but > use only the images after the corrections for the site. I don't > know if this will solve the problem with the cortical thickness > values in the motor area, but you should try this. Alan and Alex > also received a copy of my recommendations for this study. > > Claude > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University From claude at bic.mni.mcgill.ca Sun Feb 21 18:15:45 2010 From: claude at bic.mni.mcgill.ca (Claude LEPAGE) Date: Sun, 21 Feb 2010 18:15:45 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: Message-ID: <201002212315.o1LNFjMI026598@grumio.bic.mni.mcgill.ca> Hi Jim, > Yup, I recall the meeting last summer, and I'll be certain to use > the non-N3-corrected scans for all future analyses. Having said that, > the low tissue contrast issues have also been reported by Jason Lerch > in his MACACC paper, and can also be seen in the ICBM-152 dataset > verification images, so - as you suggested - what I am seeing is > likely not primarily an ADNI N3 issue. Last week, I happened to look at some ICBM-152 results and I recalled your e-mail. On individual scans, I didn't see any obvious differences in cortical thickness in pre- post- central sulcus. However, the population average showed the right trend. Claude From laurence at bic.mni.mcgill.ca Mon Feb 22 11:23:23 2010 From: laurence at bic.mni.mcgill.ca (Laurence Mercier) Date: Mon, 22 Feb 2010 11:23:23 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: Message-ID: <4B82AF7B.1060608@bic.mni.mcgill.ca> Hello Andrew, > So to this end I wrote a thing called volcombine for just this reason > (joining up 2 T1's).. :) It generates a fit mask as part of the > process as often subjects tend to move their faces and the likes. It > makes sure the result is 1/2 between the two input images. Get it > here: > > http://mavis.anu.edu.au/scripts/volcombine Thank you Andrew! I was just starting to combine 3D ultrasound sweeps (0.3 x 0.3 x 0.3 mm) taken at the same time point during surgery. They mostly overlap, but each of them only covers parts of the region of interest. By combining them I get a much larger field of view. Do you think your script (volcombine) will work for my application? Thank you! Laurence > mavis:~$ volcombine -help > Usage: > volcombine [options] > > volcombine uses linear registration to combine two volumes into one. > These volumes are typically from a dual-acquisition that is used to > improve SNR and/or reduce movement artifact > > $ volcombine T1-1.mnc T1-2.mnc outfile.mnc > > If you have more than 2 files then you could always use volgenmodel from here: > > http://mavis.anu.edu.au/scripts/volgenmodel > > I would run it with this magic incantation: > > $ volgenmodel in1.mnc in2.mnc in3.mnc ... \ > -output_model all-together-now.mnc \ > -fit_stages lin,lin,lin,0,0,0,1,1,1 > > This will do 3 linear fits and then 3 nonlinear fits at the 16mm > level. You can change the fit parameters if you want with > -config_file. Also if you have a SGE batch system and qbatch you can > add a -batch option and it will suck up all the CPU's it can find. > > With both of these there may be a few other scripts that you will have > to download from the same directory.. > > Good luck! > > > -- > Andrew Janke > (a.janke at gmail.com || http://a.janke.googlepages.com/) > Canberra->Australia +61 (402) 700 883 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From anthonin at biospective.com Mon Feb 22 12:20:42 2010 From: anthonin at biospective.com (Anthonin Reilhac) Date: Mon, 22 Feb 2010 12:20:42 -0500 Subject: [MINC-users] minctracc error In-Reply-To: References: <44da421f1002191422jaa70281k7cf5382d359ba1@mail.gmail.com> Message-ID: <44da421f1002220920m381fa532gaa6e04d01a5d92f2@mail.gmail.com> Thanks Andrew, I will try this. Anthonin On 20 February 2010 07:41, Andrew Janke wrote: > Hi Anthonin, > > On Sat, Feb 20, 2010 at 09:22, Anthonin Reilhac > wrote: > > I am currently experiencing issues with minctracc which crashes and > outputs > > this error: > > *Error in /usr/local/bic/bin/minctracc in file init_params.c, line 593 > > Cannot calculate the COG or COV of volume 1.* > > minctracc really doesn't do all that well with non 3D data as only a > small out of plane registration is needed to send things haywire. You > can fiddle with the weights parameters but it still won't help you > that much. My suggestions would be to make the problem "more 3D". > The easiest way to do this is to turn each of your 2D slices into a > thick 3D "cylinder" as such: > > (assuming 1mm voxels) > > # First fake 3D block: > mincconcat -concat_dimension zspace slice.mnc slice.mnc slice.mnc > slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc -step 1 -start 0 > block.mnc > > # then add a few blank slices top and bottom and blur the edges > volpad -distance 4 -smooth -smooth_distance 2 block.mnc padded.mnc > > Then run minctracc on your resulting padded volumes. I would set the > out of plane rotations weights to 0: > > minctracc -w_rotations 0 0 0.0174533 ... > > Once you have recovered a transformation you can then apply this to > the original volumes and hope all goes well. :) > > volpad can be found here: > > http://mavis.anu.edu.au/scripts/ > > > > -- > Andrew Janke > (a.janke at gmail.com || http://a.janke.googlepages.com/) > Canberra->Australia +61 (402) 700 883 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From laurence at bic.mni.mcgill.ca Mon Feb 22 15:34:42 2010 From: laurence at bic.mni.mcgill.ca (Laurence Mercier) Date: Mon, 22 Feb 2010 15:34:42 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: <4B82AF7B.1060608@bic.mni.mcgill.ca> References: <4B82AF7B.1060608@bic.mni.mcgill.ca> Message-ID: <4B82EA62.1040809@bic.mni.mcgill.ca> Hello again Andrew, I tried volcombine on 3D ultrasound data. It gives something that makes sense, but I would probably need to tweek the parameters for ultrasound. I get something more blurry then if I register them (minctracc -lsq6) and then combine them with minccalc. Laurence Laurence Mercier wrote: > Hello Andrew, > >> So to this end I wrote a thing called volcombine for just this reason >> (joining up 2 T1's).. :) It generates a fit mask as part of the >> process as often subjects tend to move their faces and the likes. It >> makes sure the result is 1/2 between the two input images. Get it >> here: >> >> http://mavis.anu.edu.au/scripts/volcombine > > Thank you Andrew! I was just starting to combine 3D ultrasound sweeps > (0.3 x 0.3 x 0.3 mm) taken at the same time point during surgery. They > mostly overlap, but each of them only covers parts of the region of > interest. By combining them I get a much larger field of view. Do you > think your script (volcombine) will work for my application? Thank you! > > Laurence > > > > >> mavis:~$ volcombine -help >> Usage: >> volcombine [options] >> >> volcombine uses linear registration to combine two volumes into one. >> These volumes are typically from a dual-acquisition that is used to >> improve SNR and/or reduce movement artifact >> >> $ volcombine T1-1.mnc T1-2.mnc outfile.mnc >> >> If you have more than 2 files then you could always use volgenmodel >> from here: >> >> http://mavis.anu.edu.au/scripts/volgenmodel >> >> I would run it with this magic incantation: >> >> $ volgenmodel in1.mnc in2.mnc in3.mnc ... \ >> -output_model all-together-now.mnc \ >> -fit_stages lin,lin,lin,0,0,0,1,1,1 >> >> This will do 3 linear fits and then 3 nonlinear fits at the 16mm >> level. You can change the fit parameters if you want with >> -config_file. Also if you have a SGE batch system and qbatch you can >> add a -batch option and it will suck up all the CPU's it can find. >> >> With both of these there may be a few other scripts that you will have >> to download from the same directory.. >> >> Good luck! >> >> >> -- >> Andrew Janke >> (a.janke at gmail.com || http://a.janke.googlepages.com/) >> Canberra->Australia +61 (402) 700 883 >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > From claude at bic.mni.mcgill.ca Mon Feb 22 17:21:11 2010 From: claude at bic.mni.mcgill.ca (Claude LEPAGE) Date: Mon, 22 Feb 2010 17:21:11 -0500 Subject: [MINC-users] minctracc error In-Reply-To: <44da421f1002191422jaa70281k7cf5382d359ba1@mail.gmail.com> Message-ID: <201002222221.o1MMLB6p011850@grumio.bic.mni.mcgill.ca> Hi Anthonin, > I am currently experiencing issues with minctracc which crashes and outputs > this error: > *Error in /usr/local/bic/bin/minctracc in file init_params.c, line 593 > Cannot calculate the COG or COV of volume 1.* > > infos: > *a)* The two volumes I am trying to align are 2D sections (written as 3D > volumes z->length = 1). > *Source:* > image dimensions: xspace yspace zspace > dimension name length step start > -------------- ------ ---- ----- > xspace 6720 0.0016 1.9464 > yspace 8544 0.0016 6.6568 > zspace 1 0.1 0 > > *Target:* > dimension name length step start > -------------- ------ ---- ----- > xspace 7520 0.0016 1.0248 > yspace 8128 0.0016 7.3224 > zspace 1 0.1 0 I work with histology slices that are about 13000x11000. I developed very cost-efficient scripts for 2-D linear and non-linear registration. The registration is hierarchical - starting at low res (around 1mm) then gradually moving to full resolution. Maybe I bypass the initial bug of COV by downsampling, but it's the overall procedure that is important. There is no need to create slabs with several identical slices. That's cumbersome and slow. I am also using mni_autoreg-0.99.6. Make sure you use this version. It does all calculations in double precision and it also fixes a bug in "offsets" that is critical in 2-D. Come and see me if you want to use my scripts. Claude From a.janke at gmail.com Mon Feb 22 18:39:12 2010 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 23 Feb 2010 10:39:12 +1100 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: <4B82EA62.1040809@bic.mni.mcgill.ca> References: <4B82AF7B.1060608@bic.mni.mcgill.ca> <4B82EA62.1040809@bic.mni.mcgill.ca> Message-ID: Hi Laurence On Tue, Feb 23, 2010 at 07:34, Laurence Mercier wrote: > I tried volcombine on 3D ultrasound data. > It gives something that makes sense, but I would probably need to tweek the > parameters for ultrasound. I get something more blurry then if I register > them (minctracc -lsq6) and then combine them with minccalc. Odds are you will have to change a few things, 1. the output sampling is the first volume this may not give the complete coverage you want 2. It may appear more blurry as both are resampled 1/2 way. 3. During the fitting an attempt is made to generate an "overlap mask" and only calculate the registration for the "most similar" parts thus ignoring faces and the likes. This may or may not be applicable to your case. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From laurence at bic.mni.mcgill.ca Mon Feb 22 21:06:37 2010 From: laurence at bic.mni.mcgill.ca (Laurence Mercier) Date: Mon, 22 Feb 2010 21:06:37 -0500 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: References: <4B82AF7B.1060608@bic.mni.mcgill.ca> <4B82EA62.1040809@bic.mni.mcgill.ca> Message-ID: <4B83382D.1090400@bic.mni.mcgill.ca> Hello Andrew, Thank you for your answer. Your script will be a good starting point for me to play with and with your pointers below, I'll know exactly what I need to modify (point #1)! Point #3 is ok and for point #2 I need to play with the data and see ;-) Laurence > Odds are you will have to change a few things, > > 1. the output sampling is the first volume this may not give the > complete coverage you want > > 2. It may appear more blurry as both are resampled 1/2 way. > > 3. During the fitting an attempt is made to generate an "overlap mask" > and only calculate the registration for the "most similar" parts thus > ignoring faces and the likes. This may or may not be applicable to > your case. > > > -- > Andrew Janke > (a.janke at gmail.com || http://a.janke.googlepages.com/) > Canberra->Australia +61 (402) 700 883 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From a.janke at gmail.com Mon Feb 22 21:13:28 2010 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 23 Feb 2010 13:13:28 +1100 Subject: [MINC-users] 6-parameter fitting with minctracc In-Reply-To: <4B83382D.1090400@bic.mni.mcgill.ca> References: <4B82AF7B.1060608@bic.mni.mcgill.ca> <4B82EA62.1040809@bic.mni.mcgill.ca> <4B83382D.1090400@bic.mni.mcgill.ca> Message-ID: > Thank you for your answer. No trouble. > modify (point #1)! On this note, you might find this useful: http://mavis.anu.edu.au/scripts/volextents ie: $ volextents in1.mnc in2.mnc ... -xstart -118.1785899999999998 -ystart -126 -zstart -137.15181999999998652 -xstep 1 -ystep 1 -zstep 1 -xnelements 241 -ynelements 314 -znelements 273 The idea is that it gives you the minimum bounding box (with default direction cosines) to enclose all of your volumes. The output is in "mincresample" friendly format. a --- harold:me$ volextents -help | volextents figures out the extents of a bunch of input MINC files | | The output is in a form that can be used by mincresample | the calculated extents will start from the foremost | voxel of the foremost volume and extent to the number | of voxels required to cover the entire volume(s). This | will mean that volextents will often produce extents that | will extend beyond the required volume due to the step | size that is chosen. There is only one way around this | and that would be to instead centre the output sampling | around the input volumes. This has not yet been | implemented as I dont need it yet! Feel free to whinge | if you want it and I might just add it if vast quantites | of chocolate are sent. | | | Problems, comments and chocolate should be sent to: a.janke at gmail.com Summary of options: -- General Options ------------------------------------------------------------- -version print version and exit -verbose be verbose -noverbos opposite of -verbose [default] -- Extents Options ------------------------------------------------------------- -step the step size of the output dimensions [default: 1] -int round the start position to an integer -noint opposite of -int [default] Usage: volextents [options] [ [...] ] volextents -help to list options From pbellec at bic.mni.mcgill.ca Wed Feb 24 08:46:59 2010 From: pbellec at bic.mni.mcgill.ca (Pierre Bellec) Date: Wed, 24 Feb 2010 08:46:59 -0500 Subject: [MINC-users] minc tools crash in matlab Message-ID: <6fe841c71002240546u6be7050cje8e7639232bae092@mail.gmail.com> Hi everyone, Here's an update on the crash of minc tools when used through matlab R2009b. First, as Alex pointed out, I had an outdated version of the minc tools that had not been cleaned up by installing the mincbundle package. After manually deleting the minctools package, I got : $ mincinfo -version program: 2.0.17 libminc: 2.0.17 netcdf : "3.6.2" of Feb 8 2008 16:40:20 $ HDF5 : 1.6.5 Unfortunately, mincinfo still crashed when called through matlab. >> system('mincinfo -help') mincinfo: symbol lookup error: mincinfo: undefined symbol: ncopts Claude found out what the problem is. The mincbundle package has been compiled dynamically and relies on the NETCDF libraries $ ldd /usr/local/bic/bin/mincinfo linux-gate.so.1 => (0xb7ee8000) libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0xb7daa000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread. so.0 (0xb7d92000) libz.so.1 => /usr/lib/libz.so.1 (0xb7d7c000) *libnetcdf.so.4 => /usr/lib/libnetcdf.so.4 (0xb7d4a000)* libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d25000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bd6000) /lib/ld-linux.so.2 (0xb7ee9000) However, matlab comes with its own NETCDF library, and puts them first in the LD_LIBRARY_PATH. >> system('ldd /usr/local/bic/bin/mincinfo') linux-gate.so.1 => (0xb7f51000) libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0xb7e13000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7dfa000) libz.so.1 => /usr/lib/libz.so.1 (0xb7de5000) *libnetcdf.so.4 => /usr/local/matlabR2009b/bin/**glnx86/libnetcdf.so.4 (0xb7da9000)* libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d84000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c35000) /lib/ld-linux.so.2 (0xb7f52000) There is obviously an incompatibility between the version of NETCDF that's bundled with matlab and the one assumed by mincbundle. The mincbundle package may be perfectly correct, but in any case the matlab installer is just an archive and does not check on compatibility or whatever ... it just crashes my minc tools ! Now if I change the environment variables in the matlab call I can force mincinfo to use the right libraries : >> system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH; mincinfo') Usage: mincinfo [] [ ...] mincinfo -help Replacing all system calls to MINC tool in NIAK by this kind of hack is obviously not an option. As matlab does reinitialize the environment variables at each system call, I don't see how to apply that change once and for all to any system call. In other words, the following strategy won't work : >> system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH;'); >> system('mincinfo -help') mincinfo: symbol lookup error: mincinfo: undefined symbol: ncopts Changing the .bashrc won't work as well (because matlab forces its library to be first). The only practical solution I have at this stage is to keep using a static compilation of the minc tools. This will work for the time being because I have access to the CIVET quarantine but it won't apply to a random user. Please let me know if one of you guys can think of a better solution for the future. Cheers, Pierre Date: Sun, 21 Feb 2010 01:00:23 -0500 > From: Alex Zijdenbos > Subject: Re: [MINC-users] minc tools crash in matlab > To: MINC users mailing list > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Pierre, > > As far as I know, 'mincbundle' for Hardy contains (at least) 2.0.17, > and installs in /usr/local/bic, not /usr as your error message > suggests. I suspect you may have also installed the minc-tools package > which lives in the Hardy repositories, but which is rather > outdated/obsolete. See what happens if you run 'apt-get remove > libminc2-1'. > > -- Alex > > On Sat, Feb 20, 2010 at 5:59 PM, Claude LEPAGE > wrote: > > Pierre, > > > > I don't know how this mincbundle was created, but it looks > > like it's looking for dynamic libraries (.so). Add the path > > of libminc2.so.1 (should be somewhere in your mincbundle) > > to LD_LIBRARY_PATH environment variable. > > > > Also, this mincbundle is old. minc 2.0.14. This will not > > work well with your fmri studies. > > > > Claude > - Afficher le texte des messages pr?c?dents - > > > > > > >> I just installed the "mincbundle" package on my laptop (with ubuntu > hardy). > >> The installation went smoothly and everything I tried so far in the > shell > >> worked just fine. Unfortunately, when I start Matlab (7.9.0, R2009b) and > try > >> to use the minc tools via system calls I get an error : > >> > >> >> ! mincinfo anat_subject1.mnc.gz > >> mincinfo: symbol lookup error: /usr/lib/libminc2.so.1: undefined symbol: > >> ncerr > >> > >> In a shell, the "mincinfo -version" gives : > >> > >> program: 2.0.14 > >> libminc: 2.0.14 > >> netcdf : "3.6.2" of Feb ?8 2008 16:40:20 $ > >> HDF5 ? : 1.6.5 > >> > >> >From Octave everything works fine. If I source the CIVET quarantine > >> "Feb-14-2008", I don't get any error in matlab. > >> > >> Any thoughts about how to fix that ? > >> > >> Pierre > >> > >> -- > >> Pierre Bellec > >> Post-doctoral fellow > >> McConnel Brain Imaging Center, Webster 2B > >> Montreal Neurological Institute > >> 3801 University Street > >> Montreal, Quebec, Canada H3A 2B4 > >> http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec > >> tel: ? ? ? (001)(514) 398 5220 > >> fax: ? ? ?(001)(514) 398 8948 > >> _______________________________________________ > >> MINC-users at bic.mni.mcgill.ca > >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > >> > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > -- Pierre Bellec Post-doctoral fellow McConnel Brain Imaging Center, Webster 2B Montreal Neurological Institute 3801 University Street Montreal, Quebec, Canada H3A 2B4 http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec tel: (001)(514) 398 5220 fax: (001)(514) 398 8948 From vladimir.fonov at gmail.com Wed Feb 24 09:05:36 2010 From: vladimir.fonov at gmail.com (Vladimir Fonov) Date: Wed, 24 Feb 2010 09:05:36 -0500 Subject: [MINC-users] minc tools crash in matlab In-Reply-To: <6fe841c71002240546u6be7050cje8e7639232bae092@mail.gmail.com> References: <6fe841c71002240546u6be7050cje8e7639232bae092@mail.gmail.com> Message-ID: Hello, On Wed, Feb 24, 2010 at 8:46 AM, Pierre Bellec wrote: > Now if I change the environment variables in the > matlab call I can force mincinfo to use the right libraries : > >>> system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH; mincinfo') > Usage: mincinfo [] [ ...] > ? ? ? mincinfo -help > > Replacing all system calls to MINC tool in NIAK by this kind of hack is > obviously not an option. You can make niak version of the system call that will manipulate environment variables in the real system call. As matlab does reinitialize the environment > variables at each system call, I don't see how to apply that change once and > for all to any system call. In other words, the following strategy won't > work : >>> ?system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH;'); >>> ?system('mincinfo -help') > mincinfo: symbol lookup error: mincinfo: undefined symbol: ncopts > > Changing the .bashrc won't work as well (because matlab forces its library > to be first). The only practical solution I have at this stage is to keep > using a static compilation of the minc tools. This will work for the time > being because I have access to the CIVET quarantine but it won't apply to a > random user. Please let me know if one of you guys can think of a better > solution for the future. Better solution would be to build minc tools which are statically linked to netcdf and HDF5 -- Best regards, Vladimir S. Fonov ~ v.s.fonov <@> ilmarin.info From alex at bic.mni.mcgill.ca Wed Feb 24 09:38:53 2010 From: alex at bic.mni.mcgill.ca (Alex Zijdenbos) Date: Wed, 24 Feb 2010 09:38:53 -0500 Subject: [MINC-users] minc tools crash in matlab In-Reply-To: <6fe841c71002240546u6be7050cje8e7639232bae092@mail.gmail.com> References: <6fe841c71002240546u6be7050cje8e7639232bae092@mail.gmail.com> Message-ID: Hi Pierre, What does matlab need netcdf for? You may want to try to make matlab use the netcdf lib that you want, by putting a symlink in place of matlab's netcdf lib pointing to /usr/local/libnetcdf.so.4. A bit of a crude hack but hey, it might work :) -- A On Wed, Feb 24, 2010 at 8:46 AM, Pierre Bellec wrote: > Hi everyone, > > Here's an update on the crash of minc tools when used through matlab R2009b. > First, as Alex pointed out, I had an outdated version of the minc tools that > had not been cleaned up by installing the mincbundle package. After manually > deleting the minctools package, I got : > > $ mincinfo -version > program: 2.0.17 > libminc: 2.0.17 > > netcdf : "3.6.2" of Feb ?8 2008 16:40:20 $ > HDF5 ? : 1.6.5 > > Unfortunately, mincinfo still crashed when called through matlab. > >>> system('mincinfo -help') > mincinfo: symbol lookup error: mincinfo: undefined symbol: ncopts > > Claude found out what the problem is. The mincbundle package has been > compiled dynamically and relies on the NETCDF libraries > > $ ?ldd /usr/local/bic/bin/mincinfo > ? ?linux-gate.so.1 => ?(0xb7ee8000) > ? ?libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0xb7daa000) > ? ?libpthread.so.0 => /lib/tls/i686/cmov/libpthread. > so.0 (0xb7d92000) > ? ?libz.so.1 => /usr/lib/libz.so.1 (0xb7d7c000) > ? ?*libnetcdf.so.4 => /usr/lib/libnetcdf.so.4 (0xb7d4a000)* > ? ?libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d25000) > ? ?libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bd6000) > ? ?/lib/ld-linux.so.2 (0xb7ee9000) > > However, matlab comes with its own NETCDF library, and puts them first in > the LD_LIBRARY_PATH. > >>> system('ldd /usr/local/bic/bin/mincinfo') > ? ?linux-gate.so.1 => ?(0xb7f51000) > ? ?libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0xb7e13000) > ? ?libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7dfa000) > ? ?libz.so.1 => /usr/lib/libz.so.1 (0xb7de5000) > ? ?*libnetcdf.so.4 => /usr/local/matlabR2009b/bin/**glnx86/libnetcdf.so.4 > (0xb7da9000)* > ? ?libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d84000) > ? ?libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c35000) > ? ?/lib/ld-linux.so.2 (0xb7f52000) > > There is obviously an incompatibility between the version of NETCDF that's > bundled with matlab and the one assumed by mincbundle. The mincbundle > package may be perfectly correct, but in any case the matlab installer is > just an archive and does not check on compatibility or whatever ... it just > crashes my minc tools ! Now if I change the environment variables in the > matlab call I can force mincinfo to use the right libraries : > >>> system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH; mincinfo') > Usage: mincinfo [] [ ...] > ? ? ? mincinfo -help > > Replacing all system calls to MINC tool in NIAK by this kind of hack is > obviously not an option. As matlab does reinitialize the environment > variables at each system call, I don't see how to apply that change once and > for all to any system call. In other words, the following strategy won't > work : >>> ?system('export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH;'); >>> ?system('mincinfo -help') > mincinfo: symbol lookup error: mincinfo: undefined symbol: ncopts > > Changing the .bashrc won't work as well (because matlab forces its library > to be first). The only practical solution I have at this stage is to keep > using a static compilation of the minc tools. This will work for the time > being because I have access to the CIVET quarantine but it won't apply to a > random user. Please let me know if one of you guys can think of a better > solution for the future. > > Cheers, > > Pierre > > Date: Sun, 21 Feb 2010 01:00:23 -0500 >> From: Alex Zijdenbos >> Subject: Re: [MINC-users] minc tools crash in matlab >> To: MINC users mailing list >> Message-ID: >> ? ? ? ? >> Content-Type: text/plain; charset=ISO-8859-1 >> >> Hi Pierre, >> >> As far as I know, 'mincbundle' for Hardy contains (at least) 2.0.17, >> and installs in /usr/local/bic, not /usr as your error message >> suggests. I suspect you may have also installed the minc-tools package >> which lives in the Hardy repositories, but which is rather >> outdated/obsolete. See what happens if you run 'apt-get remove >> libminc2-1'. >> >> -- Alex >> >> On Sat, Feb 20, 2010 at 5:59 PM, Claude LEPAGE >> wrote: >> > Pierre, >> > >> > I don't know how this mincbundle was created, but it looks >> > like it's looking for dynamic libraries (.so). Add the path >> > of libminc2.so.1 (should be somewhere in your mincbundle) >> > to LD_LIBRARY_PATH environment variable. >> > >> > Also, this mincbundle is old. minc 2.0.14. This will not >> > work well with your fmri studies. >> > >> > Claude >> - Afficher le texte des messages pr?c?dents - >> >> > >> > >> >> I just installed the "mincbundle" package on my laptop (with ubuntu >> hardy). >> >> The installation went smoothly and everything I tried so far in the >> shell >> >> worked just fine. Unfortunately, when I start Matlab (7.9.0, R2009b) and >> try >> >> to use the minc tools via system calls I get an error : >> >> >> >> >> ! mincinfo anat_subject1.mnc.gz >> >> mincinfo: symbol lookup error: /usr/lib/libminc2.so.1: undefined symbol: >> >> ncerr >> >> >> >> In a shell, the "mincinfo -version" gives : >> >> >> >> program: 2.0.14 >> >> libminc: 2.0.14 >> >> netcdf : "3.6.2" of Feb ?8 2008 16:40:20 $ >> >> HDF5 ? : 1.6.5 >> >> >> >> >From Octave everything works fine. If I source the CIVET quarantine >> >> "Feb-14-2008", I don't get any error in matlab. >> >> >> >> Any thoughts about how to fix that ? >> >> >> >> Pierre >> >> >> >> -- >> >> Pierre Bellec >> >> Post-doctoral fellow >> >> McConnel Brain Imaging Center, Webster 2B >> >> Montreal Neurological Institute >> >> 3801 University Street >> >> Montreal, Quebec, Canada H3A 2B4 >> >> http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec >> >> tel: ? ? ? (001)(514) 398 5220 >> >> fax: ? ? ?(001)(514) 398 8948 >> >> _______________________________________________ >> >> MINC-users at bic.mni.mcgill.ca >> >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> >> >> > _______________________________________________ >> > MINC-users at bic.mni.mcgill.ca >> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > >> > >> >> > > -- > Pierre Bellec > Post-doctoral fellow > McConnel Brain Imaging Center, Webster 2B > Montreal Neurological Institute > 3801 University Street > Montreal, Quebec, Canada H3A 2B4 > http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec > tel: ? ? ? (001)(514) 398 5220 > fax: ? ? ?(001)(514) 398 8948 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > From a.janke at gmail.com Sat Feb 27 06:34:38 2010 From: a.janke at gmail.com (Andrew Janke) Date: Sat, 27 Feb 2010 22:34:38 +1100 Subject: [MINC-users] minc tools crash in matlab In-Reply-To: References: <6fe841c71002240546u6be7050cje8e7639232bae092@mail.gmail.com> Message-ID: Hi Pierre, I'm with Alex on this one, the fault would seem to be on the MATLAB side as I attempt to follow the debian/ubuntu rules when making my packages. I too wonder why MATLAB needs netcdf and would go with the plan of attempting to replace MATLAB's version of netcdf with the ubuntu version. Or just use octave. :) -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 On Thu, Feb 25, 2010 at 01:38, Alex Zijdenbos wrote: > Hi Pierre, > > What does matlab need netcdf for? You may want to try to make matlab > use the netcdf lib that you want, by putting a symlink in place of > matlab's netcdf lib pointing to /usr/local/libnetcdf.so.4. A bit of a > crude hack but hey, it might work :) From pbellec at bic.mni.mcgill.ca Sat Feb 27 15:51:43 2010 From: pbellec at bic.mni.mcgill.ca (Pierre Bellec) Date: Sat, 27 Feb 2010 15:51:43 -0500 Subject: [MINC-users] minc tools crash in matlab Message-ID: <6fe841c71002271251g407eb403vcebea107e33f0b35@mail.gmail.com> Hi everyone, First thanks a lot Vlad, Alex and Andrew for your suggestions. So, as of why Matlab is using the netcdf library, my guess is that netcdf used to be the file format of matlab (it was replaced by HDF5 around R7). As a consequence, I don't think that replacing matlab's netcdf library by the one from /usr/lib will cause any trouble if I stick to "recent" .mat files. I've actually done it and after very superficial testing there was no problem. It is a bit of dirty, but not bad at all as a temporary solution. I still dream about distributing NIAK outside the BIC without asking people to play around with libraries. That means that I will have to find a cleaner solution at some point. Clearly, matlab's installation is to blame and minc does the right thing. As Vlad and Claude suggested, including netcdf statically in the mincbundle package would still circumvent Matlab's malpractice. Now, if Andrew thinks that a static compilation is not casher, so be it. I am a bit surprised because anything that goes towards more robustness for the binaries sounds like a good thing, but there are certainly other issues I am not aware of. The only thing left for me to do is thus to go ahead and complain directly to mathworks, hopping that this issue might get fixed in future releases of Matlab. I had a surprisingly good experience with the support team of the company so far, so I'll give it a shot. Thanks again for your help, it is very much appreciated, Pierre Bellec Post-doctoral fellow McConnel Brain Imaging Center, Webster 2B Montreal Neurological Institute 3801 University Street Montreal, Quebec, Canada H3A 2B4 http://wiki.bic.mni.mcgill.ca/index.php/PierreBellec tel: (001)(514) 398 5220 fax: (001)(514) 398 8948 From a.janke at gmail.com Sat Feb 27 21:59:21 2010 From: a.janke at gmail.com (Andrew Janke) Date: Sun, 28 Feb 2010 13:59:21 +1100 Subject: [MINC-users] minc tools crash in matlab In-Reply-To: <6fe841c71002271251g407eb403vcebea107e33f0b35@mail.gmail.com> References: <6fe841c71002271251g407eb403vcebea107e33f0b35@mail.gmail.com> Message-ID: I certainly would have no problem with this. My suggestion would be to just compile the tools you need (rawtominc, mincextract, mincinfo?) as static and distribute them with your NIAK package for various platforms. Shouldn't be too hard to keep up to date for a limited number of platforms. Perhaps even go so far as to call them niak_mincinfo of something when compiled to avoid issues. Obviously this should be controlled with some global variable in NIAK so that you can use the "normal" MINC libraries/binaries but for most cases it should be fine. Something like $niak_bin_prefix = ($haveminc == 1) ? "" : "niak_" would work very well. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 On Sun, Feb 28, 2010 at 07:51, Pierre Bellec wrote: > Now, if Andrew thinks that a static compilation is not casher, > so be it. I am a bit surprised because anything that goes towards more > robustness for the binaries sounds like a good thing