It computes the registration file internally (but you can create one that is the identity matrix).
On 5/16/17 12:31 PM, Gamaliz wrote:
That did it. It also shows properly on my viewer. Where is that registration file that is called by using "--identity" ?
I would like to use this without having to decompress the whole of the freesurfer folder (just give the path to the command line)
Thanks for your help
Gabriel
On Tue, May 16, 2017 at 12:24 PM, Douglas Greve <greve@nmr.mgh.harvard.edu> wrote:
______________________________Try visualizing it in freeview instead of fslview.
On 5/16/17 12:11 PM, Gamaliz wrote:
Bruce,I tried mris_fill, but it gives me a filled white matter volume (I already have that in the mri directory. I need the contour only.
Douglas, Looking into the --help gave me a few ideas. I think the help page (https://surfer.nmr.mgh.harvard.edu/fswiki/mri_surf2vol ) should include this information.
I was able to create the volume by adding --identity, --template, and --mkmask.
The required surfval and volreg, are taken from the -mkmask and identity respectively.
The surface is created using the template from T1.mgz,, -mkmask works for me. However the orientation is wrong (and thus the registration). I wonder which file contains the correct registration (to give it as input to volreg. I tried using fstal 1 (this sets the template to mni305.cor.subfov1res.mgz and registration from mni305.cor.subfov1res.reg: That also gave me an unregistered output.
I guess the only piece of the puzzle I am missing is which registration file to use, so that the final volume is registered to the T1.mgz. This file must be there, as when loading the images into tkmedit they are registered.
here is the output of the execution. The reg files comes from using --identity. I wonder which reg file can I use.
test@ubuntudev12:~/Desktop/surftovol/user_id$ mri_surf2vol --mkmask --surf white --hemi lh --o out.nii.gz --template mri/T1.mgz --sd /home/test/Desktop/surftovol/ --subject user_id --identity user_id gdiagno = -1Using identity matrix for registrationOverriding reg subject user_id with user_idQa2v: SurfXYZ to VolCRS: -------------------------------1.000 0.000 0.000 128.000;0.000 0.000 -1.000 128.000;0.000 1.000 0.000 128.000;0.000 0.000 0.000 1.000;-------------------------------------------------- subjects dir /home/test/Desktop/surftovol/hemi lhmksurfmask 1projfrac 0outvol path out.nii.gztemplate path mri/T1.mgz------- Anat2Vol Registration (TkReg)----1.000 0.000 0.000 0.000;0.000 1.000 0.000 0.000;0.000 0.000 1.000 0.000;0.000 0.000 0.000 1.000;----------------------------------------- height = 256width = 256depth = 256xsize = 1.000000ysize = 1.000000zsize = 1.000000cdc = -1.000000 0.000000 0.000000rdc = 0.000000 0.000000 -1.000000sdc = 0.000000 1.000000 -0.000000xyz0 = -8.411377 8.796127 -0.092697Gdiag_no -1Reading surface /home/test/Desktop/surftovol//user_id/surf/lh.white Done reading source surfacesurf nframes = 1INFO: mapping vertices to closest voxelINFO: resampling surface to volumeINFO: sampled 61045 voxels in the volumeINFO: writing output volume to out.nii.gzdonetest@ubuntudev12:~/Desktop/surftovol/user_id$ mri_surf2vol --mkmask --surf white --hemi lh --o out.nii.gz --template mri/T1.mgz --sd /home/test/Desktop/surftovol/ --subject user_id --identity user_id
On Tue, May 16, 2017 at 11:08 AM, Douglas Greve <greve@nmr.mgh.harvard.edu> wrote:
______________________________If you run it with --help, it will print out examples. Did you try that?
On 5/16/17 9:26 AM, Bruce Fischl wrote:
Hi gAbE
you could try using mris_fill, or even mris_compute_volume_fractions
cheers
Bruce
On Mon, 15 May 2017, Gamaliz wrote:
<greve@nmr.mgh.harvard.edu>
My idea is to convert the registered white surface into a volume, so it can be shown in a volume viewer (not a surface viewer). I need to display a DTI image and mark the edges of the white matter as a line on top if it.
This is not the exact command, I am not sitting in front of my station, but it goes something like it. I tried many combinations, the general error was related to the template files not on the correct format (it could have been they couldn't be found to be opened too, the error seemed generic).
mri_surf2vol --surfval white --hemi lh --outvol test.mgz --template T1.mgz
--volreg T1.mgz --sd /home/user/Desktop/sf/sub1
I am at a loss for the --volreg flag.
The sd seems to indicate the directory of freesurfer (but then how is the co
mmand aware of the specficic subject I am trying to process? I tried using: --identity subject no luck.
'sub1' us my subject, located not in the default freesurfer directory.
There are no examples or a lot of help using it
https://surfer.nmr.mgh.harvard.edu/fswiki/mri_surf2vol
If this is not enough I can get back to you with the specific error tomorrow
.
On Mon, May 15, 2017 at 10:02 PM, Douglas Greve
wrote:
what was your mri_surf2vol cmd line? And what was the terminal
output?
On 5/15/17 9:59 PM, Gamaliz wrote:
I looked at the ribbon.mgz, but it is a pial surface, not
really delineated white matter the way I need it. There is
a command called mri_sur2vol, I have tried to use it, but
unsuccessfully, no idea if that is the solution to my
problem.
On Mon, May 15, 2017 at 9:57 PM, Douglas Greve
<greve@nmr.mgh.harvard.edu> wrote:
not sure what you mean. Have you looked at the
ribbon.mgz file?
On 5/15/17 5:20 PM, Gamaliz wrote:
I need to create an image which overlaps the
T1/mgz and the outer surface of the white
matter. How do I convert the surface into a
mgz volume?
--
gAbE
_______________________________________________
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
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.
-- gAbE
_______________________________________________
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
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
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.
--
gAbE
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.e du/mailman/listinfo/freesurfer _________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.e du/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.--gAbE_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.e du/mailman/listinfo/freesurfer _________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.e du/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.--gAbE_______________________________________________ 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
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.