oesteban / RegSeg

RegSeg is a simultaneous segmentation and registration method that uses active contours without edges (ACWE) extracted from structural images. The contours evolve through a free-form deformation field supported by the B-spline basis to optimally map the contours onto the data in the target space.
MIT License
12 stars 9 forks source link

Real Data: first example #53

Closed oesteban closed 11 years ago

oesteban commented 11 years ago

I modify this ticket. The target is applying the code on one real case from @meribach 's pilot study.

oesteban commented 11 years ago

I'm applying it on my pilot, ts0.

  1. Take DTI info out:

    cd /media/data/DTI_Repeatability/NIFTI/S001/ts0
    fslsplit DTI.nii.gz -t
    mv vol0000.nii.gz DTI_b0.nii.gz
    rm vol*.nii.gz
  2. Extract brain

    bet DTI_b0.nii.gz DTI_b0_brain.nii.gz -f 0.3 -R
  3. Registration (http://brainybehavior.com/neuroimaging/2011/04/using-freesurfers-bbregister-for-image-registration/):

    cd /media/data/DTI_Repeatability/FREESURFER
    export SUBJECTS_DIR=/media/data/DTI_Repeatability/FREESURFER; bbregister --s OE0_T1 --mov ../NIFTI/S001/ts0/DTI_b0_brain.nii.gz --reg ../NIFTI/S001/ts0/dti2t1.dat --dti --init-fsl
  4. Check result

    tkregister2 --mov ../NIFTI/S001/ts0/DTI_b0_brain.nii.gz --reg ../NIFTI/S001/ts0/dti2t1.dat --surf

    tkmedit2_dti

  5. Transform T1 to dti space (and then check it, seems OK):

    mri_vol2vol --mov ../NIFTI/S001/ts0/DTI_b0.nii.gz --targ OE0_T1/mri/T1.mgz --reg ../NIFTI/S001/ts0/dti2t1.dat --o ../NIFTI/S001/ts0/T1-to-DTI.nii.gz --inv
    tkregister2 --mov ../NIFTI/S001/ts0/T1-to-DTI.nii.gz --targ ../NIFTI/S001/ts0/DTI_b0.nii.gz --reg ../NIFTI/S001/ts0/T1-to-DTI.nii.gz.reg
  6. Transform surfaces to dti space:

    for hemi in lh rh; do for surf in pial white; do cmd="mri_surf2surf --s OE0_T1 --sval-xyz $surf --reg-inv dti2t1.dat DTI_b0_brain.nii.gz --tval ./$hemi.$surf.dti --tval-xyz --hemi $hemi"; echo $cmd; eval $cmd; done; done;
  7. (Optional) Transform surfaces to vtk

    cd ../NIFTI/S001/ts0/
    mris_convert rh.pial.dti rh.pial.dti.vtk
  8. Check that there are orientation problems with paraview:

    registered_surface

oesteban commented 11 years ago

Updated methodology:

  1. Take DTI info out:

    cd /media/data/DTI_Repeatability/NIFTI/S001/ts0
    fslsplit DTI.nii.gz -t
    mv vol0000.nii.gz DTI_b0.nii.gz
    rm vol*.nii.gz
  2. Extract brain

    bet DTI_b0.nii.gz DTI_b0_brain.nii.gz -f 0.3 -R
  3. Registration (http://brainybehavior.com/neuroimaging/2011/04/using-freesurfers-bbregister-for-image-registration/):

    cd /media/data/DTI_Repeatability/FREESURFER
    export SUBJECTS_DIR=/media/data/DTI_Repeatability/FREESURFER; bbregister --s OE0_T1 --mov ../NIFTI/S001/ts0/DTI_b0_brain.nii.gz --reg ../NIFTI/S001/ts0/dti2t1.dat --dti --init-fsl
  4. Check result

    tkregister2 --mov ../NIFTI/S001/ts0/DTI_b0_brain.nii.gz --reg ../NIFTI/S001/ts0/dti2t1.dat --surf
  5. Transform surfaces to dti space:

    for hemi in lh rh; do for surf in pial white; do cmd="python fsb_transform.py --targ DTI_b0_brain.nii.gz --orig ../FREESURFER/OE0_T1/surf/$hemi.$surf --o surf/test.$hemi.$surf --tfm bbreg/dti2t1.dat --paraview"; echo $cmd; eval $cmd; done; done;
  6. Check results with Slicer:

    Screenshot from 2013-04-15 12:05:12

oesteban commented 11 years ago

AND this is the result on the actual features (FA,MD):

FA: Screenshot from 2013-04-15 13:51:12

MD: Screenshot from 2013-04-15 13:55:17

I check that the test example is functional and close this issue :)

zosso commented 11 years ago

Question: are these results based on the proposed joint seg-reg algorithm? What exactly happens in the frontal part? is the brain cut (skull-strip artefact) or is this the distortion (to be corrected by the registration)?

oesteban commented 11 years ago

I will compute the unwarped FA and MD using fieldmap correction, so you can see the performance.

On Mon, Apr 15, 2013 at 10:07 PM, zosso notifications@github.com wrote:

Question: are these results based on the proposed joint seg-reg algorithm? What exactly happens in the frontal part? is the brain cut (skull-strip artefact) or is this the distortion (to be corrected by the registration)?

— Reply to this email directly or view it on GitHubhttps://github.com/oesteban/ACWE-Registration/issues/53#issuecomment-16408247 .

oesteban commented 11 years ago

Finally, we have a 1st working example (blue=original contour, yellow=registered contour):

Screenshot from 2013-04-17 15:35:28

Conditions of the experiment:

I write these conditions because it might not seem a very good result, but actually it is. First thing to do is discussing #70 and initializing the problem better. Next step IMHO is implementing #7, given that it seems to provide a very isotropic transformation. Coupled or maybe at the same time, I will also face #49 .

Let me know your insights :)