From zijdenbos at gmail.com Tue Mar 1 23:59:03 2016 From: zijdenbos at gmail.com (Alex Zijdenbos) Date: Tue, 1 Mar 2016 23:59:03 -0500 Subject: [MINC-users] xfm2param exit status Message-ID: Hi all, I stumbled across the fact that when xfm2param is not able to convert the given linear transform to a set of parameters, it reports an identity transform, with a warning: WARNING: (rotmat_to_ang.c:193) step one: rz not in the range -pi/2..pi/2 Cannot convert R to radians however the exit status is 0 (success). I use xfm2param an awful lot, buried deep in scripts, and am realizing that this warning has always gone unnoticed due to the 0 exit status. I'd say that xfm2param should fail (have a non-zero exit status) when it is not able to interpret the xfm, rather than report the identity transform? -- A From gdevenyi at gmail.com Wed Mar 2 14:24:57 2016 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Wed, 2 Mar 2016 14:24:57 -0500 Subject: [MINC-users] Hyperintensities in T1 images Message-ID: Hi all, I'm working with some data where the scan range is very large, and fat deposits (in the neck) or the subject's shoulders have far higher intensities than the brain tissue. This breaks bestlinreg and similar "blur and register" types of methods. Can anyone recommend a way to "tamp down" these high intensity regions? (Note, I already tried cropping and the image size variation makes this tedious to do manually). Thanks! -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com From vladimir.fonov at gmail.com Wed Mar 2 14:44:41 2016 From: vladimir.fonov at gmail.com (Vladimir S. FONOV) Date: Wed, 2 Mar 2016 14:44:41 -0500 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: References: Message-ID: <56D742A9.3040608@gmail.com> Did you try bestlinreg_s -nmi ? On 16-03-02 02:24 PM, Gabriel A. Devenyi wrote: > Hi all, > > I'm working with some data where the scan range is very large, and fat > deposits (in the neck) or the subject's shoulders have far higher > intensities than the brain tissue. > > This breaks bestlinreg and similar "blur and register" types of methods. > > Can anyone recommend a way to "tamp down" these high intensity regions? > (Note, I already tried cropping and the image size variation makes this > tedious to do manually). > > Thanks! > -- Best regards, Vladimir S. FONOV ~ vladimir.fonov gmail.com From louis.collins at mcgill.ca Wed Mar 2 14:46:40 2016 From: louis.collins at mcgill.ca (Louis Collins, Dr.) Date: Wed, 2 Mar 2016 19:46:40 +0000 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: References: Message-ID: <0B2496E3-7C31-47D7-ADE4-B200BB0A8542@mcgill.ca> hi, if you have a guestimate of values of interest, try ?mincmath -clamp? -L > On Mar 2, 2016, at 2:24 PM, Gabriel A. Devenyi wrote: > > Hi all, > > I'm working with some data where the scan range is very large, and fat > deposits (in the neck) or the subject's shoulders have far higher > intensities than the brain tissue. > > This breaks bestlinreg and similar "blur and register" types of methods. > > Can anyone recommend a way to "tamp down" these high intensity regions? > (Note, I already tried cropping and the image size variation makes this > tedious to do manually). > > Thanks! > > -- > Gabriel A. Devenyi B.Eng. Ph.D. > Research Computing Associate > Computational Brain Anatomy Laboratory > Cerebral Imaging Center > Douglas Mental Health University Institute > McGill University > t: 514.761.6131x4781 > e: gdevenyi at gmail.com > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From gdevenyi at gmail.com Wed Mar 2 14:47:33 2016 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Wed, 2 Mar 2016 14:47:33 -0500 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: <56D742A9.3040608@gmail.com> References: <56D742A9.3040608@gmail.com> Message-ID: That's what I'm using, yes. -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Wed, Mar 2, 2016 at 2:44 PM, Vladimir S. FONOV wrote: > Did you try bestlinreg_s -nmi ? > > On 16-03-02 02:24 PM, Gabriel A. Devenyi wrote: > >> Hi all, >> >> I'm working with some data where the scan range is very large, and fat >> deposits (in the neck) or the subject's shoulders have far higher >> intensities than the brain tissue. >> >> This breaks bestlinreg and similar "blur and register" types of methods. >> >> Can anyone recommend a way to "tamp down" these high intensity regions? >> (Note, I already tried cropping and the image size variation makes this >> tedious to do manually). >> >> Thanks! >> >> > > -- > Best regards, > > Vladimir S. FONOV ~ vladimir.fonov gmail.com > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From gdevenyi at gmail.com Wed Mar 2 15:31:21 2016 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Wed, 2 Mar 2016 15:31:21 -0500 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: <0B2496E3-7C31-47D7-ADE4-B200BB0A8542@mcgill.ca> References: <0B2496E3-7C31-47D7-ADE4-B200BB0A8542@mcgill.ca> Message-ID: Thanks Dr. Collins, Looks like this winsorizes the intensity to the range, I was already trying that method out with a minccalc hack, this is much nicer. -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Wed, Mar 2, 2016 at 2:46 PM, Louis Collins, Dr. wrote: > hi, > > if you have a guestimate of values of interest, try ?mincmath -clamp? > > -L > > On Mar 2, 2016, at 2:24 PM, Gabriel A. Devenyi > wrote: > > > > Hi all, > > > > I'm working with some data where the scan range is very large, and fat > > deposits (in the neck) or the subject's shoulders have far higher > > intensities than the brain tissue. > > > > This breaks bestlinreg and similar "blur and register" types of methods. > > > > Can anyone recommend a way to "tamp down" these high intensity regions? > > (Note, I already tried cropping and the image size variation makes this > > tedious to do manually). > > > > Thanks! > > > > -- > > Gabriel A. Devenyi B.Eng. Ph.D. > > Research Computing Associate > > Computational Brain Anatomy Laboratory > > Cerebral Imaging Center > > Douglas Mental Health University Institute > > McGill University > > t: 514.761.6131x4781 > > e: gdevenyi at gmail.com > > _______________________________________________ > > 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 gdevenyi at gmail.com Wed Mar 2 15:40:57 2016 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Wed, 2 Mar 2016 15:40:57 -0500 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: <56D742A9.3040608@gmail.com> References: <56D742A9.3040608@gmail.com> Message-ID: Followup, it turns out bestlinreg_s wasn't using -nmi even if you specified it (unless it was for a secondary target) See PR to fix here https://github.com/BIC-MNI/EZminc/pull/3 -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Wed, Mar 2, 2016 at 2:44 PM, Vladimir S. FONOV wrote: > Did you try bestlinreg_s -nmi ? > > On 16-03-02 02:24 PM, Gabriel A. Devenyi wrote: > >> Hi all, >> >> I'm working with some data where the scan range is very large, and fat >> deposits (in the neck) or the subject's shoulders have far higher >> intensities than the brain tissue. >> >> This breaks bestlinreg and similar "blur and register" types of methods. >> >> Can anyone recommend a way to "tamp down" these high intensity regions? >> (Note, I already tried cropping and the image size variation makes this >> tedious to do manually). >> >> Thanks! >> >> > > -- > Best regards, > > Vladimir S. FONOV ~ vladimir.fonov gmail.com > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Wed Mar 2 15:43:56 2016 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 3 Mar 2016 06:43:56 +1000 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: References: Message-ID: if they represent a small part of the image, have a try with mincnorm. it uses histogram pcts. a On 03/03/2016 5:26 AM, "Gabriel A. Devenyi" wrote: > Hi all, > > I'm working with some data where the scan range is very large, and fat > deposits (in the neck) or the subject's shoulders have far higher > intensities than the brain tissue. > > This breaks bestlinreg and similar "blur and register" types of methods. > > Can anyone recommend a way to "tamp down" these high intensity regions? > (Note, I already tried cropping and the image size variation makes this > tedious to do manually). > > Thanks! > > -- > Gabriel A. Devenyi B.Eng. Ph.D. > Research Computing Associate > Computational Brain Anatomy Laboratory > Cerebral Imaging Center > Douglas Mental Health University Institute > McGill University > t: 514.761.6131x4781 > e: gdevenyi at gmail.com > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From gdevenyi at gmail.com Wed Mar 2 16:00:41 2016 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Wed, 2 Mar 2016 16:00:41 -0500 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: References: Message-ID: Thanks Andrew, I was investigating mincnorm, looks like I can do the same thing as with -clamp, with the addition of rescaling the range. I was intending to use mincmath -clamp by computing the -pctT from mincstats anyways, is there any other cleverness going on that makes this implementation different? -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Wed, Mar 2, 2016 at 3:43 PM, Andrew Janke wrote: > if they represent a small part of the image, have a try with mincnorm. it > uses histogram pcts. > > a > On 03/03/2016 5:26 AM, "Gabriel A. Devenyi" wrote: > > > Hi all, > > > > I'm working with some data where the scan range is very large, and fat > > deposits (in the neck) or the subject's shoulders have far higher > > intensities than the brain tissue. > > > > This breaks bestlinreg and similar "blur and register" types of methods. > > > > Can anyone recommend a way to "tamp down" these high intensity regions? > > (Note, I already tried cropping and the image size variation makes this > > tedious to do manually). > > > > Thanks! > > > > -- > > Gabriel A. Devenyi B.Eng. Ph.D. > > Research Computing Associate > > Computational Brain Anatomy Laboratory > > Cerebral Imaging Center > > Douglas Mental Health University Institute > > McGill University > > t: 514.761.6131x4781 > > e: gdevenyi at gmail.com > > _______________________________________________ > > 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 a.janke at gmail.com Wed Mar 2 16:06:21 2016 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 3 Mar 2016 07:06:21 +1000 Subject: [MINC-users] Hyperintensities in T1 images In-Reply-To: References: Message-ID: no extra clever. mincnorm merely wraps this process and the subsequent minccalc call up for you. as per most minc things, use -verbose to see what's going on. a On 03/03/2016 7:02 AM, "Gabriel A. Devenyi" wrote: > Thanks Andrew, > > I was investigating mincnorm, looks like I can do the same thing as with > -clamp, with the addition of rescaling the range. > > I was intending to use mincmath -clamp by computing the -pctT from > mincstats anyways, is there any other cleverness going on that makes this > implementation different? > > -- > Gabriel A. Devenyi B.Eng. Ph.D. > Research Computing Associate > Computational Brain Anatomy Laboratory > Cerebral Imaging Center > Douglas Mental Health University Institute > McGill University > t: 514.761.6131x4781 > e: gdevenyi at gmail.com > > On Wed, Mar 2, 2016 at 3:43 PM, Andrew Janke wrote: > > > if they represent a small part of the image, have a try with mincnorm. it > > uses histogram pcts. > > > > a > > On 03/03/2016 5:26 AM, "Gabriel A. Devenyi" wrote: > > > > > Hi all, > > > > > > I'm working with some data where the scan range is very large, and fat > > > deposits (in the neck) or the subject's shoulders have far higher > > > intensities than the brain tissue. > > > > > > This breaks bestlinreg and similar "blur and register" types of > methods. > > > > > > Can anyone recommend a way to "tamp down" these high intensity regions? > > > (Note, I already tried cropping and the image size variation makes this > > > tedious to do manually). > > > > > > Thanks! > > > > > > -- > > > Gabriel A. Devenyi B.Eng. Ph.D. > > > Research Computing Associate > > > Computational Brain Anatomy Laboratory > > > Cerebral Imaging Center > > > Douglas Mental Health University Institute > > > McGill University > > > t: 514.761.6131x4781 > > > e: gdevenyi at gmail.com > > > _______________________________________________ > > > 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 > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From andrew at biospective.com Wed Mar 2 23:38:21 2016 From: andrew at biospective.com (Andrew Wood) Date: Wed, 2 Mar 2016 23:38:21 -0500 Subject: [MINC-users] Building xfm2def Message-ID: Hi all, It looks like minctools isn't currently configured to build xfm2def. I tried adding it to the CMakeLists.txt, but I'm getting errors: minc-toolkit-v2/minctools/progs/xfm/xfm2def.c: In function ?main?: minc-toolkit-v2/minctools/progs/xfm/xfm2def.c:96:4: error: unknown type name ?progress_struct? progress_struct progress; ^ ... Is there a reason that it's not part of the standard build? If not, is there an easy way to add it? Or will it require development to bring it in line with the latest version of the libraries? Thanks, Andrew From andrew at biospective.com Thu Mar 3 00:14:20 2016 From: andrew at biospective.com (Andrew Wood) Date: Thu, 3 Mar 2016 00:14:20 -0500 Subject: [MINC-users] Building xfm2def In-Reply-To: References: Message-ID: Hi again, I managed to build xfm2def (I'll issue a small pull request to update for VIO), but I'm not sure what to make of it's behaviour. I'm trying to use it to approximate a linear transform as a deformation grid. I ran xfm2def on a "-rotations 30 30 30" xfm, then used it in mincresample to rotate a make_phantom volume (grid and phantom sampled like each other). Here's the result: https://drive.google.com/file/d/0BzcZlhs8X1gFWUNQa2RMd3o3dTg/view?usp=sharing Are there limitations in xfm2def that would prevent it from approximating a linear transform like this? Thanks, Andrew On Wed, Mar 2, 2016 at 11:38 PM, Andrew Wood wrote: > > Hi all, > > It looks like minctools isn't currently configured to build xfm2def. I > tried adding it to the CMakeLists.txt, but I'm getting errors: > > minc-toolkit-v2/minctools/progs/xfm/xfm2def.c: In function ?main?: > minc-toolkit-v2/minctools/progs/xfm/xfm2def.c:96:4: error: unknown type > name ?progress_struct? > progress_struct progress; > ^ > ... > > Is there a reason that it's not part of the standard build? If not, is > there an easy way to add it? Or will it require development to bring it in > line with the latest version of the libraries? > > Thanks, > Andrew > From a.janke at gmail.com Thu Mar 3 00:38:34 2016 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 3 Mar 2016 15:38:34 +1000 Subject: [MINC-users] Building xfm2def In-Reply-To: References: Message-ID: Hi Andrew, This should be fine for xfm2def, which component of the vector field are you viewing in register? X? The use case you describe is exactly what it was written for. You generally have to specify a large number of input parameters to xfm2def (start, step, nelem) in order to get what you want output. I thought there was a version floating around in which I implemented a -like option but a quick search would say that I'm wrong. a On 3 March 2016 at 15:14, Andrew Wood wrote: > Hi again, > > I managed to build xfm2def (I'll issue a small pull request to update for > VIO), but I'm not sure what to make of it's behaviour. I'm trying to use it > to approximate a linear transform as a deformation grid. > > I ran xfm2def on a "-rotations 30 30 30" xfm, then used it in mincresample > to rotate a make_phantom volume (grid and phantom sampled like each other). > Here's the result: > > https://drive.google.com/file/d/0BzcZlhs8X1gFWUNQa2RMd3o3dTg/view?usp=sharing > > Are there limitations in xfm2def that would prevent it from approximating a > linear transform like this? > > Thanks, > Andrew > > On Wed, Mar 2, 2016 at 11:38 PM, Andrew Wood wrote: > >> >> Hi all, >> >> It looks like minctools isn't currently configured to build xfm2def. I >> tried adding it to the CMakeLists.txt, but I'm getting errors: >> >> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c: In function ?main?: >> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c:96:4: error: unknown type >> name ?progress_struct? >> progress_struct progress; >> ^ >> ... >> >> Is there a reason that it's not part of the standard build? If not, is >> there an easy way to add it? Or will it require development to bring it in >> line with the latest version of the libraries? >> >> Thanks, >> Andrew >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From andrew at biospective.com Thu Mar 3 07:43:14 2016 From: andrew at biospective.com (Andrew Wood) Date: Thu, 3 Mar 2016 07:43:14 -0500 Subject: [MINC-users] Building xfm2def In-Reply-To: References: Message-ID: Hi Andrew, I didn't open the grid directly, but rather showed what happened after applying it to a 3D volume. Instead of passing parameters to xfm2def to control the grid output, I used make_phantom parameters to make my data match xfm2def's defaults. Here's what I mean: $ xfm2param -rotations 30 30 30 ./rotations.xfm $ xfm2def ./rotations.xfm ./grid.mnc $ vim ./grid.xfm # write an xfm for the deformation field $ mincinfo ./grid.mnc dimension name length step start -------------- ------ ---- ----- xspace 100 1 -50 yspace 100 1 -50 zspace 100 1 -50 vector_dimension 3 unknown unknown $ make_phantom -xstart -50 -ystart -50 -zstart -50 -xstep 1 -ystep 1 -zstep 1 -xnelements 100 -ynelements 100 -znelements 100 ./phantom.mnc -xcenter 0 -ycenter 0 -zcenter 0 $ mincresample -transformation ./grid.xfm phantom.mnc phantom_rotated.mnc -use_input_sampling Here is the phantom, and the rotated phantom: https://drive.google.com/file/d/0BzcZlhs8X1gFZkZuSUtWRkFxcHM/view?usp=sharing Best, Andrew On Thu, Mar 3, 2016 at 12:38 AM, Andrew Janke wrote: > Hi Andrew, > > This should be fine for xfm2def, which component of the vector field > are you viewing in register? X? The use case you describe is exactly > what it was written for. > > You generally have to specify a large number of input parameters to > xfm2def (start, step, nelem) in order to get what you want output. I > thought there was a version floating around in which I implemented a > -like option but a quick search would say that I'm wrong. > > > a > > > On 3 March 2016 at 15:14, Andrew Wood wrote: > > Hi again, > > > > I managed to build xfm2def (I'll issue a small pull request to update for > > VIO), but I'm not sure what to make of it's behaviour. I'm trying to use > it > > to approximate a linear transform as a deformation grid. > > > > I ran xfm2def on a "-rotations 30 30 30" xfm, then used it in > mincresample > > to rotate a make_phantom volume (grid and phantom sampled like each > other). > > Here's the result: > > > > > https://drive.google.com/file/d/0BzcZlhs8X1gFWUNQa2RMd3o3dTg/view?usp=sharing > > > > Are there limitations in xfm2def that would prevent it from > approximating a > > linear transform like this? > > > > Thanks, > > Andrew > > > > On Wed, Mar 2, 2016 at 11:38 PM, Andrew Wood > wrote: > > > >> > >> Hi all, > >> > >> It looks like minctools isn't currently configured to build xfm2def. I > >> tried adding it to the CMakeLists.txt, but I'm getting errors: > >> > >> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c: In function ?main?: > >> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c:96:4: error: unknown type > >> name ?progress_struct? > >> progress_struct progress; > >> ^ > >> ... > >> > >> Is there a reason that it's not part of the standard build? If not, is > >> there an easy way to add it? Or will it require development to bring it > in > >> line with the latest version of the libraries? > >> > >> Thanks, > >> Andrew > >> > > _______________________________________________ > > 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 a.janke at gmail.com Thu Mar 3 08:22:04 2016 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 3 Mar 2016 23:22:04 +1000 Subject: [MINC-users] Building xfm2def In-Reply-To: References: Message-ID: Hi Andrew, I took a quick look at this and something is amiss. If I add a -double argument to the xfm2def line I get something much closer to what I'd expect. My guess is that there is a data discretisation issue afoot. If memory serves me correctly at some stage grid volumes for non-linear transforms changed from short to double due to issues like this and addition of small errors when making MDA's. Perhaps this has something to do with it. Can you file a issue for this in minc-toolkit? Thanks a On 3 March 2016 at 22:43, Andrew Wood wrote: > Hi Andrew, > > I didn't open the grid directly, but rather showed what happened after > applying it to a 3D volume. > > Instead of passing parameters to xfm2def to control the grid output, I used > make_phantom parameters to make my data match xfm2def's defaults. Here's > what I mean: > > $ xfm2param -rotations 30 30 30 ./rotations.xfm > $ xfm2def ./rotations.xfm ./grid.mnc > $ vim ./grid.xfm # write an xfm for the deformation field > > $ mincinfo ./grid.mnc > dimension name length step start > -------------- ------ ---- ----- > xspace 100 1 -50 > yspace 100 1 -50 > zspace 100 1 -50 > vector_dimension 3 unknown unknown > > $ make_phantom -xstart -50 -ystart -50 -zstart -50 -xstep 1 -ystep 1 -zstep > 1 -xnelements 100 -ynelements 100 -znelements 100 ./phantom.mnc -xcenter 0 > -ycenter 0 -zcenter 0 > > $ mincresample -transformation ./grid.xfm phantom.mnc phantom_rotated.mnc > -use_input_sampling > > > Here is the phantom, and the rotated phantom: > > https://drive.google.com/file/d/0BzcZlhs8X1gFZkZuSUtWRkFxcHM/view?usp=sharing > > > Best, > Andrew > > > > On Thu, Mar 3, 2016 at 12:38 AM, Andrew Janke wrote: > >> Hi Andrew, >> >> This should be fine for xfm2def, which component of the vector field >> are you viewing in register? X? The use case you describe is exactly >> what it was written for. >> >> You generally have to specify a large number of input parameters to >> xfm2def (start, step, nelem) in order to get what you want output. I >> thought there was a version floating around in which I implemented a >> -like option but a quick search would say that I'm wrong. >> >> >> a >> >> >> On 3 March 2016 at 15:14, Andrew Wood wrote: >> > Hi again, >> > >> > I managed to build xfm2def (I'll issue a small pull request to update for >> > VIO), but I'm not sure what to make of it's behaviour. I'm trying to use >> it >> > to approximate a linear transform as a deformation grid. >> > >> > I ran xfm2def on a "-rotations 30 30 30" xfm, then used it in >> mincresample >> > to rotate a make_phantom volume (grid and phantom sampled like each >> other). >> > Here's the result: >> > >> > >> https://drive.google.com/file/d/0BzcZlhs8X1gFWUNQa2RMd3o3dTg/view?usp=sharing >> > >> > Are there limitations in xfm2def that would prevent it from >> approximating a >> > linear transform like this? >> > >> > Thanks, >> > Andrew >> > >> > On Wed, Mar 2, 2016 at 11:38 PM, Andrew Wood >> wrote: >> > >> >> >> >> Hi all, >> >> >> >> It looks like minctools isn't currently configured to build xfm2def. I >> >> tried adding it to the CMakeLists.txt, but I'm getting errors: >> >> >> >> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c: In function ?main?: >> >> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c:96:4: error: unknown type >> >> name ?progress_struct? >> >> progress_struct progress; >> >> ^ >> >> ... >> >> >> >> Is there a reason that it's not part of the standard build? If not, is >> >> there an easy way to add it? Or will it require development to bring it >> in >> >> line with the latest version of the libraries? >> >> >> >> Thanks, >> >> Andrew >> >> >> > _______________________________________________ >> > 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 >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From vladimir.fonov at gmail.com Thu Mar 3 09:23:11 2016 From: vladimir.fonov at gmail.com (Vladimir S. Fonov) Date: Thu, 3 Mar 2016 09:23:11 -0500 Subject: [MINC-users] Building xfm2def In-Reply-To: References: Message-ID: <56D848CF.5020908@gmail.com> Hello, another suggestion, if you want to play with xfm2def - you can use xfm_normalize.pl script ( https://github.com/BIC-MNI/EZminc/blob/master/scripts/xfm_normalize.pl ) It's a wrapper around xfm2def that extracts sampling parameter from another minc file, i.e xfm_normalize.pl input.xfm output.xfm --like --step 4.0 - will extract bounding box from and creata an .xfm file with _grid_0.mnc created by xfm2def , that will cover the bounding box with a given step size. If you want to match sampling of another minc file exactly - you can specify --exact flag. Another useful option is --invert - it inverts input xfm file before calling xfm2def. On 16-03-03 07:43 AM, Andrew Wood wrote: > Hi Andrew, > > I didn't open the grid directly, but rather showed what happened after > applying it to a 3D volume. > > Instead of passing parameters to xfm2def to control the grid output, I used > make_phantom parameters to make my data match xfm2def's defaults. Here's > what I mean: > > $ xfm2param -rotations 30 30 30 ./rotations.xfm > $ xfm2def ./rotations.xfm ./grid.mnc > $ vim ./grid.xfm # write an xfm for the deformation field > > $ mincinfo ./grid.mnc > dimension name length step start > -------------- ------ ---- ----- > xspace 100 1 -50 > yspace 100 1 -50 > zspace 100 1 -50 > vector_dimension 3 unknown unknown > > $ make_phantom -xstart -50 -ystart -50 -zstart -50 -xstep 1 -ystep 1 -zstep > 1 -xnelements 100 -ynelements 100 -znelements 100 ./phantom.mnc -xcenter 0 > -ycenter 0 -zcenter 0 > > $ mincresample -transformation ./grid.xfm phantom.mnc phantom_rotated.mnc > -use_input_sampling > > > Here is the phantom, and the rotated phantom: > > https://drive.google.com/file/d/0BzcZlhs8X1gFZkZuSUtWRkFxcHM/view?usp=sharing > > > Best, > Andrew > > > > On Thu, Mar 3, 2016 at 12:38 AM, Andrew Janke wrote: > >> Hi Andrew, >> >> This should be fine for xfm2def, which component of the vector field >> are you viewing in register? X? The use case you describe is exactly >> what it was written for. >> >> You generally have to specify a large number of input parameters to >> xfm2def (start, step, nelem) in order to get what you want output. I >> thought there was a version floating around in which I implemented a >> -like option but a quick search would say that I'm wrong. >> >> >> a >> >> >> On 3 March 2016 at 15:14, Andrew Wood wrote: >>> Hi again, >>> >>> I managed to build xfm2def (I'll issue a small pull request to update for >>> VIO), but I'm not sure what to make of it's behaviour. I'm trying to use >> it >>> to approximate a linear transform as a deformation grid. >>> >>> I ran xfm2def on a "-rotations 30 30 30" xfm, then used it in >> mincresample >>> to rotate a make_phantom volume (grid and phantom sampled like each >> other). >>> Here's the result: >>> >>> >> https://drive.google.com/file/d/0BzcZlhs8X1gFWUNQa2RMd3o3dTg/view?usp=sharing >>> >>> Are there limitations in xfm2def that would prevent it from >> approximating a >>> linear transform like this? >>> >>> Thanks, >>> Andrew >>> >>> On Wed, Mar 2, 2016 at 11:38 PM, Andrew Wood >> wrote: >>> >>>> >>>> Hi all, >>>> >>>> It looks like minctools isn't currently configured to build xfm2def. I >>>> tried adding it to the CMakeLists.txt, but I'm getting errors: >>>> >>>> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c: In function ?main?: >>>> minc-toolkit-v2/minctools/progs/xfm/xfm2def.c:96:4: error: unknown type >>>> name ?progress_struct? >>>> progress_struct progress; >>>> ^ >>>> ... >>>> >>>> Is there a reason that it's not part of the standard build? If not, is >>>> there an easy way to add it? Or will it require development to bring it >> in >>>> line with the latest version of the libraries? From redoute at cermep.fr Thu Mar 3 09:58:32 2016 From: redoute at cermep.fr (=?UTF-8?B?SsOpcsO0bWUgUmVkb3V0w6k=?=) Date: Thu, 3 Mar 2016 15:58:32 +0100 Subject: [MINC-users] new release of minc-toolkit In-Reply-To: References: <56BB62EE.1000708@gmail.com> <56BDA86B.4040701@cermep.fr> Message-ID: <56D85118.3030309@cermep.fr> Hi Robert, Have you any news about this problem? Thanks Jerome Le 12/02/2016 15:28, Robert D. Vincent a ?crit : > Hi J?r?me, > > Thank you for the report - I'll look into it. > > -bert > > On Fri, Feb 12, 2016 at 4:39 AM, J?r?me Redout? wrote: > >> Thank you for this new release! >> >> I have a problem with the mnc2nii function: >> >> 1: convertion of Dynamic PET data from DICOM to MINC with dcm2mnc is OK >> 2: PET_DYN.mnc to PET_DYN.nii with mnc2nii is OK >> >> but >> >> if I make an average file of my PET_DYN with mincaverage -avgdim time >> and then >> >> mnc2nii PET_DYN_avg.mnc PET_DYN_avg.nii >> >> It crashes with: >> >> *** Error in `mnc2nii': munmap_chunk(): invalid pointer: >>> 0x000000000090cb50 *** >>> >> thanks for your help >> >> Jerome >> >> >> >> >> Le 10/02/2016 17:18, Vladimir S. FONOV a ?crit : >> >>> Hello Everybody, >>> >>> >>> I made a new release of minc-toolkit, standard branch - version 1.0.08 >>> and v2 branch - version 1.9.11. It includes all the latest versions of >>> minc tools (as of 2nd of February 2016). V2 branch includes ITK 4.9 library >>> and latest versions of ANTs and Elastix. V2 branch now also includes tools >>> for patch-based segmentations ( see >>> https://github.com/vfonov/patch_morphology ). >>> >>> MacOSX version was updated to work properly on 10.11 ( El Capitan). >>> Unfortunately I was not able to build v2 branch for older (10.7) version, >>> so only the standard branch is available to folks who are stuck with old >>> version of MacOS X. >>> >>> All the binary packages are downloadable from >>> http://www.bic.mni.mcgill.ca/ServicesSoftware/ServicesSoftwareMincToolKit >>> >>> >>> Note that web page http://www.mcgill.ca/bic/software/minc/minctoolkit is >>> out of date! >>> >> >> -- >> ================================================================== >> J?r?me Redout? >> Ph.D. - Ing?nieur de Recherche - Universit? Claude Bernard - Lyon1 >> CERMEP - Imagerie du vivant >> 59 Bd Pinel. 69677 Bron - FRANCE >> tel : 33 (0)4 72 68 86 18 (bureau) >> tel : 33 (0)4 72 68 86 00 (standard) >> fax : 33 (0)4 72 68 86 10 >> ================================================================== >> >> >> _______________________________________________ >> 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 > -- ================================================================== J?r?me Redout? Ph.D. - Ing?nieur de Recherche - Universit? Claude Bernard - Lyon1 CERMEP - Imagerie du vivant 59 Bd Pinel. 69677 Bron - FRANCE tel : 33 (0)4 72 68 86 18 (bureau) tel : 33 (0)4 72 68 86 00 (standard) fax : 33 (0)4 72 68 86 10 ================================================================== From robert.d.vincent at mcgill.ca Thu Mar 3 10:06:20 2016 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Thu, 3 Mar 2016 10:06:20 -0500 Subject: [MINC-users] new release of minc-toolkit In-Reply-To: <56D85118.3030309@cermep.fr> References: <56BB62EE.1000708@gmail.com> <56BDA86B.4040701@cermep.fr> <56D85118.3030309@cermep.fr> Message-ID: HI Jerome, Not yet. The problem lies with the mincaverage function, I believe, but I don't have a solution yet. -bert On Thu, Mar 3, 2016 at 9:58 AM, J?r?me Redout? wrote: > Hi Robert, > Have you any news about this problem? > Thanks > Jerome > > > Le 12/02/2016 15:28, Robert D. Vincent a ?crit : > >> Hi J?r?me, >> >> Thank you for the report - I'll look into it. >> >> -bert >> >> On Fri, Feb 12, 2016 at 4:39 AM, J?r?me Redout? >> wrote: >> >> Thank you for this new release! >>> >>> I have a problem with the mnc2nii function: >>> >>> 1: convertion of Dynamic PET data from DICOM to MINC with dcm2mnc is OK >>> 2: PET_DYN.mnc to PET_DYN.nii with mnc2nii is OK >>> >>> but >>> >>> if I make an average file of my PET_DYN with mincaverage -avgdim time >>> and then >>> >>> mnc2nii PET_DYN_avg.mnc PET_DYN_avg.nii >>> >>> It crashes with: >>> >>> *** Error in `mnc2nii': munmap_chunk(): invalid pointer: >>> >>>> 0x000000000090cb50 *** >>>> >>>> thanks for your help >>> >>> Jerome >>> >>> >>> >>> >>> Le 10/02/2016 17:18, Vladimir S. FONOV a ?crit : >>> >>> Hello Everybody, >>>> >>>> >>>> I made a new release of minc-toolkit, standard branch - version 1.0.08 >>>> and v2 branch - version 1.9.11. It includes all the latest versions of >>>> minc tools (as of 2nd of February 2016). V2 branch includes ITK 4.9 >>>> library >>>> and latest versions of ANTs and Elastix. V2 branch now also includes >>>> tools >>>> for patch-based segmentations ( see >>>> https://github.com/vfonov/patch_morphology ). >>>> >>>> MacOSX version was updated to work properly on 10.11 ( El Capitan). >>>> Unfortunately I was not able to build v2 branch for older (10.7) >>>> version, >>>> so only the standard branch is available to folks who are stuck with old >>>> version of MacOS X. >>>> >>>> All the binary packages are downloadable from >>>> >>>> http://www.bic.mni.mcgill.ca/ServicesSoftware/ServicesSoftwareMincToolKit >>>> >>>> >>>> Note that web page http://www.mcgill.ca/bic/software/minc/minctoolkit >>>> is >>>> out of date! >>>> >>>> >>> -- >>> ================================================================== >>> J?r?me Redout? >>> Ph.D. - Ing?nieur de Recherche - Universit? Claude Bernard - Lyon1 >>> CERMEP - Imagerie du vivant >>> 59 Bd Pinel. 69677 Bron - FRANCE >>> tel : 33 (0)4 72 68 86 18 (bureau) >>> tel : 33 (0)4 72 68 86 00 (standard) >>> fax : 33 (0)4 72 68 86 10 >>> ================================================================== >>> >>> >>> _______________________________________________ >>> 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 >> >> > > -- > ================================================================== > J?r?me Redout? > Ph.D. - Ing?nieur de Recherche - Universit? Claude Bernard - Lyon1 > CERMEP - Imagerie du vivant > 59 Bd Pinel. 69677 Bron - FRANCE > tel : 33 (0)4 72 68 86 18 (bureau) > tel : 33 (0)4 72 68 86 00 (standard) > fax : 33 (0)4 72 68 86 10 > ================================================================== > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From mishkind at gmail.com Mon Mar 7 21:20:06 2016 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Mon, 7 Mar 2016 16:20:06 -1000 Subject: [MINC-users] processing rootvariable in mincheader Message-ID: Hi, Can anyone provide some insight about the processing rootvariable in the mincheader. It contains attributes like processing:transformation0-filename processing:transformation0-filedata processing:transformation1-inverted I'm finding that I get different results from minctracc depending on if a file has a transformation listed in here or not. Below is an example header. If I use mincedit and remove the processing rootvariable and all it's attributes altogether I get _different_ results. I'm still trying to figure out which is the _right_ answer. Might have to do with my version of minctracc too. thanks, mishkin $ mincheader *nonbrain.mnc.gz netcdf mincheader-21838-tmp { dimensions: zspace = 60 ; yspace = 256 ; xspace = 256 ; variables: int rootvariable ; rootvariable:varid = "MINC standard variable" ; rootvariable:vartype = "group________" ; rootvariable:version = "MINC Version 1.0" ; rootvariable:parent = "" ; rootvariable:children = "image\n", "processing" ; int processing ; processing:parent = "rootvariable" ; processing:transformation0-filename = "/tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm" ; processing:transformation0-filedata = "MNI Transform File\n", "%Mon Mar 7 06:17:48 2016>>> /usr/local/mni/bin/minctracc /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8_dxyz.mnc /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_dxyz.mnc /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm -transformation /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8tmp2c.xfm -lsq9 -xcorr -model_mask /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_mask.mnc -center 0.016856 -21.055166 -3.738050 -step 4 4 4 -tol 0.004 -simplex 2\n", "%(Package mni_autoreg 0.99.2, compiled by rotor at romeo (i686-pc-linux-gnu) on Mon May 8 23:16:34 EDT 2006)\n", "\n", "Transform_Type = Linear;\n", "Linear_Transform =\n", " 1.17811584472656 0.00353206926956773 -0.0036923938896507 0.387569785118103\n", " -0.00324956281110644 1.08965194225311 0.00551541242748499 2.76728820800781\n", " 0.00381157570518553 -0.00611468823626637 1.21029341220856 2.98504638671875;\n", "" ; processing:transformation1-filename = "/tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm" ; processing:transformation1-filedata = "MNI Transform File\n", "%Mon Mar 7 06:17:48 2016>>> /usr/local/mni/bin/minctracc /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8_dxyz.mnc /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_dxyz.mnc /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm -transformation /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8tmp2c.xfm -lsq9 -xcorr -model_mask /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_mask.mnc -center 0.016856 -21.055166 -3.738050 -step 4 4 4 -tol 0.004 -simplex 2\n", "%(Package mni_autoreg 0.99.2, compiled by rotor at romeo (i686-pc-linux-gnu) on Mon May 8 23:16:34 EDT 2006)\n", "\n", "Transform_Type = Linear;\n", "Linear_Transform =\n", " 1.17811584472656 0.00353206926956773 -0.0036923938896507 0.387569785118103\n", " -0.00324956281110644 1.08965194225311 0.00551541242748499 2.76728820800781\n", " 0.00381157570518553 -0.00611468823626637 1.21029341220856 2.98504638671875;\n", "" ; processing:transformation1-inverted = "true_" ; int zspace ; zspace:varid = "MINC standard variable" ; zspace:vartype = "dimension____" ; zspace:version = "MINC Version 1.0" ; zspace:comments = "Z increases from patient inferior to superior" ; zspace:spacing = "regular__" ; zspace:alignment = "centre" ; zspace:step = 3. ; zspace:start = -72. ; zspace:direction_cosines = 0., 0., 1. ; zspace:units = "mm" ; zspace:spacetype = "talairach_" ; int yspace ; yspace:varid = "MINC standard variable" ; yspace:vartype = "dimension____" ; yspace:version = "MINC Version 1.0" ; yspace:comments = "Y increases from patient posterior to anterior" ; yspace:spacing = "regular__" ; yspace:alignment = "centre" ; yspace:step = 1. ; yspace:start = -126. ; yspace:direction_cosines = 0., 1., 0. ; yspace:units = "mm" ; yspace:spacetype = "talairach_" ; int xspace ; xspace:varid = "MINC standard variable" ; xspace:vartype = "dimension____" ; xspace:version = "MINC Version 1.0" ; xspace:comments = "X increases from patient left to right" ; xspace:spacing = "regular__" ; xspace:alignment = "centre" ; xspace:step = 1. ; xspace:start = -90. ; xspace:direction_cosines = 1., 0., 0. ; xspace:units = "mm" ; xspace:spacetype = "talairach_" ; double image-max(zspace) ; image-max:varid = "MINC standard variable" ; image-max:vartype = "var_attribute" ; image-max:version = "MINC Version 1.0" ; image-max:_FillValue = 1. ; image-max:parent = "image" ; double image-min(zspace) ; image-min:varid = "MINC standard variable" ; image-min:vartype = "var_attribute" ; image-min:version = "MINC Version 1.0" ; image-min:_FillValue = 0. ; image-min:parent = "image" ; short image(zspace, yspace, xspace) ; image:parent = "rootvariable" ; image:varid = "MINC standard variable" ; image:vartype = "group________" ; image:version = "MINC Version 1.0" ; image:image-max = "--->image-max" ; image:image-min = "--->image-min" ; image:complete = "true_" ; image:signtype = "unsigned" ; image:valid_range = 0., 65535. ; // global attributes: :history = "Mon Mar 7 06:17:29 2016>>> minccalc -clobber -expression A[0]<=0.1 && A[0]>=-0.1 ? A[1]:0 /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/dilated_brain.mask.mnc /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6.mnc.gz /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_native.mnc\n", "Mon Mar 7 06:17:50 2016>>> mincresample -clobber -like /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric.mnc -transformation /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_native.mnc /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx.mnc\n", "Mon Mar 7 06:17:51 2016>>> mincreshape -clobber -dimrange zspace=48,103 /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx.mnc /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx_cropped.mnc\n", "Mon Mar 7 06:17:51 2016>>> mincresample -clobber -like /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6.mnc.gz /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx_cropped.mnc /tmp/TMP.2016-03-07.06:15:58.mi From a.janke at gmail.com Mon Mar 7 22:00:27 2016 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 8 Mar 2016 13:00:27 +1000 Subject: [MINC-users] processing rootvariable in mincheader In-Reply-To: References: Message-ID: Hi Mishkin, The processing variable you speak of to my knowledge is only written by minctracc, I wasn't aware that it read this data back in. Perhaps it's using this as a starting transformation. I haven't ever seen this behaviour but should track this down. To be clear you get different results with minctracc dependent on if a MINC volume has these header fields defined? a On 8 March 2016 at 12:20, Mishkin Derakhshan wrote: > Hi, > Can anyone provide some insight about the processing rootvariable in > the mincheader. It contains attributes like > processing:transformation0-filename > processing:transformation0-filedata > processing:transformation1-inverted > > I'm finding that I get different results from minctracc depending on > if a file has a transformation listed in here or not. > > Below is an example header. If I use mincedit and remove the > processing rootvariable and all it's attributes altogether I get > _different_ results. I'm still trying to figure out which is the > _right_ answer. Might have to do with my version of minctracc too. > > thanks, > mishkin > > $ mincheader *nonbrain.mnc.gz > netcdf mincheader-21838-tmp { > dimensions: > zspace = 60 ; > yspace = 256 ; > xspace = 256 ; > variables: > int rootvariable ; > rootvariable:varid = "MINC standard variable" ; > rootvariable:vartype = "group________" ; > rootvariable:version = "MINC Version 1.0" ; > rootvariable:parent = "" ; > rootvariable:children = "image\n", > "processing" ; > int processing ; > processing:parent = "rootvariable" ; > processing:transformation0-filename = > "/tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm" > ; > processing:transformation0-filedata = "MNI Transform File\n", > "%Mon Mar 7 06:17:48 2016>>> /usr/local/mni/bin/minctracc > /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8_dxyz.mnc > /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_dxyz.mnc > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm > -transformation > /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8tmp2c.xfm > -lsq9 -xcorr -model_mask > /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_mask.mnc > -center 0.016856 -21.055166 -3.738050 -step 4 4 4 -tol 0.004 -simplex > 2\n", > "%(Package mni_autoreg 0.99.2, compiled by rotor at romeo > (i686-pc-linux-gnu) on Mon May 8 23:16:34 EDT 2006)\n", > "\n", > "Transform_Type = Linear;\n", > "Linear_Transform =\n", > " 1.17811584472656 0.00353206926956773 -0.0036923938896507 0.387569785118103\n", > " -0.00324956281110644 1.08965194225311 0.00551541242748499 2.76728820800781\n", > " 0.00381157570518553 -0.00611468823626637 1.21029341220856 > 2.98504638671875;\n", > "" ; > processing:transformation1-filename = > "/tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm" > ; > processing:transformation1-filedata = "MNI Transform File\n", > "%Mon Mar 7 06:17:48 2016>>> /usr/local/mni/bin/minctracc > /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8_dxyz.mnc > /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_dxyz.mnc > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm > -transformation > /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8tmp2c.xfm > -lsq9 -xcorr -model_mask > /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_mask.mnc > -center 0.016856 -21.055166 -3.738050 -step 4 4 4 -tol 0.004 -simplex > 2\n", > "%(Package mni_autoreg 0.99.2, compiled by rotor at romeo > (i686-pc-linux-gnu) on Mon May 8 23:16:34 EDT 2006)\n", > "\n", > "Transform_Type = Linear;\n", > "Linear_Transform =\n", > " 1.17811584472656 0.00353206926956773 -0.0036923938896507 0.387569785118103\n", > " -0.00324956281110644 1.08965194225311 0.00551541242748499 2.76728820800781\n", > " 0.00381157570518553 -0.00611468823626637 1.21029341220856 > 2.98504638671875;\n", > "" ; > processing:transformation1-inverted = "true_" ; > int zspace ; > zspace:varid = "MINC standard variable" ; > zspace:vartype = "dimension____" ; > zspace:version = "MINC Version 1.0" ; > zspace:comments = "Z increases from patient inferior to superior" ; > zspace:spacing = "regular__" ; > zspace:alignment = "centre" ; > zspace:step = 3. ; > zspace:start = -72. ; > zspace:direction_cosines = 0., 0., 1. ; > zspace:units = "mm" ; > zspace:spacetype = "talairach_" ; > int yspace ; > yspace:varid = "MINC standard variable" ; > yspace:vartype = "dimension____" ; > yspace:version = "MINC Version 1.0" ; > yspace:comments = "Y increases from patient posterior to anterior" ; > yspace:spacing = "regular__" ; > yspace:alignment = "centre" ; > yspace:step = 1. ; > yspace:start = -126. ; > yspace:direction_cosines = 0., 1., 0. ; > yspace:units = "mm" ; > yspace:spacetype = "talairach_" ; > int xspace ; > xspace:varid = "MINC standard variable" ; > xspace:vartype = "dimension____" ; > xspace:version = "MINC Version 1.0" ; > xspace:comments = "X increases from patient left to right" ; > xspace:spacing = "regular__" ; > xspace:alignment = "centre" ; > xspace:step = 1. ; > xspace:start = -90. ; > xspace:direction_cosines = 1., 0., 0. ; > xspace:units = "mm" ; > xspace:spacetype = "talairach_" ; > double image-max(zspace) ; > image-max:varid = "MINC standard variable" ; > image-max:vartype = "var_attribute" ; > image-max:version = "MINC Version 1.0" ; > image-max:_FillValue = 1. ; > image-max:parent = "image" ; > double image-min(zspace) ; > image-min:varid = "MINC standard variable" ; > image-min:vartype = "var_attribute" ; > image-min:version = "MINC Version 1.0" ; > image-min:_FillValue = 0. ; > image-min:parent = "image" ; > short image(zspace, yspace, xspace) ; > image:parent = "rootvariable" ; > image:varid = "MINC standard variable" ; > image:vartype = "group________" ; > image:version = "MINC Version 1.0" ; > image:image-max = "--->image-max" ; > image:image-min = "--->image-min" ; > image:complete = "true_" ; > image:signtype = "unsigned" ; > image:valid_range = 0., 65535. ; > > // global attributes: > :history = "Mon Mar 7 06:17:29 2016>>> minccalc -clobber -expression > A[0]<=0.1 && A[0]>=-0.1 ? A[1]:0 > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/dilated_brain.mask.mnc > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6.mnc.gz > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_native.mnc\n", > "Mon Mar 7 06:17:50 2016>>> mincresample -clobber -like > /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric.mnc > -transformation > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_native.mnc > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx.mnc\n", > "Mon Mar 7 06:17:51 2016>>> mincreshape -clobber -dimrange > zspace=48,103 /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx.mnc > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx_cropped.mnc\n", > "Mon Mar 7 06:17:51 2016>>> mincresample -clobber -like > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6.mnc.gz > /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx_cropped.mnc > /tmp/TMP.2016-03-07.06:15:58.mi > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From mishkind at gmail.com Tue Mar 8 16:59:19 2016 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Tue, 8 Mar 2016 11:59:19 -1000 Subject: [MINC-users] processing rootvariable in mincheader In-Reply-To: References: Message-ID: Hi Andrew, I've been trying to simplify the problem down to its most basic reproducible form and in doing so it looks like the problem isn't with minctracc, but somewhere else in my pipeline. If I can get something reproducible I will post it. mishkin On Mon, Mar 7, 2016 at 5:00 PM, Andrew Janke wrote: > Hi Mishkin, > > The processing variable you speak of to my knowledge is only written > by minctracc, I wasn't aware that it read this data back in. Perhaps > it's using this as a starting transformation. > > I haven't ever seen this behaviour but should track this down. To be > clear you get different results with minctracc dependent on if a MINC > volume has these header fields defined? > > > a > > > On 8 March 2016 at 12:20, Mishkin Derakhshan wrote: >> Hi, >> Can anyone provide some insight about the processing rootvariable in >> the mincheader. It contains attributes like >> processing:transformation0-filename >> processing:transformation0-filedata >> processing:transformation1-inverted >> >> I'm finding that I get different results from minctracc depending on >> if a file has a transformation listed in here or not. >> >> Below is an example header. If I use mincedit and remove the >> processing rootvariable and all it's attributes altogether I get >> _different_ results. I'm still trying to figure out which is the >> _right_ answer. Might have to do with my version of minctracc too. >> >> thanks, >> mishkin >> >> $ mincheader *nonbrain.mnc.gz >> netcdf mincheader-21838-tmp { >> dimensions: >> zspace = 60 ; >> yspace = 256 ; >> xspace = 256 ; >> variables: >> int rootvariable ; >> rootvariable:varid = "MINC standard variable" ; >> rootvariable:vartype = "group________" ; >> rootvariable:version = "MINC Version 1.0" ; >> rootvariable:parent = "" ; >> rootvariable:children = "image\n", >> "processing" ; >> int processing ; >> processing:parent = "rootvariable" ; >> processing:transformation0-filename = >> "/tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm" >> ; >> processing:transformation0-filedata = "MNI Transform File\n", >> "%Mon Mar 7 06:17:48 2016>>> /usr/local/mni/bin/minctracc >> /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8_dxyz.mnc >> /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_dxyz.mnc >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm >> -transformation >> /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8tmp2c.xfm >> -lsq9 -xcorr -model_mask >> /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_mask.mnc >> -center 0.016856 -21.055166 -3.738050 -step 4 4 4 -tol 0.004 -simplex >> 2\n", >> "%(Package mni_autoreg 0.99.2, compiled by rotor at romeo >> (i686-pc-linux-gnu) on Mon May 8 23:16:34 EDT 2006)\n", >> "\n", >> "Transform_Type = Linear;\n", >> "Linear_Transform =\n", >> " 1.17811584472656 0.00353206926956773 -0.0036923938896507 0.387569785118103\n", >> " -0.00324956281110644 1.08965194225311 0.00551541242748499 2.76728820800781\n", >> " 0.00381157570518553 -0.00611468823626637 1.21029341220856 >> 2.98504638671875;\n", >> "" ; >> processing:transformation1-filename = >> "/tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm" >> ; >> processing:transformation1-filedata = "MNI Transform File\n", >> "%Mon Mar 7 06:17:48 2016>>> /usr/local/mni/bin/minctracc >> /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8_dxyz.mnc >> /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_dxyz.mnc >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm >> -transformation >> /tmp/1371178.1.nrx2.short.q/mritotal_9798//MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6_8tmp2c.xfm >> -lsq9 -xcorr -model_mask >> /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric_8_mask.mnc >> -center 0.016856 -21.055166 -3.738050 -step 4 4 4 -tol 0.004 -simplex >> 2\n", >> "%(Package mni_autoreg 0.99.2, compiled by rotor at romeo >> (i686-pc-linux-gnu) on Mon May 8 23:16:34 EDT 2006)\n", >> "\n", >> "Transform_Type = Linear;\n", >> "Linear_Transform =\n", >> " 1.17811584472656 0.00353206926956773 -0.0036923938896507 0.387569785118103\n", >> " -0.00324956281110644 1.08965194225311 0.00551541242748499 2.76728820800781\n", >> " 0.00381157570518553 -0.00611468823626637 1.21029341220856 >> 2.98504638671875;\n", >> "" ; >> processing:transformation1-inverted = "true_" ; >> int zspace ; >> zspace:varid = "MINC standard variable" ; >> zspace:vartype = "dimension____" ; >> zspace:version = "MINC Version 1.0" ; >> zspace:comments = "Z increases from patient inferior to superior" ; >> zspace:spacing = "regular__" ; >> zspace:alignment = "centre" ; >> zspace:step = 3. ; >> zspace:start = -72. ; >> zspace:direction_cosines = 0., 0., 1. ; >> zspace:units = "mm" ; >> zspace:spacetype = "talairach_" ; >> int yspace ; >> yspace:varid = "MINC standard variable" ; >> yspace:vartype = "dimension____" ; >> yspace:version = "MINC Version 1.0" ; >> yspace:comments = "Y increases from patient posterior to anterior" ; >> yspace:spacing = "regular__" ; >> yspace:alignment = "centre" ; >> yspace:step = 1. ; >> yspace:start = -126. ; >> yspace:direction_cosines = 0., 1., 0. ; >> yspace:units = "mm" ; >> yspace:spacetype = "talairach_" ; >> int xspace ; >> xspace:varid = "MINC standard variable" ; >> xspace:vartype = "dimension____" ; >> xspace:version = "MINC Version 1.0" ; >> xspace:comments = "X increases from patient left to right" ; >> xspace:spacing = "regular__" ; >> xspace:alignment = "centre" ; >> xspace:step = 1. ; >> xspace:start = -90. ; >> xspace:direction_cosines = 1., 0., 0. ; >> xspace:units = "mm" ; >> xspace:spacetype = "talairach_" ; >> double image-max(zspace) ; >> image-max:varid = "MINC standard variable" ; >> image-max:vartype = "var_attribute" ; >> image-max:version = "MINC Version 1.0" ; >> image-max:_FillValue = 1. ; >> image-max:parent = "image" ; >> double image-min(zspace) ; >> image-min:varid = "MINC standard variable" ; >> image-min:vartype = "var_attribute" ; >> image-min:version = "MINC Version 1.0" ; >> image-min:_FillValue = 0. ; >> image-min:parent = "image" ; >> short image(zspace, yspace, xspace) ; >> image:parent = "rootvariable" ; >> image:varid = "MINC standard variable" ; >> image:vartype = "group________" ; >> image:version = "MINC Version 1.0" ; >> image:image-max = "--->image-max" ; >> image:image-min = "--->image-min" ; >> image:complete = "true_" ; >> image:signtype = "unsigned" ; >> image:valid_range = 0., 65535. ; >> >> // global attributes: >> :history = "Mon Mar 7 06:17:29 2016>>> minccalc -clobber -expression >> A[0]<=0.1 && A[0]>=-0.1 ? A[1]:0 >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/dilated_brain.mask.mnc >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6.mnc.gz >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_native.mnc\n", >> "Mon Mar 7 06:17:50 2016>>> mincresample -clobber -like >> /trials/quarantine/common/models/icbm_avg_152_t1_tal_lin_symmetric.mnc >> -transformation >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6total.xfm >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_native.mnc >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx.mnc\n", >> "Mon Mar 7 06:17:51 2016>>> mincreshape -clobber -dimrange >> zspace=48,103 /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx.mnc >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx_cropped.mnc\n", >> "Mon Mar 7 06:17:51 2016>>> mincresample -clobber -like >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/MOCK2_NBCRSym_CFG1_001_w48_t1p_ISPC-stx152lsq6.mnc.gz >> /tmp/TMP.2016-03-07.06:15:58.mishkin.nbcr.pl.8848/nonbrain_stx_cropped.mnc >> /tmp/TMP.2016-03-07.06:15:58.mi >> _______________________________________________ >> 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 maudette at odu.edu Wed Mar 16 14:52:59 2016 From: maudette at odu.edu (Audette, Michel A.) Date: Wed, 16 Mar 2016 18:52:59 +0000 Subject: [MINC-users] =?windows-1252?q?Research_Topic_=96_Frontiers_in_Com?= =?windows-1252?q?puter-aided_therapy_of_the_central_and_peripheral_nervou?= =?windows-1252?q?s_systems?= Message-ID: Dear MINC users and community, please consider submitting to the upcoming Frontiers Research Topic below. Research Topic ? Frontiers in Computer-aided therapy of the central and peripheral nervous systems Submission Deadlines 29 April 2016 Abstract 28 October 2016 Manuscript Topic Editors Justin Schultz Cetas, M.D. Oregon Health & Science University Michel Audette, Ph.D., Old Dominion University Norfolk, USA Computer assistance technologies have revolutionized neurosurgical practice by building on advances in medical imaging, medical image analysis, surgical navigation, robotics and simulation. Moreover, computer-aided neurological surgery and therapy, defined in a broad sense, are continuing to make great strides, which has an impact on the outcome of patients afflicted with myriad disorders of the central nervous system (CNS) and peripheral nervous system (PNS). This research topic will address clinically transformative neurological therapies that center on the CNS and PNS. In a manner that befits the multidisciplinary challenges that characterize these innovations, the editors and contributors to this online publication will be both physicians and engineers. While there may be overlap with other online publications, including Frontiers journals, the emphasis will be on the practical improvement on patient outcome through technological advances on therapies targeting the CNS and PNS. These research topics will include the following areas: ? Descriptive surgery planning and navigation, which in particular improve on commercially available technologies. ? Surgical robotics that center on stable, accurate delivery of therapies to the CNS or PNS. ? Medical simulation for training and device development, with an emphasis on therapies of the CNS and PNS. ? Innovations in medical imaging that promise to transform how we visualize neuroanatomy, with a particular impact on neurological treatment. ? Medical image analysis algorithms with a transformative impact on neurological surgery and therapy. ? Computer-assisted radiation therapy targeting the nervous system. While these topics may seem diverse, in reality they are all facets of a similar thrust in Neurosurgery to combine rapidly improving imaging modalities with powerful and expanding computing power to model, plan and treat neurological disease through smaller surgical corridors and less morbidity to surrounding structures such as blood vessels, functional brain, fiber tracts cranial nerves and so forth. Another way to phrase the overarching theme is that the application of computers to neurosurgery will allow us to plan and treat individual patients based on their unique functional anatomy and thereby reduce surgical morbidity and improve outcomes. Combining these different applications of computer assistance technologies in one place will, hopefully, allow for cross-fertilization across disciplines. Best wishes, Michel Michel Audette, Ph.D. Assistant Professor, Department of Modeling, Simulation and Visualization Engineering, Old Dominion University, Norfolk, VA. From dante.denigris at gmail.com Thu Mar 17 10:46:27 2016 From: dante.denigris at gmail.com (Dante De Nigris) Date: Thu, 17 Mar 2016 14:46:27 +0000 Subject: [MINC-users] Dockerized Minc-Toolkit 2 Message-ID: Hi all, In case anybody is interested. I recently created a docker image for minc-toolkit-v2, which can be found here, https://hub.docker.com/r/dantino19/minc-toolkit/ I will fill up the description in the website later this week, but essentially all modules have been enabled in the compilation (ANTs, Elastix, Display, register, EZMinc, and so on). I couldn't find another docker image of minc-toolkit-2 around, but if there was already an "official" image somewhere please let me know. Regards, Dante