[MINC-users] retrieve coregistration

Jérôme Redouté redoute at cermep.fr
Wed Sep 21 05:14:45 EDT 2016


Thank you Robert!
just can't finfd you python scipt ;)
Best
Jerome

Le 20/09/2016 à 17:37, Robert D. Vincent a écrit :
> Hi Jérôme,
>
> Thank you for the files. So I tried just converting your original file to
> ecat using minctoecat, and then converting it back with ecat to minc:
>
> minctoecat CHAPO06620_F15_04_DYN_avg.mnc test.v
> ecattominc test.v test.mnc
>
> The resulting test.mnc has reordered dimensions, but the two MINC volumes
> align properly. So it does seem as though there is an issue with the
> imgratio tool, it is somehow changing the voxel-to-world transform in an
> unexpected way.
>
> I wrote a little Python 3 script that fixes this - it's enclosed (and
> poorly tested at this point, so be careful).
>
> Here's a link to the ratio file with the corrected transform:
>
> https://www.dropbox.com/s/nwe7r2cqaik97vw/ratio_fixed.mnc?dl=0
>
> The corrected file looks fairly good when overlaid on the original in
> Display, so hopefully imgratio isn't changing the underlying sampling of
> the data, but rather it is only failing to properly preserve the transform.
>
>      -bert
>
>
> On Fri, Sep 16, 2016 at 4:58 AM, Jérôme Redouté <redoute at cermep.fr> wrote:
>
>> Hi,
>> modifying zstart effectively corrects z mismatch
>> unfortunately, x and y do not align files correctly and I keep a small
>> mismatch
>> Here is an example of dataset:
>> https://dl.univ-lyon1.fr/iulbw8zre0
>> Thanks
>> Jerome
>>
>>
>>
>> Le 15/09/2016 à 14:58, Robert D. Vincent a écrit :
>>
>>> Hi,
>>>
>>> So the xspace and yspace values have changed slightly, but the zspace
>>> origin has been changed dramatically.
>>>
>>> If you do the following command:
>>>
>>> minc_modify_header -dinsert zspace:start=48.3 ratio_original.mnc
>>>
>>> Do the files line up correctly?
>>>
>>>
>>>
>>> On Thu, Sep 15, 2016 at 8:24 AM, Jérôme Redouté <redoute at cermep.fr>
>>> wrote:
>>>
>>> Hi Robert,
>>>> here is the output of mincinfo
>>>>
>>>> file: CHAPO06620_F15_04_DYN_avg.mnc
>>>>
>>>>> image: signed__ short -32768 to 32767
>>>>> image dimensions: xspace zspace yspace
>>>>>       dimension name         length         step        start
>>>>>       --------------         ------         ----        -----
>>>>>       xspace                    176          0.6        -52.8
>>>>>       zspace                    164    -0.601562         48.3
>>>>>       yspace                    208    -0.601562      63.8531
>>>>>
>>>>>
>>>>> file: ratio_original.mnc
>>>>> image: signed__ short -32000 to 32000
>>>>> image dimensions: zspace yspace xspace
>>>>>       dimension name         length         step        start
>>>>>       --------------         ------         ----        -----
>>>>>       zspace                    164    -0.601562           -0
>>>>>       yspace                    208     0.601562     -62.2617
>>>>>       xspace                    176          0.6        -52.5
>>>>>
>>>>> PS: imgratio is a tool from Turku's PET center
>>>> Jerome
>>>>
>>>>
>>>>
>>>>
>>>> Le 15/09/2016 à 12:23, Robert D. Vincent a écrit :
>>>>
>>>> Hi Jérôme,
>>>>> I don't know the "imgratio" tool, is it possible it is changing or
>>>>> deleting
>>>>> the voxel-to-world transform? What is the output of mincinfo on the two
>>>>> mnc
>>>>> files?
>>>>>
>>>>> If the basic sampling grid hasn't changed, you should be able to use
>>>>> minc_modify_header to put the original voxel-to-world transform back
>>>>> into
>>>>> the ratio.mnc header.
>>>>>
>>>>>        -bert
>>>>>
>>>>> On Thu, Sep 15, 2016 at 5:59 AM, Jérôme Redouté <redoute at cermep.fr>
>>>>> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>>> I need your help concerning a coregistration loss problem during image
>>>>>> processing.
>>>>>>
>>>>>> I have a mnc PET 4D volume that I need to process in ECAT format.
>>>>>>
>>>>>> My processing steps are as follows:
>>>>>>
>>>>>> DYN.mnc => ecat with minctoecat
>>>>>>
>>>>>> ecat processing (imgratio) to generate a ratio image => ratio.v
>>>>>>
>>>>>> convert back to minc using ecattominc => ratio.mnc
>>>>>>
>>>>>> my problem is that ratio.mnc is not in alignment with DYN.mnc
>>>>>>
>>>>>>
>>>>>> How should I correct ratio.mnc header to bring this alignment back?
>>>>>>
>>>>>> Thanks for your help
>>>>>>
>>>>>> Jerome
>>>>>>
>>>>>> --
>>>>>> ==================================================================
>>>>>> 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
>>>>
>>>> _______________________________________________
>>> 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
>>
>>
>>
>> _______________________________________________
>> 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
==================================================================



More information about the MINC-users mailing list