Re: [Freesurfer] Apply transformation

2020-03-06 Thread Douglas N. Greve






*Od:* freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Adam Rytina 


*Odesláno:* sobota 15. února 2020 19:52
*Komu:* Freesurfer support list 
*Předmět:* Re: [Freesurfer] Apply transformation

External Email - Use Caution

Thanks, unfortunately, I am making some mistake but I don´t know where.

First of all I run autorecon1 on my anatomical T1 data (the orig.mgz 
image is saved in /usr/local/freesurfer/subjects/anatomical).
Then in the /usr/local/freesurfer/data I run mri_robust register 
command of the T1 and diffusion DWI data. The registration.lta file is 
saved here.
Don't use robust register for this, use bbregister (but you will have to 
run recon-all to completion)


Now I add an anatomical mask "3D_T1_brain_mask.nii" to the same folder 
/usr/local/freesurfer/data that I want to transform to the anatomical 
T1 space.

Is this in the conformed space (ie, same as orig.mgz)?


In the same /usr/local/freesurfer/data I run : "mri_vol2vol --lta 
registration.lta --mov 3D_T1_brain_mask.nii --o f-in-anat3.nii --s 
anatomical --fstarg"

If you are trying to transfer it to the DTI space, then use
mri_vol2vol --lta bbr.registration.lta --targ 3D_T1_brain_mask.nii --mov 
dti.nii  --o f-in-anat3.nii --s anatomical --interp nearest


To sum up, I am aiming to apply a transformation matrix on the T1 
anatomical brain mask and transform it to the T1 space defined by 3D 
T1 image.
The problem is this command transforms orig.mgz file (a skull stripped 
T1 image) instead of 3D_T1_brain_mask.nii.


Please, do you know where I make mistake?

Thanks a lot

*Od:* freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Douglas Greve 


*Odesláno:* sobota 15. února 2020 17:15
*Komu:* freesurfer@nmr.mgh.harvard.edu 
*Předmět:* Re: [Freesurfer] Apply transformation
Yes, mri_vol2vol

On 2/15/20 11:07 AM, Adam Rytina wrote:


External Email - Use Caution

Hello all,

I want to apply the saved transformation (a transformation matrix 4x4 
acquired by registration of an anatomical and a diffusion image) on 
my input anatomical mask and change a final FOV by specifying a 
diffusion reference image (its voxels size). It means to apply the 
same command as the command ApplyXFM in FSL FLIRT. Does this option 
exist also in Freesurfer?


Thanks a lot
Regards
Adam



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu  <mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Apply transformation

2020-02-24 Thread Adam Rytina
External Email - Use Caution

Hello all,

is it possible to transform a binary mask (a transformation matrix 4x4 acquired 
by registration of an anatomical and a diffusion image) and change a final FOV 
by specifying a diffusion reference image? Or the transform can be applied only 
on structural image?

I am still struggling with the transformation of my binary mask as explained 
below.

Thanks a lot
Regards
Adam


Od: Adam Rytina 
Odesláno: středa 19. února 2020 8:11
Komu: Greve, Douglas N.,Ph.D. 
Předmět: Fw: [Freesurfer] Apply transformation

Hello,

please, could you help me with this case? What am I doing wrong?

Thanks a lot


Od: freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Adam Rytina 

Odesláno: sobota 15. února 2020 19:52
Komu: Freesurfer support list 
Předmět: Re: [Freesurfer] Apply transformation


External Email - Use Caution

Thanks, unfortunately, I am making some mistake but I don´t know where.

First of all I run autorecon1 on my anatomical T1 data (the orig.mgz image is 
saved in /usr/local/freesurfer/subjects/anatomical).
Then in the /usr/local/freesurfer/data I run mri_robust register command of the 
T1 and diffusion DWI data. The registration.lta file is saved here.

Now I add an anatomical mask "3D_T1_brain_mask.nii" to the same folder 
/usr/local/freesurfer/data that I want to transform to the anatomical T1 space.

In the same /usr/local/freesurfer/data I run : "mri_vol2vol --lta 
registration.lta --mov 3D_T1_brain_mask.nii --o f-in-anat3.nii --s anatomical 
--fstarg"

To sum up, I am aiming to apply a transformation matrix on the T1 anatomical 
brain mask and transform it to the T1 space defined by 3D T1 image.
The problem is this command transforms orig.mgz file (a skull stripped T1 
image) instead of 3D_T1_brain_mask.nii.

Please, do you know where I make mistake?

Thanks a lot

Od: freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Douglas Greve 

Odesláno: sobota 15. února 2020 17:15
Komu: freesurfer@nmr.mgh.harvard.edu 
Předmět: Re: [Freesurfer] Apply transformation

Yes, mri_vol2vol

On 2/15/20 11:07 AM, Adam Rytina wrote:

External Email - Use Caution

Hello all,

I want to apply the saved transformation (a transformation matrix 4x4 acquired 
by registration of an anatomical and a diffusion image) on my input anatomical 
mask and change a final FOV by specifying a diffusion reference image (its 
voxels size). It means to apply the same command as the command ApplyXFM in FSL 
FLIRT. Does this option exist also in Freesurfer?

Thanks a lot
Regards
Adam




___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Apply transformation

2020-02-18 Thread Adam Rytina
External Email - Use Caution

Hello,

please, could you help me with this case? What am I doing wrong?

Thanks a lot


Od: freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Adam Rytina 

Odesláno: sobota 15. února 2020 19:52
Komu: Freesurfer support list 
Předmět: Re: [Freesurfer] Apply transformation


External Email - Use Caution

Thanks, unfortunately, I am making some mistake but I don´t know where.

First of all I run autorecon1 on my anatomical T1 data (the orig.mgz image is 
saved in /usr/local/freesurfer/subjects/anatomical).
Then in the /usr/local/freesurfer/data I run mri_robust register command of the 
T1 and diffusion DWI data. The registration.lta file is saved here.

Now I add an anatomical mask "3D_T1_brain_mask.nii" to the same folder 
/usr/local/freesurfer/data that I want to transform to the anatomical T1 space.

In the same /usr/local/freesurfer/data I run : "mri_vol2vol --lta 
registration.lta --mov 3D_T1_brain_mask.nii --o f-in-anat3.nii --s anatomical 
--fstarg"

To sum up, I am aiming to apply a transformation matrix on the T1 anatomical 
brain mask and transform it to the T1 space defined by 3D T1 image.
The problem is this command transforms orig.mgz file (a skull stripped T1 
image) instead of 3D_T1_brain_mask.nii.

Please, do you know where I make mistake?

Thanks a lot

Od: freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Douglas Greve 

Odesláno: sobota 15. února 2020 17:15
Komu: freesurfer@nmr.mgh.harvard.edu 
Předmět: Re: [Freesurfer] Apply transformation

Yes, mri_vol2vol

On 2/15/20 11:07 AM, Adam Rytina wrote:

External Email - Use Caution

Hello all,

I want to apply the saved transformation (a transformation matrix 4x4 acquired 
by registration of an anatomical and a diffusion image) on my input anatomical 
mask and change a final FOV by specifying a diffusion reference image (its 
voxels size). It means to apply the same command as the command ApplyXFM in FSL 
FLIRT. Does this option exist also in Freesurfer?

Thanks a lot
Regards
Adam




___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Apply transformation

2020-02-15 Thread Adam Rytina
External Email - Use Caution

Thanks, unfortunately, I am making some mistake but I don´t know where.

First of all I run autorecon1 on my anatomical T1 data (the orig.mgz image is 
saved in /usr/local/freesurfer/subjects/anatomical).
Then in the /usr/local/freesurfer/data I run mri_robust register command of the 
T1 and diffusion DWI data. The registration.lta file is saved here.

Now I add an anatomical mask "3D_T1_brain_mask.nii" to the same folder 
/usr/local/freesurfer/data that I want to transform to the anatomical T1 space.

In the same /usr/local/freesurfer/data I run : "mri_vol2vol --lta 
registration.lta --mov 3D_T1_brain_mask.nii --o f-in-anat3.nii --s anatomical 
--fstarg"

To sum up, I am aiming to apply a transformation matrix on the T1 anatomical 
brain mask and transform it to the T1 space defined by 3D T1 image.
The problem is this command transforms orig.mgz file (a skull stripped T1 
image) instead of 3D_T1_brain_mask.nii.

Please, do you know where I make mistake?

Thanks a lot

Od: freesurfer-boun...@nmr.mgh.harvard.edu 
 za uživatele Douglas Greve 

Odesláno: sobota 15. února 2020 17:15
Komu: freesurfer@nmr.mgh.harvard.edu 
Předmět: Re: [Freesurfer] Apply transformation

Yes, mri_vol2vol

On 2/15/20 11:07 AM, Adam Rytina wrote:

External Email - Use Caution

Hello all,

I want to apply the saved transformation (a transformation matrix 4x4 acquired 
by registration of an anatomical and a diffusion image) on my input anatomical 
mask and change a final FOV by specifying a diffusion reference image (its 
voxels size). It means to apply the same command as the command ApplyXFM in FSL 
FLIRT. Does this option exist also in Freesurfer?

Thanks a lot
Regards
Adam




___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Apply transformation

2020-02-15 Thread Douglas Greve

Yes, mri_vol2vol

