[MINC-users] mincresample apply nonlinear transformation using .xfm with Transform Type = Grid_Transform

Sébastien Proulx sebastien.proulx2 at mcgill.ca
Thu Jun 20 17:53:46 EDT 2013


Great! It runs now! although the segmented images these inverted 
transformations produce are somehow (significantly) not perfectly 
aligned to the original anatomical. I'll look at  that later, maybe I 
don't have the good original anatomical, but at least the command runs!! 
Thanks a lot guys!

Sébastien Proulx, MSc
Research Assistant
McGill University
(514) 398-6644 #00445

Le 13-06-20 4:40 PM, Michael Ferreira a écrit :
> Hi Sebas,
>
> Since I see from your BIC home directory that you are a bash shell 
> user, type this:
>
> export PATH='/usr/local/bic/bin:'$PATH
>
> Then retry your mincresample command, it should work now.  Your output 
> will be in MINC2 format though, so it may be wise to always use MINC2.
>
> To do this, add the above PATH definition to your ~/.bashrc file. This 
> way, every time you login to the BIC you will be using the MINC2 tools.
>
> Regards,
>
> mike
>
>
> On 20/06/13 04:35 PM, Vladimir S. FONOV wrote:
>> Hello,
>>
>>
>> It looks like you received grid files in minc2 file format. And your
>> computer (duncan) have minc1 installed.
>>
>> On 13-06-20 04:03 PM, Sébastien Proulx wrote:
>>> It's not me who did the registration, I'm only trying to undo it :-P
>>> (apply the inverse transform). My colleague gave me one subject, didn't
>>> work. He sent it again along with another subject, didn't work either
>>> for both. He could send me more, but I guess it would be the same.
>>>
>>> Same thing with min_cc_omplete. Trying stuff around, I copypasted the
>>> wrong lines.
>>>
>>> As for the version:
>>> duncan:~/transformTest_bis/Transforms_45/nonlinear> mincresample 
>>> -version
>>> program: 1.5.1
>>> libminc: 1.5.1
>>> netcdf : "3.6.3" of May 20 2011 16:00:48 $
>>>
>>> Sébastien Proulx, MSc
>>> Research Assistant
>>> McGill University
>>> (514) 398-6644 #00445
>>>
>>> Le 13-06-20 3:44 PM, Alex Zijdenbos a écrit :
>>>> 'minccomplete' has two 'c's :)
>>>>
>>>> you get the same error for all grid_0.mnc files, or just one?
>>>>
>>>> my other guess would be you are looking at a MINC1/MINC2 issue, and/or
>>>> that you might have an ancient MINC install. What does 'mincresample
>>>> -version' tell you?
>>>>
>>>> On Thu, Jun 20, 2013 at 3:31 PM, Sébastien Proulx
>>>> <sebastien.proulx2 at mcgill.ca> wrote:
>>>>> It seems like I don't have access to minccomplete, but see the
>>>>> following
>>>>> terminal output:
>>>>> ------------------------------------------------------------------------------------- 
>>>>>
>>>>>
>>>>>
>>>>> duncan:~/transformTest_bis/Transforms_45/nonlinear> mincomplete
>>>>> TMS_CON_45_nlfit_It_grid_0.mnc
>>>>> mincomplete: Command not found.
>>>>> duncan:~/transformTest_bis/Transforms_45/nonlinear> mincinfo
>>>>> TMS_CON_45_nlfit_It_grid_0.mnc
>>>>> ncopen: filename "TMS_CON_45_nlfit_It_grid_0.mnc": NetCDF: Unknown 
>>>>> file
>>>>> format
>>>>> miopen: MINC package entry point
>>>>> ------------------------------------------------------------------------------------- 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Since I tried with two different subjects, I thought a corruption was
>>>>> unlikely, but I guess mincinfo should be able to read any intact minc
>>>>> file.
>>>>> Is it possible that minctracc (see content of .xfm) did correctly
>>>>> produce
>>>>> the nonlinearly registered images, but somehow screwed-up all the
>>>>> ..._nlfit_It_grid_0.mnc files?
>>>>>
>>>>> Thanks a lot Alex!
>>>>>
>>>>>
>>>>> Sébastien Proulx, MSc
>>>>> Research Assistant
>>>>> McGill University
>>>>> (514) 398-6644 #00445
>>>>>
>>>>> Le 13-06-20 2:22 PM, Alex Zijdenbos a écrit :
>>>>>> Hi Sébastien,
>>>>>>
>>>>>> My guess would be that the deformation field (grid_0.mnc) file is
>>>>>> corrupt. What happens when you run this:
>>>>>>
>>>>>> minccomplete TMS_CON_44_nlfit_It_grid_0.mnc
>>>>>>
>>>>>> and/or mincfinfo?
>>>>>>
>>>>>> -- A
>>>>>>
>>>>>> On Thu, Jun 20, 2013 at 2:00 PM, Sébastien Proulx
>>>>>> <sebastien.proulx2 at mcgill.ca> wrote:
>>>>>>> Hello Minc people,
>>>>>>>
>>>>>>> My colleague gave me transformation files from a nonlinear
>>>>>>> registration
>>>>>>> to a
>>>>>>> template done with minctools. I'm trying to use those to bring some
>>>>>>> images
>>>>>>> (segmented in MNI space) back to their native space. Linear
>>>>>>> transforms
>>>>>>> are
>>>>>>> working fine, but I apply the inverse of the nonlinear part:
>>>>>>>
>>>>>>> mincresample -inverse_transformation -transformation
>>>>>>> nonLinTransformFileName.xfm -like nativeSpaceAnatomic.mnc
>>>>>>> templateSpaceSegmentedImage.mnc nativeSpaceSegmentedImage.mnc
>>>>>>>
>>>>>>>
>>>>>>> doesn't work whatever I do (reloading files or try simple variants
>>>>>>> of the
>>>>>>> command):
>>>>>>>
>>>>>>> Error: opening MINC file "./TMS_CON_44_nlfit_It_grid_0.mnc".
>>>>>>> input_transform: error reading transform.
>>>>>>> Error reading transformation file.
>>>>>>>
>>>>>>>
>>>>>>> Here is the content of nonLinTransformFileName.xfm:
>>>>>>>
>>>>>>> --------------------------------------------------------------------------------------------------- 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> MNI Transform File
>>>>>>> %Sun Aug 5 12:30:27 2012>>> minctracc -clobber -nonlinear corrcoeff
>>>>>>> -weight
>>>>>>> 1 -stiffness 1 -similarity 0.3 -sub_lattice 6 -iterations 10 -step
>>>>>>> 4 4 4
>>>>>>> -lattice_diam 12 12 12 -transformation
>>>>>>> /tmp/best1stepnlreg.pl-UAIGq86o/STMS_CON_44_t1_final_4.xfm
>>>>>>> -source_mask
>>>>>>>
>>>>>>> /sb/project/eim-670-ab/gridshare/15/52/01/stremblay-Civet-T155201/civet_out/CON_44/mask/TMS_CON_44_skull_mask.mnc 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -model_mask
>>>>>>>
>>>>>>> /sb/home/prioux/tools/CIVET/Feb-2010-a/share/mni-models//icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /tmp/best1stepnlreg.pl-UAIGq86o/STMS_CON_44_t1_final_2_blur.mnc
>>>>>>>
>>>>>>> /tmp/best1stepnlreg.pl-UAIGq86o/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_2_blur.mnc/sb/project/eim-670-ab/gridshare/15/52/01/stremblay-Civet-T155201/civet_out/CON_44/transforms/nonlinear/TMS_CON_44_nlfit_It.xfm 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> %(Package mni_autoreg 0.99.3, compiled by
>>>>>>> tnguyen at localhost.localdomain
>>>>>>> (x86_64-unknown-linux-gnu) on Mon Aug 30 17:14:08 EDT 2010)
>>>>>>>
>>>>>>> Transform_Type = Linear;
>>>>>>> Linear_Transform =
>>>>>>> 1 0 0 0
>>>>>>> 0 1 0 0
>>>>>>> 0 0 1 0;
>>>>>>> Transform_Type = Grid_Transform;
>>>>>>> Displacement_Volume = TMS_CON_44_nlfit_It_grid_0.mnc;
>>
>>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
>



More information about the MINC-users mailing list