That code uses trilinear interpolation by default, but you can output a
warpfield and use splines which should be much crisper.

Peace,

Matt.

On 4/11/18, 11:59 AM, "hcp-users-boun...@humanconnectome.org on behalf of
Kristian Loewe" <hcp-users-boun...@humanconnectome.org on behalf of
k...@kristianloewe.com> wrote:

>Hi Joo-won,
>
>I am not sure, which one looks more anatomically reasonable. The
>scanner-corrected one looks a little bit more crisp compared to the
>offline-corrected, which appears a little more smooth by comparison.
>Perhaps this could have something to do with the interpolation algorithm
>used?
>
>Thanks for the information regarding the table position! That's good to
>know. It reports as 0\0\0, though.
>
>Cheers,
>
>Kristian
>
>
>On 11.04.2018 16:19, Kim, Joo-won wrote:
>> Hi Kristian,
>> 
>> Which one looks more reasonable, online or offline correction for
>>subject data?
>> 
>> On my data, dicom header (0019, 1014) contains table position.
>> 
>> Best,
>> Joo-won
>> 
>> On 4/11/18, 9:31 AM, "Kristian Loewe" <k...@kristianloewe.com> wrote:
>> 
>>      Hi Joo-won and Keith,
>>      
>>      I don't think that the table has been moved. Is there any
>>information
>>      somewhere in the dicom header to double-check this?
>>      
>>      I am using the coeff_AS82.grad file for the Prisma data (the second
>>      command). The first command was what I used for the Verio data.
>>Also,
>>      I double-checked that I am using the uncorrected volume as input.
>>      
>>      I am not sure if I am supposed/allowed to send screenshots of the
>>      actual data in the subject's native space to the list. I'm going to
>>      check that. Meanwhile, I asked our local MR team to acquire an
>>      additional data set using a phantom. The difference between the
>>      scanner-corrected image and the offline-corrected image is not as
>>      striking in this case but it's visible. Based on the phantom data,
>>I
>>      am inclined to say that both corrections work reasonably well, even
>>      though they are not exactly the same. I also tried the
>>      offline-correction on some phantom EPI data and it seems to work
>>well
>>      as it (together with EPI distortion correction) restores the
>>original
>>      shape of the phantom pretty nicely.
>>      
>>      The differences between the correction variants applied to the
>>      subject's data are actually rather small inside the brain but
>>become
>>      larger towards the neck, which is to be expected as the distance to
>>      the magnetic isocenter becomes greater in that direction.
>>      Nevertheless, I orginally thought that the differences between
>>      scanner- and offline-corrected images would be smaller than that.
>>      
>>      Find attached some plots of the T1 phantom data:
>>      
>>      T1_ND*.png     - uncorrected images
>>      T1*.png        - scanner-corrected images
>>      T1_ND_gdc*.png - offline-corrected images
>>      
>>      Cheers,
>>      
>>      Kristian
>>      
>>      
>>      PS:
>>      I am sending this email for the second time (apparently the
>>attachment
>>      was too large). I am not sure if the first email was successfully
>>      cancelled. I apologize if you are receiving this twice now.
>>      
>>      
>>      Quoting "Kim, Joo-won" <joo-won....@mssm.edu>:
>>      
>>      > Hi Kristian,
>>      >
>>      > Have you moved table? If you moved the table, you should manually
>>      > subtract it from qform, sform, and/or affine matrix in the nifty
>>      > header.
>>      >
>>      > Best,
>>      > Joo-won
>>      >
>>      > ---
>>      > Joo-won Kim, Ph.D.
>>      > Postdoctoral Fellow
>>      > Translational and Molecular Imaging Institute
>>      > Icahn School of Medicine at Mount Sinai
>>      >
>>      >
>>      > From: <hcp-users-boun...@humanconnectome.org> on behalf of Keith
>>      > Jamison <kjami...@umn.edu>
>>      > Date: Monday, April 9, 2018 at 10:36 AM
>>      > To: Kristian Loewe <k...@kristianloewe.com>
>>      > Cc: HCP Users <hcp-users@humanconnectome.org>
>>      > Subject: Re: [HCP-Users] gradient nonlinearity correction
>>question
>>      >
>>      > First make sure you're using the right coefficient file, copied
>>      > directly from the scanner.  The Prisma should have a file called
>>      > coeff_AS82.grad, so the one you used in your *second* command
>>above
>>      > should be correct.
>>      > Second is to be absolutely sure your input is the uncorrected
>>volume (*_ND).
>>      > If you include some matched screenshots of the uncorrected,
>>      > offline-corrected, and scanner-corrected volumes, we can maybe
>>help
>>      > evaluate the difference.
>>      >
>>      >
>>      > On Mon, Apr 9, 2018 at 4:09 AM, Kristian Loewe
>>      > <k...@kristianloewe.com<mailto:k...@kristianloewe.com>> wrote:
>>      > Thanks Keith,
>>      >
>>      > Cropping is turned off by default in the version of dcm2niix that
>>      > I'm using but I re-ran the conversion with "-x n" anyway. I also
>>      > used fslreorient2std as per your suggestion. Unfortunately, the
>>      > result is still the same. Do you have any other ideas?
>>      >
>>      >
>>      > Cheers,
>>      >
>>      > Kristian
>>      >
>>      >
>>      > Quoting Keith Jamison
>><kjami...@umn.edu<mailto:kjami...@umn.edu>>:
>>      > Some problems can arrise if the NIFTI files are unexpectedly
>>manipulated
>>      > prior gradient_unwarp. Two things to check:
>>      >
>>      > 1. dcm2nii and dcm2niix has options to perform additional
>>processing like
>>      > reorienting or cropping, some of which may be enabled by
>>default. Make sure
>>      > those are all DISABLED. (for dcm2niix add "-x n" and for dcm2nii
>>you can
>>      > add "-x N -r N"
>>      > 2. We also usually use "fslreorient2std <origT1> <origT1>_new
>>and then
>>      > 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__gradient-5Funwarp.py&;
>>d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A
>>8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLMYEP25pUmAGLD0&s=wk-N7lyqmkt2q70-Op
>>8145_AFL9LjGtcdqEREsSrUeI&e=<https://urldefense.proofpoint.com/v2/url?u=h
>>ttp-3A__gradient-5Funwarp.py&d=DwQFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC
>>6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd
>>7pJY5V6o&s=0fRXneyYj_8irqp1xYKJzBXtTZP9nixP-6_oGvClUEE&e=> on
>>      > <origT1>_new
>>      >
>>      > -Keith
>>      >
>>      >
>>      > On Fri, Apr 6, 2018 at 12:05 PM, Kristian Loewe
>>      > <k...@kristianloewe.com<mailto:k...@kristianloewe.com>>
>>      > wrote:
>>      > Hi,
>>      >
>>      > I would like to use gradunwarp for offline gradient nonlinearity
>>      > correction of some data acquired on our local Siemens scanners.
>>I used
>>      > dcm2niix to convert the dicom data to nifti format. After
>>applying
>>      > gradunwarp to a T1 image in nifti format (the one that
>>originally has
>>      > the _ND suffix), I proceeded to compare the result with the
>>      > Siemens-corrected T1 image. I expected that they would look very
>>      > similar but in fact they look quite different. I am wondering if
>>this
>>      > is to be expected to some degree because of differences in the
>>      > correction algorithms or what else might be the reason for this.
>>Could
>>      > it be the case, for example, that the wrong center is being used
>>for
>>      > some reason?
>>      >
>>      > I have tried this for a T1 image acquired on a Verio and another
>>one
>>      > from a Prisma using
>>      >
>>      >
>>      > 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__gradient-5Funwarp.py&;
>>d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A
>>8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLMYEP25pUmAGLD0&s=wk-N7lyqmkt2q70-Op
>>8145_AFL9LjGtcdqEREsSrUeI&e=<https://urldefense.proofpoint.com/v2/url?u=h
>>ttp-3A__gradient-5Funwarp.py&d=DwQFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC
>>6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd
>>7pJY5V6o&s=0fRXneyYj_8irqp1xYKJzBXtTZP9nixP-6_oGvClUEE&e=> T1.nii.gz
>>T1_gdc.nii.gz siemens -g
>>      > coeff_AS097.grad
>>      > -n
>>      >
>>      > and
>>      >
>>      >
>>      > 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__gradient-5Funwarp.py&;
>>d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A
>>8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLMYEP25pUmAGLD0&s=wk-N7lyqmkt2q70-Op
>>8145_AFL9LjGtcdqEREsSrUeI&e=<https://urldefense.proofpoint.com/v2/url?u=h
>>ttp-3A__gradient-5Funwarp.py&d=DwQFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC
>>6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd
>>7pJY5V6o&s=0fRXneyYj_8irqp1xYKJzBXtTZP9nixP-6_oGvClUEE&e=> T1.nii.gz
>>T1_gdc.nii.gz siemens -g coeff_AS82.grad
>>      > -n
>>      >
>>      > respectively.
>>      >
>>      > I would really appreciate any help or advice you can provide.
>>      >
>>      > Cheers,
>>      >
>>      > Kristian
>>      >
>>      >
>>      > Quoting Keith Jamison
>><kjami...@umn.edu<mailto:kjami...@umn.edu>>:
>>      >
>>      >> FYI, when available, you can enable it on the scanner in the
>>      >> "Resolution->Filter" tab with the "Distortion Correction"
>>checkbox.  It's
>>      >> often used for structural scans like MPRAGE, where you will see
>>two DICOM
>>      >> folders in the output: <scanname> and <scanname>_ND.  ND means
>>"No
>>      >> Distortion [Correction]".. .A very confusing choice of acronym.
>> You can
>>      >> then compare the online corrected (not _ND) and offline using
>>gradunwarp.
>>      >>
>>      >> -Keith
>>      >>
>>      >>
>>      >> On Wed, Oct 19, 2016 at 4:44 PM, Glasser, Matthew
>>      >> <glass...@wustl.edu<mailto:glass...@wustl.edu>>
>>      >> wrote:
>>      >>
>>      >>> Some do for some sequences, but because it is not uniformly
>>applied and
>>      >>> because they are likely not to use optimal interpolation
>>algorithms, we
>>      >>> prefer to do offline correction.
>>      >>>
>>      >>> Peace,
>>      >>>
>>      >>> Matt.
>>      >>>
>>      >>> From:
>>      >>> 
>><hcp-users-boun...@humanconnectome.org<mailto:hcp-users-bounces@humanconn
>>ectome.org>> on behalf of
>>      >>> Antonin
>>      > Skoch <
>>      >>> a...@ikem.cz<mailto:a...@ikem.cz>>
>>      >>> Date: Wednesday, October 19, 2016 at 4:27 PM
>>      >>> To:
>>      >>> 
>>"hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>"
>>      >>> 
>><hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>>
>>      >>> Subject: [HCP-Users] gradient nonlinearity correction question
>>      >>>
>>      >>> Dear experts,
>>      >>>
>>      >>> during the set-up of gradunwarp scripts, it came to my mind,
>>why scanner
>>      >>> vendors standardly do not perform gradient nonlinearity
>>correction
>>      > directly
>>      >>> on the scanner as part of on-line image reconstruction system
>>(i.e. ICE
>>      > in
>>      >>> Siemens)?
>>      >>>
>>      >>> Regards,
>>      >>>
>>      >>> Antonin Skoch
>>      >>>
>>      >>>
>>      >>> _______________________________________________
>>      >>> HCP-Users mailing list
>>      >>> 
>>HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
>>      >>> 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome
>>.org_mailman_listinfo_hcp-2Dusers&d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4g
>>enPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLM
>>YEP25pUmAGLD0&s=5-UYvgRR0cl4qC_qkEGZ61K7AIS5188FJQqxclhWk1k&e=<https://ur
>>ldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailm
>>an_listinfo_hcp-2Dusers&d=DwMFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMD
>>ghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd7pJY5
>>V6o&s=VlS5YxgBaQ-pKX4I4w1y6G0q0a0dP60J_gDUReDB9sE&e=>
>>      >>>
>>      >>>
>>      >>> ------------------------------
>>      >>>
>>      >>> The materials in this message are private and may contain
>>Protected
>>      >>> Healthcare Information or other information of a sensitive
>>nature. If
>>      > you
>>      >>> are not the intended recipient, be advised that any
>>unauthorized use,
>>      >>> disclosure, copying or the taking of any action in reliance on
>>the
>>      > contents
>>      >>> of this information is strictly prohibited. If you have
>>received this
>>      > email
>>      >>> in error, please immediately notify the sender via telephone
>>or return
>>      > mail.
>>      >>>
>>      >>> _______________________________________________
>>      >>> HCP-Users mailing list
>>      >>> 
>>HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
>>      >>> 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome
>>.org_mailman_listinfo_hcp-2Dusers&d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4g
>>enPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLM
>>YEP25pUmAGLD0&s=5-UYvgRR0cl4qC_qkEGZ61K7AIS5188FJQqxclhWk1k&e=<https://ur
>>ldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailm
>>an_listinfo_hcp-2Dusers&d=DwMFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMD
>>ghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd7pJY5
>>V6o&s=VlS5YxgBaQ-pKX4I4w1y6G0q0a0dP60J_gDUReDB9sE&e=>
>>      >>>
>>      >>
>>      >> _______________________________________________
>>      >> HCP-Users mailing list
>>      >> 
>>HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
>>      >> 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome
>>.org_mailman_listinfo_hcp-2Dusers&d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4g
>>enPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLM
>>YEP25pUmAGLD0&s=5-UYvgRR0cl4qC_qkEGZ61K7AIS5188FJQqxclhWk1k&e=<https://ur
>>ldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailm
>>an_listinfo_hcp-2Dusers&d=DwMFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMD
>>ghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd7pJY5
>>V6o&s=VlS5YxgBaQ-pKX4I4w1y6G0q0a0dP60J_gDUReDB9sE&e=>
>>      >
>>      >
>>      >
>>      > _______________________________________________
>>      > HCP-Users mailing list
>>      > 
>>HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
>>      > 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome
>>.org_mailman_listinfo_hcp-2Dusers&d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4g
>>enPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLM
>>YEP25pUmAGLD0&s=5-UYvgRR0cl4qC_qkEGZ61K7AIS5188FJQqxclhWk1k&e=<https://ur
>>ldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailm
>>an_listinfo_hcp-2Dusers&d=DwMFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMD
>>ghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd7pJY5
>>V6o&s=VlS5YxgBaQ-pKX4I4w1y6G0q0a0dP60J_gDUReDB9sE&e=>
>>      >
>>      >
>>      >
>>      >
>>      > _______________________________________________
>>      > HCP-Users mailing list
>>      > HCP-Users@humanconnectome.org
>>      > 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome
>>.org_mailman_listinfo_hcp-2Dusers&d=DwIBaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4g
>>enPYC6QtMDghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=lqapUB34lYg_kg2BJWybN6uJwivTLM
>>YEP25pUmAGLD0&s=5-UYvgRR0cl4qC_qkEGZ61K7AIS5188FJQqxclhWk1k&e=<https://ur
>>ldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailm
>>an_listinfo_hcp-2Dusers&d=DwQFaQ&c=shNJtf5dKgNcPZ6Yh64b-A&r=C4genPYC6QtMD
>>ghAR1Km4p6emgS7QcLRMzo8A8hTJKk&m=ZMuNtM9D5WoxjxPsNEf3nsA4vd9aenKnJbd7pJY5
>>V6o&s=VlS5YxgBaQ-pKX4I4w1y6G0q0a0dP60J_gDUReDB9sE&e=>
>>      
>>      
>>      
>> 
>_______________________________________________
>HCP-Users mailing list
>HCP-Users@humanconnectome.org
>http://lists.humanconnectome.org/mailman/listinfo/hcp-users


_______________________________________________
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to