On 2/15/20 11:07 AM, Adam Rytina wrote:


External Email - Use Caution

Hello all,

I want to apply the saved transformation (a transformation matrix 4x4 
acquired by registration of an anatomical and a diffusion image) on my 
input anatomical mask and change a final FOV by specifying a diffusion 
reference image (its voxels size). It means to apply the same command 
as the command ApplyXFM in FSL FLIRT. Does this option exist also in 
Freesurfer?


Thanks a lot
Regards
Adam



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] apply transformation using talairach.m3z

2017-10-22 Thread Bruce Fischl
glad to hear it worked! You can control the conversion to int by using

-odt, --out_data_type 

cheers
Bruce


On Sun, 22 Oct 2017, Gidon Levakov wrote:

> Hi,
> 
> I think I got the problem, just updating, so other people won't do the same 
> mistake:
> 
> The warp stored in the 'talairach.m3z' file should be applied on a conformed 
> volume, meaning the raw
> image after the the following command was cried out:
> "mri_convert img.nii.gz img_conformed.nii.gz --conform" (conform to 1mm voxel 
> size in coronal)
> 
> then the warp can simply applied by the following command:
> 'mri_convert img_conformed.nii.gz --apply_transform talairach.m3z -oc 0 0 0 
> img_warped.nii' (works
> for me!)
> 
> I also noticed that the '--conform' option convert the img data type to 
> integer (if it was float
> before, like in my case, where it turned all the values to 0). So you should 
> be aware to that.
> 
> Good luck!
> gidon l.
> 
> 
> 2017-10-19 16:40 GMT+03:00 Gidon Levakov :
>   Hi Freesurfer experts,
> 
> I have several nifti images (created with another software) in the subjects 
> original
> anatomical space (native space) that I want to transform to a common space 
> (freesurfer version
> of MNI305 should be fine) using non-linear transformation.
> 
> Reading a previous answer regarding this issue
> (https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2013-September/033556.html),
>  I
> understand I should use the mri_vol2vol command to apply the transformation 
> stored in the file
> mri/transforms/talairach.m3z (I already run recon all). But after checking 
> the result, the
> images are still not align with each other and do not resemble the 
> mni305.cor.mgz file.
> 
> I used the following command:
> 
> mri_vol2vol --m3z my_subjects_dir/sub_X/mri/transforms/talairach.m3z 
> --noDefM3zPath
> --reg_header --mov file_loc/img.nii.gz --targ 
> /usr/local/freesurfer/average/mni305.cor.mgz --o
> file_loc/img_warped.nii.gz
> 
> I also tried without the --reg_header option with no success.
> 
> Any idea what I am doing wrong? can you give me an example that works?
> 
> Thanks in advance!
> 
> Gidon l.
> 
> 
> 
> 
> 
> 
> 
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] apply transformation using talairach.m3z

2017-10-22 Thread Gidon Levakov
Hi,

I think I got the problem, just updating, so other people won't do the same
mistake:

The warp stored in the 'talairach.m3z' file should be applied on a *conformed
volume*, meaning the raw image after the the following command was cried
out:
"mri_convert img.nii.gz img_conformed.nii.gz --conform" (conform to 1mm
voxel size in coronal)

then the warp can simply applied by the following command:
'mri_convert img_conformed.nii.gz --apply_transform talairach.m3z -oc 0 0 0
img_warped.nii' (works for me!)

I also noticed that the '--conform' option convert the img data type to
integer (if it was float before, like in my case, where it turned all the
values to 0). So you should be aware to that.

Good luck!
gidon l.


2017-10-19 16:40 GMT+03:00 Gidon Levakov :

> Hi Freesurfer experts,
>
> I have several nifti images (created with another software) in the
> subjects original anatomical space (native space) that I want to transform
> to a common space (freesurfer version of MNI305 should be fine) using
> non-linear transformation.
>
> Reading a previous answer regarding this issue (
> https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/
> 2013-September/033556.html), I understand I should use the *mri_vol2vol*
> command to apply the transformation stored in the file
> *mri/transforms/talairach.m3z* (I already run recon all). But after
> checking the result, the images are still not align with each other and do
> not resemble the *mni305.cor.mgz* file.
>
> I used the following command:
>
> mri_vol2vol --m3z my_subjects_dir/sub_X/mri/transforms/talairach.m3z
> --noDefM3zPath --reg_header --mov file_loc/img.nii.gz --targ
> /usr/local/freesurfer/average/mni305.cor.mgz --o
> file_loc/img_warped.nii.gz
>
> I also tried without the --reg_header option with no success.
>
> Any idea what I am doing wrong? can you give me an example that works?
>
> Thanks in advance!
>
> Gidon l.
>
>
>
>
>
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.