[Freesurfer] min and max voxel values in tkmedit?
Hi, Ran into an odd problem with some of our scans. After processing the dicoms with recon-all autorecon2, we open the brain.mgz and T1.mgz images in tkmedit. The brain.mgz image tends to have terrible contrast. The problem seems to be the 'colorscale' for the image. The max values are around 185 (as compared to 244-254 for images acquired using a different scan protocol). Resetting the max to 254 fixes the problem. I am wondering if this indicates something went wrong in the automatic generation of the brain image? How would you go about forcing tkmedit to have the max value be 254 at startup (so the lab tech doesn't have to manually reset this each time she loads the image)? Include a tcl script on the command-line with SetVolumeMinMax 0 254 in it? Tkmedit reads the min and max values for the volumes when it loads them, correct? Note we only see this problem on some scans, not all. Also, we have scans from several projects/magnets/protocols. It is only one magnet/protocol where we see the problem. Thanks! details: FreeSurfer v3.0.3 on FC4. The scans in question are from a Siemens machine with the following specs (output of mri_convert): Identification NumarisVersyngo MR 2004A 4VA25A ScannerModel SonataVision Date and time StudyDate 20060429 StudyTime 093246.125000 SeriesTime110508.984000 AcqTime 105807.800018 Acquisition parameters PulseSeq *tfl3d1_ns Protocol unknown PhEncDir ROW EchoNo0 FlipAngle 7 EchoTime 3.93 InversionTime 1000 RepetitionTime2730 PhEncFOV 256 ReadoutFOV256 Image information RunNo 12 SeriesNo 13 ImageNo 1 NImageRows256 NImageCols256 NFrames 1 SliceArraylSize 1 IsMosaic 0 ImgPos 75.4460 179.1284 108.3390 VolRes 1. 1. 1. VolDim256 256 160 Vc 0.0209 -0.9998 0. Vr -0. -0. -1. Vs -0.9998 -0.0209 0. VolCenter -1.8558 49.4811 -19.6610 TransferSyntaxUID 1.2.840.10008.1.2.1 -- I'm only in it for the glory. Glenn Lawyer +352 661 967 244 Instituttgruppe for psykiatri Postboks 1130 Blindern 0318 Oslo http://folk.uio.no/davidgl :) ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] min and max voxel values in tkmedit?
Hi Glenn, I think it just depends on whether things like the orbital fat got stripped by the skull stripping. Nothing really to do with the intrinsic tissue contrast. Kevin: maybe you can put something in to allow the user to specify the max? Bruce On Mon, 27 Nov 2006, Glenn Lawyer wrote: Hi, Ran into an odd problem with some of our scans. After processing the dicoms with recon-all autorecon2, we open the brain.mgz and T1.mgz images in tkmedit. The brain.mgz image tends to have terrible contrast. The problem seems to be the 'colorscale' for the image. The max values are around 185 (as compared to 244-254 for images acquired using a different scan protocol). Resetting the max to 254 fixes the problem. I am wondering if this indicates something went wrong in the automatic generation of the brain image? How would you go about forcing tkmedit to have the max value be 254 at startup (so the lab tech doesn't have to manually reset this each time she loads the image)? Include a tcl script on the command-line with SetVolumeMinMax 0 254 in it? Tkmedit reads the min and max values for the volumes when it loads them, correct? Note we only see this problem on some scans, not all. Also, we have scans from several projects/magnets/protocols. It is only one magnet/protocol where we see the problem. Thanks! details: FreeSurfer v3.0.3 on FC4. The scans in question are from a Siemens machine with the following specs (output of mri_convert): Identification NumarisVersyngo MR 2004A 4VA25A ScannerModel SonataVision Date and time StudyDate 20060429 StudyTime 093246.125000 SeriesTime110508.984000 AcqTime 105807.800018 Acquisition parameters PulseSeq *tfl3d1_ns Protocol unknown PhEncDir ROW EchoNo0 FlipAngle 7 EchoTime 3.93 InversionTime 1000 RepetitionTime2730 PhEncFOV 256 ReadoutFOV256 Image information RunNo 12 SeriesNo 13 ImageNo 1 NImageRows256 NImageCols256 NFrames 1 SliceArraylSize 1 IsMosaic 0 ImgPos 75.4460 179.1284 108.3390 VolRes 1. 1. 1. VolDim256 256 160 Vc 0.0209 -0.9998 0. Vr -0. -0. -1. Vs -0.9998 -0.0209 0. VolCenter -1.8558 49.4811 -19.6610 TransferSyntaxUID 1.2.840.10008.1.2.1 -- I'm only in it for the glory. Glenn Lawyer +352 661 967 244 Instituttgruppe for psykiatri Postboks 1130 Blindern 0318 Oslo http://folk.uio.no/davidgl :) ___ 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] vertex coordinates / volume coordinates + Folding Index
On 25 Nov 2006, at 15:08, Bruce Fischl wrote: Hi Roberto, no, nothing built in, but you could always mask it to the label in matlab. I guess we could provide an mris_mask utility if that would be helpful. thanks Bruce, I've been trying to compute the folding index (FI) based on the max/ min files generated by mris_curvature, but I'm obtaining different values . When I load a surface the np vertices are in p[], the nt triangles in t[], then max/min curvatures are in max[] and min[] respectively. This is what I'm doing next FI=0; for(i=0;int;i++) { //triangle vertices' indices i0=t[3*i+0]; i1=t[3*i+1]; i2=t[3*i+2]; // triangle area area=triangle_area(p[3*i0],p[3*i1],p[3*i2]); // FI at the vertices fi0=fabs(max[i0])*(fabs(max[i0])-fabs(min[i0])); fi1=fabs(max[i1])*(fabs(max[i1])-fabs(min[i1])); fi2=fabs(max[i2])*(fabs(max[i2])-fabs(min[i2])); // integration of FI over the triangle FI+=area*(fi0+fi1+fi2)/3.0; } FI=FI/(float)(4*3.141592653589793); for every triangle the algorithm computes the value of FI at the vertices and integrates over the triangle. The values I'm obtaining are larger than those reported by mris_curvature (4585 instead of 2537, or 4408 instead of 2750, for example). Furthermore, in the paper where Van Essen introduces the FI, he reports a value of 510 for a hemisphere of the Visible Man! Is there something tha I'm missing? thanks in advance! roberto This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] min and max voxel values in tkmedit?
You can use the -mm-main option: -mm-main min max : color scale min and max for main volume -mm-aux min max : color scale min and max for aux volume e.g. $ tkmedit bert T1.mgz -mm-main 0 255 On Mon, Nov 27, 2006 at 07:35:18AM -0500, Bruce Fischl wrote: Hi Glenn, I think it just depends on whether things like the orbital fat got stripped by the skull stripping. Nothing really to do with the intrinsic tissue contrast. Kevin: maybe you can put something in to allow the user to specify the max? Bruce On Mon, 27 Nov 2006, Glenn Lawyer wrote: Hi, Ran into an odd problem with some of our scans. After processing the dicoms with recon-all autorecon2, we open the brain.mgz and T1.mgz images in tkmedit. The brain.mgz image tends to have terrible contrast. The problem seems to be the 'colorscale' for the image. The max values are around 185 (as compared to 244-254 for images acquired using a different scan protocol). Resetting the max to 254 fixes the problem. I am wondering if this indicates something went wrong in the automatic generation of the brain image? How would you go about forcing tkmedit to have the max value be 254 at startup (so the lab tech doesn't have to manually reset this each time she loads the image)? Include a tcl script on the command-line with SetVolumeMinMax 0 254 in it? Tkmedit reads the min and max values for the volumes when it loads them, correct? Note we only see this problem on some scans, not all. Also, we have scans from several projects/magnets/protocols. It is only one magnet/protocol where we see the problem. Thanks! details: FreeSurfer v3.0.3 on FC4. The scans in question are from a Siemens machine with the following specs (output of mri_convert): Identification NumarisVersyngo MR 2004A 4VA25A ScannerModel SonataVision Date and time StudyDate 20060429 StudyTime 093246.125000 SeriesTime110508.984000 AcqTime 105807.800018 Acquisition parameters PulseSeq *tfl3d1_ns Protocol unknown PhEncDir ROW EchoNo0 FlipAngle 7 EchoTime 3.93 InversionTime 1000 RepetitionTime2730 PhEncFOV 256 ReadoutFOV256 Image information RunNo 12 SeriesNo 13 ImageNo 1 NImageRows256 NImageCols256 NFrames 1 SliceArraylSize 1 IsMosaic 0 ImgPos 75.4460 179.1284 108.3390 VolRes 1. 1. 1. VolDim256 256 160 Vc 0.0209 -0.9998 0. Vr -0. -0. -1. Vs -0.9998 -0.0209 0. VolCenter -1.8558 49.4811 -19.6610 TransferSyntaxUID 1.2.840.10008.1.2.1 -- I'm only in it for the glory. Glenn Lawyer +352 661 967 244 Instituttgruppe for psykiatri Postboks 1130 Blindern 0318 Oslo http://folk.uio.no/davidgl :) ___ 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 -- Kevin Teich ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] ASL perfusion maps
Hi all I have collected some raw Arterial Spin Labeling (ASL) data. I would like to use freesurfer to create perfusion maps of this data. Is it possible to take the raw data, motion correct it, perform a pairwise subtraction, and then average all the subtractions to create a mean perfusion map? Please let me know if you have ideas on how to do this sort of thing. Thanks Abi -- Abilash A. Gopal Doris Duke Research Fellow, Harvard Medical School MD Candidate 2008, Tufts Medical School ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Partial brain statistics registered to a full brain surface-based map?
With your assurance, I found my problem; the partial brain lines up fine the with full brain using both tkmedit and tksurfer for the individual when using the anat2exf.dat conversion matrix. I was expecting a more hard-cut at the edge of the partial brain as viewed with tksurfer. As an aside, my mris_preproc version is 1.18.2.1. This actually brings me to the next question regarding partial brain statistical images: when I perform a group analysis on partial brain statistical images, should the entire average surface-based brain contain statistics (sig.mgz)? Depending on the subject, the extent of brain acquired is different, but does the GLM (using mri_glmfit) calculate the statistics even where only a subset of subjects have data? When FSL analyzes such data, it performs the GLM on a mask that corresponds only to the areas that overlap in all the subjects. Is there an equivalent mask that can be generated in Freesurfer to mask out the statistics that are based on a subset of subjects? I have used mris_preproc to generate cope images (contrast of parameter estimates) for each subject in average space (which appear to be correct). I've run mri_concat to compile the subjects' results together, run mri_glmfit, and have resulting statistics that encompass the entire surface of the average. Thanks, Eric On Nov 22, 2006, at 7:03 PM, Doug Greve wrote: Hmm, there's something fishy here. If the tkmedit command worked, then the 2nd tksurfer cmd (onto SUBJ1) should have worked. The first tksurfer command should NOT have worked as the registration would not be correct for for the average subject. Are you sure you did not reverse these? Which version of mris_preproc are you running? Run with --version to check. doug On Wed, 22 Nov 2006, Eric Moulton wrote: Mapping to the subject's own surface looks promising, but I'm ultimately not seeing what I think should be correct. Let me give you some examples of how I've reached this observation. Note that anat2exf.register.dat is the same for all the command lines listed below. Statistical image overlaid on the subject's orig.mgz brain. tkmedit SUBJ1 orig.mgz lh.white -overlay zstat1.nii.gz -overlay- reg anat2exf.register.dat OK - This looks as expected...partial brain statistical map overlying the full brain in the correct area. Statistical image overlaid on a group average surface-based full brain tksurfer average lh inflated -overlay zstat1.nii.gz -overlay-reg anat2exf.register.dat OK - This seems to match well with the image displayed using tkmedit. Statistical image overlaid on the subject's surface-based full brain tksurfer SUBJ1 lh inflated -overlay zstat1.nii.gz -overlay-reg anat2exf.register.dat Not OK - Statistical values are spread across the entire full brain. After I run mris_preproc --out lh-zstat1.mgz --target average -- hemi lh --mean --iv zstat1.nii.gz anat2exf.register.dat, the output looks incorrect when viewing the result with the following: tksurfer average lh inflated -overlay lh-zstat1.mgz The statistics have spread to fill the surface. Including the flag - overlay-reg anat2exf.register.dat with this tksurfer command line offers the same incorrect result. I hope that this will help us to correct this registration issue. Any catches as to what might be wrong? Thanks, Eric On Nov 21, 2006, at 5:17 PM, Doug Greve wrote: Yes, it is possible. As long as the registration looks good in tkmedit/tkregister2, then it should accurately map to the surface, even a to a different target surface. What are you using to view the surface? One thing you should check though is whether it mapping as expected to the subject's own surface. You can do this with tksurfer subjname lh inflated -overlay zstat1.nii.gz -overlay-reg register.dat doug [EMAIL PROTECTED] wrote: Can a partial brain statistical image volume be accurately registered to a whole brain surface-based map? When I try to convert a partial brain statistical file (zstat1.nii.gz, created using FSL) into an overlay for a surface-based full brain (created using FreeSurfer), the result is a statistical overlay that spreads across the entire surface of the brain. My command line looks like this: mris_preproc --out lh-zstat1.mgz ?target SUBJ1 --hemi lh --mean --iv zstat1.nii.gz ../../../anat/Dummy.feat/reg/freesurfer/anat2exf.register.dat My register.dat transformation matrices work fine when I use tkmedit to view the cope1.nii.gz image as an overlay of the orig.mgz file (partial brain zstats where I would expect them on the image of the full brain). Does mris_preproc adher strictly to the register.dat parameters, or is it possibly over-ridden by the ?target surface? Thanks, Eric Any information, including protected health information (PHI), transmitted in this email is intended only for the person or entity to which it is addressed and may contain information that is privileged,
Re: [Freesurfer] Extracting surface normals using mri_surf2surf
You can't use analyze for this because the number of vertices is a prime number. No dimension in an analyze file can exceed 32k. Usually, we get around this by dividing up the vertices across mutiple slices, but this is not possible when the number of vert is prime. NIFTI inherited the same problem. Try using mgh instead. doug On Wed, 22 Nov 2006, XJ Kang wrote: Hi, All, I am trying to extract the surface normal values using mri_surf2surf: %mri_surf2surf --s subject1 --hemi lh --sval-nxyz white --tval lh.white.surfn.img --trg_type analyze4d The error mesage is : .. Loading source data Extracting surface normals INFO: surfcluster: NOT fixing group surface area INFO: trgsubject = srcsubject Saving target data Reshaping 131441 (nvertices = 131441) ANALYZE FORMAT ERROR: nslices 131441 in volume exceeds 32768 I am using FreeSurfer v303. I tested the above command on the subjects inflated by old version of FreeSurfer, and I could get the surface normals. Anything wrong with the new inflation? Thank you for your time. XJ Kang ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] make_average problem
Can you normally create symbolic links? On Thu, 23 Nov 2006 [EMAIL PROTECTED] wrote: Dear freesurfers, running the script make_average_subject produces constantly only the rh_* files. The error message at the end is: ln: creating symbolic link `rh.sphere' to `rh.sphere.reg': Operation not supported Any suggestions why the lh_* files are missing are greatly appreciated. Running fedora core under vmware. Thanks Bogdan ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] vertex coordinates / volume coordinates
one more thing is that you can use mri_surf2vol to put the surface back into a volume. On Sat, 25 Nov 2006, Bruce Fischl wrote: Hi Robert, it's a bit complicated for the dreaded historical reasons. The surfaces are built from conformed volumes (1mm isotropic, with center ras voxel at the center of the volume). It's documented in gory detail (thanks Doug!) at: http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems all of the relevant transforms can be extracted with mris_info (for surfaces) and mri_info (for volumes). If all you want is to extrat the voxel coord for the white or pial surface in one of the conformed volumes it's only a single transform. If you want to get back to the unconformed ones (e.g. the input to recon-all), then you'll need to compose a few of them. cheers, Bruce p.s. the voxel coords of a vertex should be the same in all the conformed volumes (orig.mgz, T1.mgz, brainmask.mgz, wm.mgz, etc...) On Thu, 23 Nov 2006, Roberto Toro wrote: Hello, I have a C code that reads FS surfaces and does some processing on them. I would like to map this back to the original MRI volume. Googling around I found that vertex coordinates may correspond to coordinates in the COR volume but COR volumes are now deprecatedso two questions: 1. what is the relationship between vertex coordinates and volume coordinates? 2. is there a special volume where vertex coordinates just map volume coordinates? thank you very much! roberto This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. ___ 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 -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] group level analysis
Use mri_vol2surf to convert the individual vols to surface overlays, then use mri_concat to put them together as a multi-frame file. Or you can use mris_preproc to do all of this. They both have --help with more info. doug On Mon, 27 Nov 2006, Emily Cooper wrote: Hi, I have functional datasets (.HEAD and .BRIK) from Afni that I'm trying to analyze in the surface domain using Freesurfer. I have Freesurfer anatomical surfaces for all my subjects, and have managed to use the tkmedit and tksurfer gui's to map my functional overlays (using the calculate identity matrix option) onto the volume and surface. What I'd like to do now is map the functional data onto a surface with a common number of nodes so that I can extract a matrix of beta values and do group level analysis using R. Tksurfer seems to be able to do this with the Save plotted data to table option (greyed over right now), however, I've read in other messages on the mail archive that the sphere.reg surface is not in common space. I've been trying to use func2sph-sess, but I seem to be missing something, getting ERROR: cannot find any sessions. Maybe that's the wrong way to go about it? Thanks, Emily -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] ASL perfusion maps
Indeed - you don't just want to do pairwise subtraction Abi, it's better to do sub-TR timing-adjustment on the tagged and control data before subtraction - if you look in the latest version of FEAT in FSL you'll see options for easy preprocessing of ASL data. You would then be able to use the normal methods for transferring FEAT data into FreeSurferSpace. Cheers, Steve. On 27 Nov 2006, at 17:47, Doug Greve wrote: We don't have an MC program. You can try running FSL's FLIRT or AFNI's 3dvolreg. As for analysis, you should be able run mri_concat --paired-diff --mean inputaslvolume outputvolume I've never actually tried it like this, but it should work. doug On Mon, 27 Nov 2006, Abi Gopal wrote: Hi all I have collected some raw Arterial Spin Labeling (ASL) data. I would like to use freesurfer to create perfusion maps of this data. Is it possible to take the raw data, motion correct it, perform a pairwise subtraction, and then average all the subtractions to create a mean perfusion map? Please let me know if you have ideas on how to do this sort of thing. Thanks Abi -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer --- Stephen M. Smith, Professor of Biomedical Engineering Associate Director, Oxford University FMRIB Centre FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK +44 (0) 1865 222726 (fax 222717) [EMAIL PROTECTED]http://www.fmrib.ox.ac.uk/~steve --- ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer