Re: [Freesurfer] Extract mean time series from parcellated region

2015-01-27 Thread sabin khadka
Hi Doug- The command doesn't error out but it just give me one value. I was 
assuming the following command would give me value in  time series x mean value 
in text file. Am I following correct strategy/commands? Cheers,
Sabin Khadka
  From: Douglas Greve gr...@nmr.mgh.harvard.edu
 To: sabin khadka sabink...@yahoo.com; Freesurfer Support List 
freesurfer@nmr.mgh.harvard.edu 
 Sent: Monday, January 26, 2015 5:33 PM
 Subject: Re: [Freesurfer] Extract mean time series from parcellated region
   
 
 what do you mean you can't get them? The program fails? It produces 0s?
 
 

On 1/26/15 3:48 PM, sabin khadka wrote:
  
  Hi FS user, 
  I am trying to extract time series of fmri rest data of certain parcellated 
regions (both cortical and subcortical). for that I am doing following
  
  # bbregister --s sub id --mov EPI.nii.gz --init-fsl --reg register.dat 
--bold # mri_label2vol --aparc+aseg --subject sub id --temp EPI.nii.gz 
--fillthresh 0.5 --reg regsiter.dat --o test1.nii.gz
  # mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz --reg 
register.dat --o test2.nii.gz # mri_segstats --seg sub id/mri/aparc+aseg.mgz 
--id e.g. 11 for L caudate --in test2.nii.gz --avgwf textfile.txt
I am not able to get the mean time series values. Could anyone tell me what 
I am missing?
     Cheers,
 Sabin Khadka  
 
 
___
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.


  ___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Ben Eliezer, Noam
— I (think that) I am not really interested in converting into rawavg 
coordinate system, but just need to register my T2 maps to the segmentation 
maps.
So, I guess that aseg+aparc.mgz will suffice in my case

— Regarding the mean +- std values:
Yes - the T2 maps are whole brain. could that account for the large STD?

I have tried running it w/o --seg-erode.… the mean values stay similar yet, the 
standard-deviation increases significantly.
I’ve also tried erode=2 pixels, which gave identical results to erode=1 pixel.

With erode (2 pixels):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2125567   125567.0  Left-Cerebral-White-Matter97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter  1.2395
15.3000 0.   453.   453.

With erode (1 pixel):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2125567   125567.0  Left-Cerebral-White-Matter97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter  1.2395
15.3000 0.   453.   453.

Without erode:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2193533   193533.0  Left-Cerebral-White-Matter99.1265   
125.6069 0.  4000.  4000.
  2   7 1779417794.0  Left-Cerebellum-White-Matter   7.2259
65.3060 0.  4000.  4000.
  3  41197895   197895.0  Right-Cerebral-White-Matter   96.9839   
115.9002 0.  4000.  4000.
  4  46 1799917999.0  Right-Cerebellum-White-Matter  6.0798
88.1490 0.  4000.  4000.

It’s indeed encouraging that using the erode option decreases the STD, but I’m 
still wondering whether there a way to validate accuracy of the values.

Thanks!
 Noam


On Jan 27, 2015, at 6:50 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edumailto:gr...@nmr.mgh.harvard.edu wrote:


On 1/27/15 12:38 PM, Ben Eliezer, Noam wrote:
Thanks Doug.

I’ve made two changes to the set of commands.

1. Following your suggestion, I’ve shifted from --init-spm to --init-header and 
now tkregister2 shows that the registration is OK.

 tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!


2. When loading the result of vol2vol command (T2_siemens_reg.mgz):
   mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o T2_siemens_reg.mgz 
--reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg through plane 
versus the segmentation maps — in short they do not match in orientation.

I’ve solved this by changing from using aseg+aparc-in-rawavg.mgz to 
aseg+aparg.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz --interp 
 nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg

Question1: Is that a correct approach? not to use the rawavg coordinate system?
Oh, I did not see that. Yes, that is the problem. If you want to use the rawavg 
coordinate system, then you'll have to create another registration file because 
the one that you have only goes between the T2 and the conformed 256 1mm space. 
Let me know if that is what you want.

—

Now, I re- gather statistics using:
 mri_segstats --seg $FSsubjDIR/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
 T2_siemens_stats.stats --seg-erode 1

and get the following values:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2125567   125567.0  Left-Cerebral-White-Matter97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter  1.2395
15.3000 0.   453.   453.

Question 2:
Is there any way to verify that these values are accurate…?
(I am a little worried by the large standard deviation values)
Yes, I see what you mean. Is the T2 whole brain? Have you tried it without 
--seg-erode?

Thanks again for the prompt replies,
 — Noam



On Jan 27, 2015, at 6:02 PM, Douglas Greve 

Re: [Freesurfer] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Ben Eliezer, Noam
The maps were generated by Siemens scanner, fitting a multi-spin-echo protocol.

I see your point, though. The values should not range between 0 to 4000. The 
latter 4000 value is the background out-of-brain map value.
But when looking at the T2_siemens_reg.mgz, overlaid on the aparc+aseg.mgz in 
freeview, the white matter (segment #2) seems well within the brain, and does 
not include any parts that have value = 0 or 4000.

Question 1: is it possible to look at the actual set of values that are used to 
calculate these mean and STD result?
This would probably give some hint as to the large std. Perhaps there are small 
number of outliers that contribute to the large variation?

Question 2: (just to put my mind at rest): if both tkregister2 and freeview 
show show that the maps register accurately on the segmentation data, does it 
mean that mri_segstats masks the T2 maps correctly?
I’m asking this because if the segmentation masks are off by, e.g., 90-degree, 
it would cause to a large number of values=4000 to be included in the mean/std 
values.

Thanks!
 — Noam

On Jan 27, 2015, at 7:30 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edumailto:gr...@nmr.mgh.harvard.edu wrote:


It is finding 0s in the T2 (the range is 0-4000). I'm not sure about the 4000, 
but the 0s indicate that something is strange with that image. How was it 
created?

On 1/27/15 1:22 PM, Ben Eliezer, Noam wrote:
— I (think that) I am not really interested in converting into rawavg 
coordinate system, but just need to register my T2 maps to the segmentation 
maps.
So, I guess that aseg+aparc.mgz will suffice in my case

— Regarding the mean +- std values:
Yes - the T2 maps are whole brain. could that account for the large STD?

I have tried running it w/o --seg-erode.… the mean values stay similar yet, the 
standard-deviation increases significantly.
I’ve also tried erode=2 pixels, which gave identical results to erode=1 pixel.

With erode (2 pixels):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2125567   125567.0  Left-Cerebral-White-Matter97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter  1.2395
15.3000 0.   453.   453.

With erode (1 pixel):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2125567   125567.0  Left-Cerebral-White-Matter97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter  1.2395
15.3000 0.   453.   453.

Without erode:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2193533   193533.0  Left-Cerebral-White-Matter99.1265   
125.6069 0.  4000.  4000.
  2   7 1779417794.0  Left-Cerebellum-White-Matter   7.2259
65.3060 0.  4000.  4000.
  3  41197895   197895.0  Right-Cerebral-White-Matter   96.9839   
115.9002 0.  4000.  4000.
  4  46 1799917999.0  Right-Cerebellum-White-Matter  6.0798
88.1490 0.  4000.  4000.

It’s indeed encouraging that using the erode option decreases the STD, but I’m 
still wondering whether there a way to validate accuracy of the values.

Thanks!
 Noam


On Jan 27, 2015, at 6:50 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edumailto:gr...@nmr.mgh.harvard.edu wrote:


On 1/27/15 12:38 PM, Ben Eliezer, Noam wrote:
Thanks Doug.

I’ve made two changes to the set of commands.

1. Following your suggestion, I’ve shifted from --init-spm to --init-header and 
now tkregister2 shows that the registration is OK.

 tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!


2. When loading the result of vol2vol command (T2_siemens_reg.mgz):
   mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o T2_siemens_reg.mgz 
--reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg through plane 
versus the segmentation maps — in short they do not match in orientation.

I’ve solved this by changing from using aseg+aparc-in-rawavg.mgz to 
aseg+aparg.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz --interp 
 nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg

Question1: Is that a correct approach? not to use the rawavg coordinate system?
Oh, I did not see that. Yes, that is the problem. If you 

Re: [Freesurfer] retinotopy in subject volumetric space

2015-01-27 Thread Benjamin Zimmerman
Hello,

When I try your recommended code, I am able to get the data back into
volumetric space, but one hemisphere's cortex is significantly thinner than
the other. If I do mri_surf2vol separately on each hemisphere, I don't have
this problem. It seems to occur only if I try merging the two files. I
assume that this is because I am using the volume that I am merging to as a
template instead of inputting the template directly. Do you have any ideas
how to solve this problem?

Thanks for your help,

Ben







On Wed, Dec 24, 2014 at 2:57 PM, Douglas Greve gr...@nmr.mgh.harvard.edu
wrote:


 I don't think we have a tool to display the color wheel in a volume.
 FreeView might be able to do it. For the color wheel in tksurfer, you are
 looking at the angle file (one for eccen and one for polar), so you would
 map them. You can run mri_surf2vol something like

 mri_surf2vol --surfval lh.angle.nii.gz --identity yoursubject --hemi lh
 --template path/orig.mgz --fillribbon --o vol.angle.mgz
 mri_surf2vol --surfval rh.angle.nii.gz --identity yoursubject --hemi rh
 --fillribbon --merge vol.angle.mgz --o vol.angle.mgz

 doug


 On 12/18/14 1:24 PM, Benjamin Zimmerman wrote:

 I mean the individual's anatomical volumetric space.

 On Thu, Dec 18, 2014 at 11:53 AM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu wrote:


 What do you mean by the individual's volumetric space? The anatomical
 space or the functional space?


 On 12/16/2014 05:18 PM, Benjamin Zimmerman wrote:
  Thanks for the advice. I thought I would like to use mri_surf2vol, but
  I am a little confused about the parameters and how they relate to
  what the retinotopy analysis outputs.
 
  To be explicit, I want to view the real.nii.gz and imag.nii.gz files
  in an individual's volumetric space. I can load these as overlays to
  the inflated surface using tksurfer subject hemisphere inflated.
  Then I can configure the overlay to use a color wheel color scale and
  display as complex to see the retinotopic mapping.
 
  I'm not sure how I would go about using mri_surf2vol to recreate this
  map in volumetric space. Should I just use real.nii.gz and imag.nii.gz
  as surfval? Where is the registration file outputted in a retinotopy
  analysis?
 
  Thank you for any more help that you can provide,
 
  Ben
 
  On Mon, Dec 15, 2014 at 3:26 PM, dgw dgwake...@gmail.com
  mailto:dgwake...@gmail.com wrote:
 
  Hi Ben,
 
  You should be able to map it back with mri_surf2vol. I haven't done
  this, but the wiki page looks fairly detailed:
  http://surfer.nmr.mgh.harvard.edu/fswiki/mri_surf2vol
 
  HTH
  D
 
  On Mon, Dec 15, 2014 at 3:43 PM, Benjamin Zimmerman
  benjamin.zimmerm...@gmail.com
  mailto:benjamin.zimmerm...@gmail.com wrote:
   Hi all,
  
   FsFast has an excellent individual retinotopy analysis that
  allows me to see
   phase data on the inflated surface of the brain. Is there a way
  to view the
   results of the retinotopy analysis in the subject's original
  volumetric
   space rather than on the subject's surface space?
  
   Thank you for any help,
  
   Ben
  
   ___
   Freesurfer mailing list
   Freesurfer@nmr.mgh.harvard.edu
  mailto: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.
  
  ___
  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

 --
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

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



 ___
 Freesurfer mailing 
 

[Freesurfer] eTIV correction and registration in common space

2015-01-27 Thread stdp82
Hi list,please, I have two questions:a) subcortical volume correction in 
cross-sectional studies could be done by using total GM as covariate instead of 
eTIV?b) relatively to group subcortical analysis in cross-sectional studies, 
the anatomical images should be necessarily transformed  in common space or is 
possible to perform the analysis in native space?The registration in common 
space should minimize issues due to different head size. The computation on 
native space could bias the results considering the different head sizes among 
subjects?Thanks,

Stefano   ___
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] Converting dicom images to nifti

2015-01-27 Thread Bruce Fischl
p.s. sorry, I missed the multiframe part. I guess dcmunpack and 
mri_convert won't work, but maybe decompressing and using something else 
afterwards will do the trick?
On Tue, 27 Jan 2015, Douglas Greve wrote:

 If you run it with --help there will be lots of documentation and examples.
 It will not be able to convert the multiframe dicom files though
 
 On 1/27/15 12:24 PM, pradeep mahato wrote:

   Please tell how to use dcmunpack. Any help converting dicom to
   nii.

   On Jan 27, 2015 9:03 PM, Douglas Greve
   gr...@nmr.mgh.harvard.edu wrote:

 Hi Pradeep, I don't think that we can convert that
 either. Sorry.
 doug

 On 1/27/15 7:18 AM, pradeep mahato wrote:
   Hi experts,
 
 I am trying to convert dicom images namely
 00A0,00A1,00A2 [ No file extension ] etc.
 These are generated by Philips machine. I used dcm2nii, it
 does not give correct result. It gives warning : this
 software will only convert the first slice of this
 multislice lossless compressed JPEG . In one thread I read
 that dicom images from Philips scanner are oriented
 differently.
 
 I tried to use dcmunpack method, but I am not able to save
 the converted image.
 I used dcmunpack -src srcDirc. Please share the correct
 procedure.
 
 In one of the subjects I have very less number of
 images:30. Is it necessary to have more dicom images to
 have a better brain mri image . If yes, what should be the
 optimal number of images
 
 Thanking You
 
 Pradeep Kumar Mahato
 
 
 ___
 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.
 
 
 
 ___
 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] Extract mean time series from parcellated region

2015-01-27 Thread sabin khadka
Works fine. thanks for the help Doug. Cheers,
Sabin Khadka
  From: Douglas Greve gr...@nmr.mgh.harvard.edu
 To: sabin khadka sabink...@yahoo.com; Freesurfer support list 
freesurfer@nmr.mgh.harvard.edu 
 Sent: Tuesday, January 27, 2015 12:33 PM
 Subject: Re: [Freesurfer] Extract mean time series from parcellated region
   
 
 That label2vol command maps the aseg into the epi space to create test1 so it 
will only have 1 frame. The epi never comes  into play there except as a 
geometry template. If you want to extract a time course from the epi, then map 
it to the anatomical space with that vol2vol command using the epi as the 
--mov, then run mri_segstats. That label2vol command is not necessary. 
 
 doug
 
 
 

On 1/27/15 12:13 PM, sabin khadka wrote:
  
  Hi doug. I now see the problem. When I run mri_info the test1.nii.gz and 
test2.nii.gz both have only 1 frame. But when I run  # mri_label2vol 
--aparc+aseg --subject sub id --temp EPI.nii.gz --fillthresh 0.5 --reg 
regsiter.dat --o test1.nii.gz # mri_vol2vol --mov test1.nii.gz --targ sub 
id/mri/aparc+aseg.mgz --reg register.dat --o test2.nii.gz EPI.nii.gz is 4D 
image with 210 frames. How can I get test1.nii.gz and test2.nii.gz in 4D 
format? Should be something basic but I could not figure out how. 
  I appreciate your help!!
     Cheers,
 Sabin Khadka 
  From: Douglas Greve gr...@nmr.mgh.harvard.edu
 To: sabin khadka sabink...@yahoo.com; Freesurfer support list 
freesurfer@nmr.mgh.harvard.edu 
 Sent: Tuesday, January 27, 2015 10:31 AM
 Subject: Re: [Freesurfer] Extract mean time series from parcellated region
   
   
 It all looks correct. How many frames does test2.nii.gz have? Try running 
mri_info test2.nii.gz to see
 
 
 
   On 1/27/15 9:05 AM, sabin khadka wrote:
  
  Hi Doug- The command doesn't error out but it just give me one value. I was 
assuming the following command  would give me value in  time series x mean 
value in text file. Am I following correct strategy/commands?   Cheers,
 Sabin Khadka 
  From: Douglas Greve gr...@nmr.mgh.harvard.edu
 To: sabin khadka sabink...@yahoo.com; Freesurfer Support List 
freesurfer@nmr.mgh.harvard.edu 
 Sent: Monday, January 26, 2015 5:33 PM
 Subject: Re: [Freesurfer] Extract mean time series from parcellated region
   
   
 what do you mean you can't get them? The program fails? It produces 0s?
 
 
 
   On 1/26/15 3:48 PM, sabin khadka wrote:
  
  Hi FS user, 
  I am trying to extract time series of fmri rest data of certain parcellated  
regions (both cortical and subcortical). for that I am doing following
  
  # bbregister --s sub id --mov EPI.nii.gz --init-fsl --reg register.dat 
--bold # mri_label2vol --aparc+aseg --subject sub id --temp EPI.nii.gz 
--fillthresh 0.5 --reg regsiter.dat --o test1.nii.gz
  # mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz --reg 
register.dat --o test2.nii.gz # mri_segstats --seg sub id/mri/aparc+aseg.mgz 
--id e.g. 11 for L caudate --in test2.nii.gz --avgwf textfile.txt
I am not able to get the mean time series values. Could anyone tell me  
what I am missing?
     Cheers,
 Sabin Khadka  
  
   
 ___
 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.
  
 
 
  
   
 ___
 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.
  
 
 
 
 
___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Douglas Greve


It is finding 0s in the T2 (the range is 0-4000). I'm not sure about the 
4000, but the 0s indicate that something is strange with that image. How 
was it created?


On 1/27/15 1:22 PM, Ben Eliezer, Noam wrote:
— I (think that) I am not really interested in converting into rawavg 
coordinate system, but just need to register my T2 maps to the 
segmentation maps.

So, I guess that aseg+aparc.mgz will suffice in my case

— Regarding the mean +- std values:
Yes - the T2 maps are whole brain. could that account for the large STD?

I have tried running it w/o --seg-erode.… the mean values stay similar 
yet, the standard-deviation increases significantly.
I’ve also tried erode=2 pixels, which gave identical results to 
erode=1 pixel.


With erode (2 pixels):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2125567   125567.0  Left-Cerebral-White-Matter   97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter   1.2395  
  15.3000 0.   453.   453.


With erode (1 pixel):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2125567   125567.0  Left-Cerebral-White-Matter 97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter 1.1878
14.7193 0.   608.   608.
  3 41130433   130433.0  Right-Cerebral-White-Matter 96.1764
60.0490 0.  4000.  4000.
  4 46 1155111551.0  Right-Cerebellum-White-Matter 1.2395
15.3000 0.   453.   453.


Without erode:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2193533   193533.0  Left-Cerebral-White-Matter   99.1265   
125.6069 0.  4000.  4000.
  2   7 1779417794.0  Left-Cerebellum-White-Matter   7.2259
65.3060 0.  4000.  4000.
  3  41197895   197895.0  Right-Cerebral-White-Matter   96.9839   
115.9002 0.  4000.  4000.
  4  46 1799917999.0  Right-Cerebellum-White-Matter   6.0798  
  88.1490 0.  4000.  4000.


It’s indeed encouraging that using the erode option decreases the STD, 
but I’m still wondering whether there a way to validate accuracy of 
the values.


Thanks!
 Noam


On Jan 27, 2015, at 6:50 PM, Douglas Greve gr...@nmr.mgh.harvard.edu 
mailto:gr...@nmr.mgh.harvard.edu wrote:




On 1/27/15 12:38 PM, Ben Eliezer, Noam wrote:

Thanks Doug.

I’ve made two changes to the set of commands.

*1.* Following your suggestion, I’ve shifted from --init-spm to 
--init-header and now tkregister2 shows that the registration is OK.


tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!


*2.* When loading the result of vol2vol command (T2_siemens_reg.mgz):
   mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o 
T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg 
through plane versus the segmentation maps — in short they do not 
match in orientation.


I’ve solved this by changing from using aseg+aparc-in-rawavg.mgz to 
aseg+aparg.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz 
--interp nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat 
--no-save-reg


_Question1:_ Is that a correct approach? not to use the rawavg 
coordinate system?
Oh, I did not see that. Yes, that is the problem. If you want to use 
the rawavg coordinate system, then you'll have to create another 
registration file because the one that you have only goes between the 
T2 and the conformed 256 1mm space. Let me know if that is what you want.


—

Now, I re- gather statistics using:
 mri_segstats --seg $FSsubjDIR/mri/aparc+aseg.mgz --id 2 7 41 46 
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i 
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1


and get the following values:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2125567   125567.0 Left-Cerebral-White-Matter
97.904568.8609   0.  4000.  4000.
  2   7 1083310833.0 Left-Cerebellum-White-Matter   
1.187814.7193   0.   608.   608.
  3  41130433   130433.0 Right-Cerebral-White-Matter   
96.176460.0490   0.  4000.  4000.
  4  46 1155111551.0 Right-Cerebellum-White-Matter  
1.239515.3000   0.   453.   453.


_Question 2:_
Is there any way to verify that these values are accurate…?
(I am a little worried by the large standard deviation values)
Yes, I see what you mean. Is the T2 whole brain? Have you tried it 

Re: [Freesurfer] Converting dicom images to nifti

2015-01-27 Thread Bruce Fischl
have you tried dcmdjpeg or dcmdjpls to uncompress them, then used some 
other unpacker/converter (mri_convert etc...)

cheers
Bruce

On Tue, 27 Jan 2015, pradeep mahato wrote:

 
 Please tell how to use dcmunpack. Any help converting dicom to nii.
 
 On Jan 27, 2015 9:03 PM, Douglas Greve gr...@nmr.mgh.harvard.edu wrote:

   Hi Pradeep, I don't think that we can convert that either.
   Sorry.
   doug

   On 1/27/15 7:18 AM, pradeep mahato wrote:
   Hi experts,
 
 I am trying to convert dicom images namely
 00A0,00A1,00A2 [ No file extension ] etc. These are
 generated by Philips machine. I used dcm2nii, it does not give
 correct result. It gives warning : this software will only
 convert the first slice of this multislice lossless compressed
 JPEG . In one thread I read that dicom images from Philips
 scanner are oriented differently.
 
 I tried to use dcmunpack method, but I am not able to save the
 converted image.
 I used dcmunpack -src srcDirc. Please share the correct
 procedure.
 
 In one of the subjects I have very less number of images:30. Is
 it necessary to have more dicom images to have a better brain
 mri image . If yes, what should be the optimal number of images
 
 Thanking You
 
 Pradeep Kumar Mahato
 
 
 ___
 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.
 
 

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


Re: [Freesurfer] retinotopy in subject volumetric space

2015-01-27 Thread Douglas Greve


Ugh, that's weird, I don't know what's going on with that. I'll have to 
dig into it more.


On 1/27/15 1:26 PM, Benjamin Zimmerman wrote:

Hello,

When I try your recommended code, I am able to get the data back into 
volumetric space, but one hemisphere's cortex is significantly thinner 
than the other. If I do mri_surf2vol separately on each hemisphere, I 
don't have this problem. It seems to occur only if I try merging the 
two files. I assume that this is because I am using the volume that I 
am merging to as a template instead of inputting the template 
directly. Do you have any ideas how to solve this problem?


Thanks for your help,

Ben







On Wed, Dec 24, 2014 at 2:57 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:



I don't think we have a tool to display the color wheel in a
volume. FreeView might be able to do it. For the color wheel in
tksurfer, you are looking at the angle file (one for eccen and one
for polar), so you would map them. You can run mri_surf2vol
something like

mri_surf2vol --surfval lh.angle.nii.gz --identity yoursubject
--hemi lh --template path/orig.mgz --fillribbon --o vol.angle.mgz
mri_surf2vol --surfval rh.angle.nii.gz --identity yoursubject
--hemi rh  --fillribbon --merge vol.angle.mgz --o vol.angle.mgz

doug


On 12/18/14 1:24 PM, Benjamin Zimmerman wrote:

I mean the individual's anatomical volumetric space.

On Thu, Dec 18, 2014 at 11:53 AM, Douglas N Greve
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu
wrote:


What do you mean by the individual's volumetric space? The
anatomical
space or the functional space?


On 12/16/2014 05:18 PM, Benjamin Zimmerman wrote:
 Thanks for the advice. I thought I would like to use
mri_surf2vol, but
 I am a little confused about the parameters and how they
relate to
 what the retinotopy analysis outputs.

 To be explicit, I want to view the real.nii.gz and
imag.nii.gz files
 in an individual's volumetric space. I can load these as
overlays to
 the inflated surface using tksurfer subject hemisphere
inflated.
 Then I can configure the overlay to use a color wheel color
scale and
 display as complex to see the retinotopic mapping.

 I'm not sure how I would go about using mri_surf2vol to
recreate this
 map in volumetric space. Should I just use real.nii.gz and
imag.nii.gz
 as surfval? Where is the registration file outputted in a
retinotopy
 analysis?

 Thank you for any more help that you can provide,

 Ben

 On Mon, Dec 15, 2014 at 3:26 PM, dgw dgwake...@gmail.com
mailto:dgwake...@gmail.com
 mailto:dgwake...@gmail.com mailto:dgwake...@gmail.com wrote:

 Hi Ben,

 You should be able to map it back with mri_surf2vol. I
haven't done
 this, but the wiki page looks fairly detailed:
 http://surfer.nmr.mgh.harvard.edu/fswiki/mri_surf2vol

 HTH
 D

 On Mon, Dec 15, 2014 at 3:43 PM, Benjamin Zimmerman
 benjamin.zimmerm...@gmail.com
mailto:benjamin.zimmerm...@gmail.com
 mailto:benjamin.zimmerm...@gmail.com
mailto:benjamin.zimmerm...@gmail.com wrote:
  Hi all,
 
  FsFast has an excellent individual retinotopy
analysis that
 allows me to see
  phase data on the inflated surface of the brain. Is
there a way
 to view the
  results of the retinotopy analysis in the subject's
original
 volumetric
  space rather than on the subject's surface space?
 
  Thank you for any help,
 
  Ben
 
  ___
  Freesurfer mailing list
  Freesurfer@nmr.mgh.harvard.edu
mailto:Freesurfer@nmr.mgh.harvard.edu
 mailto:Freesurfer@nmr.mgh.harvard.edu
mailto: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

[Freesurfer] MNI to RAS?

2015-01-27 Thread Chu, Catherine,M.D.
Hi,



Is there an easy way to convert MNI coordinates to Freesurfer RAS coordinate 
space?



Thanks!

Cat
___
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] eTIV correction and registration in common space

2015-01-27 Thread Bruce Fischl

Hi Steano

a) You could do this but then you are testing a somewhat different 
hypothesis - that the change in a specific structure is more than the 
overall change in gray matter. Thus for example, widespread atrophy would 
be regressed out. If that's what you are interested in, then this approach 
is fine.


b) Our analysis is always in individual subject space. You can transform to 
a common space using mri_vol2vol if you want.


cheers
Bruce


On Tue, 27 Jan 2015, std...@virgilio.it wrote:


Hi list,
please, I have two questions:
a) subcortical volume correction in cross-sectional studies could be done by
using total GM as covariate instead of eTIV?
b) relatively to group subcortical analysis in cross-sectional studies, the
anatomical images should be necessarily transformed  in common space or is
possible to perform the analysis in native space?
The registration in common space should minimize issues due to different
head size. The computation on native space could bias the results
considering the different head sizes among subjects?
Thanks,


Stefano

___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Douglas Greve


On 1/27/15 1:56 PM, Ben Eliezer, Noam wrote:
The maps were generated by Siemens scanner, fitting a multi-spin-echo 
protocol.


I see your point, though. The values should not range between 0 to 
4000. The latter 4000 value is the background out-of-brain map value.
But when looking at the T2_siemens_reg.mgz, overlaid on the 
aparc+aseg.mgz in freeview, the white matter (segment #2) seems well 
within the brain, and does not include any parts that have value = 0 
or 4000.


_Question 1_: is it possible to look at the actual set of values that 
are used to calculate these mean and STD result?
This would probably give some hint as to the large std. Perhaps there 
are small number of outliers that contribute to the large variation?

You can use matlab, something like
t2 = MRIread('T2_siemsn_reg.mgz');
seg = MRIread('aparc+aseg.mgz');
ind = find(seg.vol == 17); % left hippo
t2hip = t2.vol(ind);

See $FREESURFER_HOME/FreeSurferColorLUT.txt for a list of segmentation 
numbers


_Question 2_: (just to put my mind at rest): if both tkregister2 and 
freeview show show that the maps register accurately on the 
segmentation data, does it mean that mri_segstats masks the T2 maps 
correctly?
I’m asking this because if the segmentation masks are off by, e.g., 
90-degree, it would cause to a large number of values=4000 to be 
included in the mean/std values.

It should. You can also try
tkmedit -f t2file.mgz -seg  aparc+aseg.mgz




Thanks!
 — Noam

On Jan 27, 2015, at 7:30 PM, Douglas Greve gr...@nmr.mgh.harvard.edu 
mailto:gr...@nmr.mgh.harvard.edu wrote:




It is finding 0s in the T2 (the range is 0-4000). I'm not sure about 
the 4000, but the 0s indicate that something is strange with that 
image. How was it created?


On 1/27/15 1:22 PM, Ben Eliezer, Noam wrote:
— I (think that) I am not really interested in converting into 
rawavg coordinate system, but just need to register my T2 maps to 
the segmentation maps.

So, I guess that aseg+aparc.mgz will suffice in my case

— Regarding the mean +- std values:
Yes - the T2 maps are whole brain. could that account for the large STD?

I have tried running it w/o --seg-erode.… the mean values stay 
similar yet, the standard-deviation increases significantly.
I’ve also tried erode=2 pixels, which gave identical results to 
erode=1 pixel.


With erode (2 pixels):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2125567   125567.0 Left-Cerebral-White-Matter
97.904568.8609   0.  4000.  4000.
  2   7 1083310833.0 Left-Cerebellum-White-Matter   
1.187814.7193   0.   608.   608.
  3  41130433   130433.0 Right-Cerebral-White-Matter   
96.176460.0490   0.  4000.  4000.
  4  46 1155111551.0 Right-Cerebellum-White-Matter  
1.239515.3000   0.   453.   453.


With erode (1 pixel):
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2125567   125567.0 Left-Cerebral-White-Matter
97.904568.8609   0.  4000.  4000.
  2   7 1083310833.0 Left-Cerebellum-White-Matter   
1.187814.7193   0.   608.   608.
  3  41130433   130433.0 Right-Cerebral-White-Matter   
96.176460.0490   0.  4000.  4000.
  4  46 1155111551.0 Right-Cerebellum-White-Matter  
1.239515.3000   0.   453.   453.


Without erode:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2193533   193533.0 Left-Cerebral-White-Matter
99.1265   125.6069   0.  4000.  4000.
  2   7 1779417794.0 Left-Cerebellum-White-Matter   
7.225965.3060   0.  4000.  4000.
  3  41197895   197895.0 Right-Cerebral-White-Matter   
96.9839   115.9002   0.  4000.  4000.
  4  46 1799917999.0 Right-Cerebellum-White-Matter  
6.079888.1490   0.  4000.  4000.


It’s indeed encouraging that using the erode option decreases the 
STD, but I’m still wondering whether there a way to validate 
accuracy of the values.


Thanks!
 Noam


On Jan 27, 2015, at 6:50 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:




On 1/27/15 12:38 PM, Ben Eliezer, Noam wrote:

Thanks Doug.

I’ve made two changes to the set of commands.

*1.* Following your suggestion, I’ve shifted from --init-spm to 
--init-header and now tkregister2 shows that the registration is OK.


tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!


*2.* When loading the result of vol2vol command (T2_siemens_reg.mgz):
   mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o 
T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg 
through plane versus the segmentation maps — in short they do not 
match in orientation.


I’ve 

Re: [Freesurfer] longitudinal pipeline

2015-01-27 Thread Martin Reuter
HI Song,

are you talking about the longitudinal tractography? 
If you have longitudinal data, then yes, we recommend the use of longitudinal 
processing both for the structural and for the tractography. That's what they 
have been developed for.

Best, Martin

On Jan 26, 2015, at 5:50 PM, Inkyung Song song...@nyspi.columbia.edu wrote:

 Hi Freesurfer Experts,
 
 Is the longitudinal pipeline still recommended for the DTI data analysis if 
 structural changes occur at different time points (e.g., pre and 
 post-treatment)? Or is it better to use the standard pipeline? Are other 
 options available?
 
 Thanks so much!
 Song
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-
Dr. Martin Reuter
Assistant in Neuroscience - Massachusetts General Hospital
Instructor in Neurology   - Harvard Medical School
MGH / HMS / MIT

A.A.Martinos Center for Biomedical Imaging
149 Thirteenth Street, Suite 2301
Charlestown, MA 02129

Phone: +1-617-724-5652
Email: 
   mreu...@nmr.mgh.harvard.edu
   reu...@mit.edu
Web  : http://reuter.mit.edu 

___
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.


[Freesurfer] lme_mass_RgGrow

2015-01-27 Thread Jordan Silberman
Hi FS experts,

Two questions about the lme_mass_RgGrow command for spatiotemporal models:

1. If you're estimating a longitudinal mixed effects model with fixed
effects of time (linear) and group, as well as a random effect for
time, will this command segment the brain into homogeneous regions
such that voxels within a homogeneous region tend to exhibit the same
degree of change over time?

2. Is there any reason why it would be problematic to apply this
command to source-localized EEG data (as opposed to fMRI data)?

Thanks,
Jordan
___
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.



[Freesurfer] Converting dicom images to nifti

2015-01-27 Thread pradeep mahato
Hi experts,

I am trying to convert dicom images namely 00A0,00A1,00A2 [ No
file extension ] etc. These are generated by Philips machine. I used
dcm2nii, it does not give correct result. It gives warning : this software
will only convert the first slice of this multislice lossless compressed
JPEG . In one thread I read that dicom images from Philips scanner are
oriented differently.

I tried to use dcmunpack method, but I am not able to save the converted
image.
I used dcmunpack -src srcDirc. Please share the correct procedure.

In one of the subjects I have very less number of images:30. Is it
necessary to have more dicom images to have a better brain mri image . If
yes, what should be the optimal number of images

Thanking You

Pradeep Kumar Mahato
___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Douglas Greve


First off, I would use --init-header instead of --init-spm. Probably 
won't make a difference, but it is safer in this case. Second, look at 
the registration in tkregister (bbregister prints out the command line, 
you can just cut and paste).

doug

ps. Please remember to post the list instead of directly to us. thanks!



On 1/27/15 11:23 AM, Ben Eliezer, Noam wrote:

Hi Doug —

My apologies for the confusion. Please ignore the commands set below.
There is only one set of commands that I tried.

It’s:

 mri_convert -it siemens_dicom -ot mgz 
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
T2_siemens.mgz
 bbregister --s subj01 --mov T2_siemens.mgz   --reg 
T2_siemens_regMat.dat   --init-spm --t2
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz 
--interp nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat 
--no-save-reg
 mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
$FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
T2_siemens_stats.stats --seg-erode 1


But as I wrote below — loading the registered T2 map 
T2_siemens_reg.mgz into Freeview shows that it’s incorrectly 
registered on the segmentation maps.


Thanks and sorry for the confusion,
 — Noam


On Jan 27, 2015, at 5:07 PM, Ben Eliezer, Noam 
noam.ben-elie...@nyumc.org mailto:noam.ben-elie...@nyumc.org wrote:



Hi Doug —

Thank you for the prompt reply!

I have indeed tried using bbregister (and consult the -- help) but I 
am probably not using it correctly.


I’ve tried two set of commands:

 mri_convert -it siemens_dicom -ot mgz 
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
T2_siemens.mgz
 bbregister --s subj01--mov T2_siemens.mgz --reg 
T2_siemens_regMat.dat   --init-spm --t2
 mri_segstats —seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
$FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
T2_siemens_stats.stats --seg-erode 1


or,
 mri_convert -it siemens_dicom -ot mgz 
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
T2_siemens.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz 
--interp nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat 
--no-save-reg
 mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
$FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
T2_siemens_stats.stats --seg-erode 1


Both set of commands age the same statistics values, yet, in both 
cases the registration seemed wrong, when running:

tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf

so I am not sure if the values I get are ok….

Also, when loading the registered T2 maps (T2_siemens_reg.mgz) into 
Freeview they did not coincide with my aseg+aparc.mgz or 
aseg+aparc-in-rawavg.mgz


Any help would be highly appreciated!

Best!
Noam




On 1/27/15 2:11 AM, Ben Eliezer, Noam wrote:

Hello ---

I'm trying to extract quantitative T2 values for different brain segments.

I've converted my T2 set of DICOMs to .mgz format using
mri_convert and loaded them into freeview.  mri_convert -it
siemens_dicom -ot mgz T2_maps_Dir/slice_1_T2_map.dcm
T2_in_mgz.mgz After loading T2_in_mgz.mgz to Freeview the T2 maps
seem to coincide very well with the segmentation maps
(aseg+aparc-in-rawavg.mgz).

My questions are:

1. Should I have applied some pre-registration operation on the
T2 maps before loading them into freeview, or does the fact that
they coincide with the segmentation maps mean that I don't need
to apply any registration?

Since they are in the same session, they will be pretty close in 
registration, it just depends on how much the subject moved between 
the two acquisitions. As a matter of course, I would run a 
registration on them (bbregister with --init-header). This subject 
may not have moved much but it is no guarantee that others won't move 
more.


2. How can I extract mean T2 values for different segments? (not
the usual volume-per-segment)

Use mri_segstats. Run with --help to get examples
doug

Much obliged!
  --- Noam




--
Noam Ben-Eliezer, PhD
Adjunct Assistant Professor of Radiology
Center for Biomedical-Imaging
New-York University Medical School
noam.ben-elie...@nyumc.org  http://nyumc.org/  
mailto:noam.ben-elie...@nyumc.org






___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Douglas Greve


On 1/27/15 2:11 AM, Ben Eliezer, Noam wrote:

Hello ---

I'm trying to extract quantitative T2 values for different brain segments.
I've converted my T2 set of DICOMs to .mgz format using mri_convert 
and loaded them into freeview.
 mri_convert -it siemens_dicom -ot mgz 
T2_maps_Dir/slice_1_T2_map.dcm T2_in_mgz.mgz


After loading T2_in_mgz.mgz to Freeview the T2 maps seem to coincide 
very well with the segmentation maps (aseg+aparc-in-rawavg.mgz).


My questions are:

1. Should I have applied some pre-registration operation on the T2 
maps before loading them into freeview,
or does the fact that they coincide with the segmentation maps mean 
that I don't need to apply any registration?
Since they are in the same session, they will be pretty close in 
registration, it just depends on how much the subject moved between the 
two acquisitions. As a matter of course, I would run a registration on 
them (bbregister with --init-header). This subject may not have moved 
much but it is no guarantee that others won't move more.


2. How can I extract mean T2 values for different segments? (not the 
usual volume-per-segment)

Use mri_segstats. Run with --help to get examples
doug



Much obliged!
 --- Noam




--
Noam Ben-Eliezer, PhD
Adjunct Assistant Professor of Radiology
Center for Biomedical-Imaging
New-York University Medical School
noam.ben-elie...@nyumc.org mailto:noam.ben-elie...@nyumc.org




___
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.


Re: [Freesurfer] Extract mean time series from parcellated region

2015-01-27 Thread Douglas Greve


It all looks correct. How many frames does test2.nii.gz have? Try 
running mri_info test2.nii.gz to see


On 1/27/15 9:05 AM, sabin khadka wrote:
Hi Doug- The command doesn't error out but it just give me one value. 
I was assuming the following command would give me value in  time 
series x mean value in text file. Am I following correct 
strategy/commands?

Cheers,
Sabin Khadka


*From:* Douglas Greve gr...@nmr.mgh.harvard.edu
*To:* sabin khadka sabink...@yahoo.com; Freesurfer Support List 
freesurfer@nmr.mgh.harvard.edu

*Sent:* Monday, January 26, 2015 5:33 PM
*Subject:* Re: [Freesurfer] Extract mean time series from parcellated 
region



what do you mean you can't get them? The program fails? It produces 0s?



On 1/26/15 3:48 PM, sabin khadka wrote:

Hi FS user,

I am trying to extract time series of fmri rest data of certain 
parcellated regions (both cortical and subcortical). for that I am 
doing following


# bbregister --s sub id --mov EPI.nii.gz --init-fsl --reg 
register.dat --bold
# mri_label2vol --aparc+aseg --subject sub id --temp EPI.nii.gz 
--fillthresh 0.5 --reg regsiter.dat --o test1.nii.gz
# mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz 
--reg register.dat --o test2.nii.gz
# mri_segstats --seg sub id/mri/aparc+aseg.mgz --id e.g. 11 for L 
caudate --in test2.nii.gz --avgwf textfile.txt
I am not able to get the mean time series values. Could anyone tell 
me what I am missing?

Cheers,
Sabin Khadka



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu mailto: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.




___
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] Converting dicom images to nifti

2015-01-27 Thread Douglas Greve


Hi Pradeep, I don't think that we can convert that either. Sorry.
doug

On 1/27/15 7:18 AM, pradeep mahato wrote:

Hi experts,

I am trying to convert dicom images namely 00A0,00A1,00A2 
[ No file extension ] etc. These are generated by Philips machine. I 
used dcm2nii, it does not give correct result. It gives warning : this 
software will only convert the first slice of this multislice lossless 
compressed JPEG . In one thread I read that dicom images from Philips 
scanner are oriented differently.


I tried to use dcmunpack method, but I am not able to save the 
converted image.

I used dcmunpack -src srcDirc. Please share the correct procedure.

In one of the subjects I have very less number of images:30. Is it 
necessary to have more dicom images to have a better brain mri image . 
If yes, what should be the optimal number of images


Thanking You

Pradeep Kumar Mahato


___
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.


Re: [Freesurfer] Converting dicom images to nifti

2015-01-27 Thread Douglas Greve
If you run it with --help there will be lots of documentation and 
examples. It will not be able to convert the multiframe dicom files though


On 1/27/15 12:24 PM, pradeep mahato wrote:


Please tell how to use dcmunpack. Any help converting dicom to nii.

On Jan 27, 2015 9:03 PM, Douglas Greve gr...@nmr.mgh.harvard.edu 
mailto:gr...@nmr.mgh.harvard.edu wrote:



Hi Pradeep, I don't think that we can convert that either. Sorry.
doug

On 1/27/15 7:18 AM, pradeep mahato wrote:

Hi experts,

I am trying to convert dicom images namely
00A0,00A1,00A2 [ No file extension ] etc. These are
generated by Philips machine. I used dcm2nii, it does not give
correct result. It gives warning : this software will only
convert the first slice of this multislice lossless compressed
JPEG . In one thread I read that dicom images from Philips
scanner are oriented differently.

I tried to use dcmunpack method, but I am not able to save the
converted image.
I used dcmunpack -src srcDirc. Please share the correct procedure.

In one of the subjects I have very less number of images:30. Is
it necessary to have more dicom images to have a better brain mri
image . If yes, what should be the optimal number of images

Thanking You

Pradeep Kumar Mahato


___
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 mailto: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.



___
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.


Re: [Freesurfer] Extract mean time series from parcellated region

2015-01-27 Thread Douglas Greve


That label2vol command maps the aseg into the epi space to create test1 
so it will only have 1 frame. The epi never comes  into play there 
except as a geometry template. If you want to extract a time course from 
the epi, then map it to the anatomical space with that vol2vol command 
using the epi as the --mov, then run mri_segstats. That label2vol 
command is not necessary.


doug


On 1/27/15 12:13 PM, sabin khadka wrote:
Hi doug. I now see the problem. When I run mri_info the test1.nii.gz 
and test2.nii.gz both have only 1 frame. But when I run
# mri_label2vol --aparc+aseg --subject sub id --temp EPI.nii.gz 
--fillthresh 0.5 --reg regsiter.dat --o test1.nii.gz
# mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz 
--reg register.dat --o test2.nii.gz
EPI.nii.gz is 4D image with 210 frames. How can I get test1.nii.gz and 
test2.nii.gz in 4D format? Should be something basic but I could not 
figure out how.


I appreciate your help!!
Cheers,
Sabin Khadka


*From:* Douglas Greve gr...@nmr.mgh.harvard.edu
*To:* sabin khadka sabink...@yahoo.com; Freesurfer support list 
freesurfer@nmr.mgh.harvard.edu

*Sent:* Tuesday, January 27, 2015 10:31 AM
*Subject:* Re: [Freesurfer] Extract mean time series from parcellated 
region



It all looks correct. How many frames does test2.nii.gz have? Try 
running mri_info test2.nii.gz to see




On 1/27/15 9:05 AM, sabin khadka wrote:
Hi Doug- The command doesn't error out but it just give me one value. 
I was assuming the following command would give me value in  time 
series x mean value in text file. Am I following correct 
strategy/commands?

Cheers,
Sabin Khadka


*From:* Douglas Greve gr...@nmr.mgh.harvard.edu 
mailto:gr...@nmr.mgh.harvard.edu
*To:* sabin khadka sabink...@yahoo.com 
mailto:sabink...@yahoo.com; Freesurfer Support List 
freesurfer@nmr.mgh.harvard.edu mailto:freesurfer@nmr.mgh.harvard.edu

*Sent:* Monday, January 26, 2015 5:33 PM
*Subject:* Re: [Freesurfer] Extract mean time series from parcellated 
region



what do you mean you can't get them? The program fails? It produces 0s?



On 1/26/15 3:48 PM, sabin khadka wrote:

Hi FS user,

I am trying to extract time series of fmri rest data of certain 
parcellated regions (both cortical and subcortical). for that I am 
doing following


# bbregister --s sub id --mov EPI.nii.gz --init-fsl --reg 
register.dat --bold
# mri_label2vol --aparc+aseg --subject sub id --temp EPI.nii.gz 
--fillthresh 0.5 --reg regsiter.dat --o test1.nii.gz
# mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz 
--reg register.dat --o test2.nii.gz
# mri_segstats --seg sub id/mri/aparc+aseg.mgz --id e.g. 11 for L 
caudate --in test2.nii.gz --avgwf textfile.txt
I am not able to get the mean time series values. Could anyone tell 
me what I am missing?

Cheers,
Sabin Khadka



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu mailto: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.





___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu mailto: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.




___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Ben Eliezer, Noam
Thanks Doug.

I’ve made two changes to the set of commands.

1. Following your suggestion, I’ve shifted from --init-spm to --init-header and 
now tkregister2 shows that the registration is OK.

 tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!


2. When loading the result of vol2vol command (T2_siemens_reg.mgz):
   mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o T2_siemens_reg.mgz 
--reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg through plane 
versus the segmentation maps — in short they do not match in orientation.

I’ve solved this by changing from using aseg+aparc-in-rawavg.mgz to 
aseg+aparg.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz --interp 
 nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg

Question1: Is that a correct approach? not to use the rawavg coordinate system?

—

Now, I re- gather statistics using:
 mri_segstats --seg $FSsubjDIR/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
 T2_siemens_stats.stats --seg-erode 1

and get the following values:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range
  1   2125567   125567.0  Left-Cerebral-White-Matter97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter  1.2395
15.3000 0.   453.   453.

Question 2:
Is there any way to verify that these values are accurate…?
(I am a little worried by the large standard deviation values)

Thanks again for the prompt replies,
 — Noam



On Jan 27, 2015, at 6:02 PM, Douglas Greve 
gr...@nmr.mgh.harvard.edumailto:gr...@nmr.mgh.harvard.edu wrote:


First off, I would use --init-header instead of --init-spm. Probably won't make 
a difference, but it is safer in this case. Second, look at the registration in 
tkregister (bbregister prints out the command line, you can just cut and paste).
doug

ps. Please remember to post the list instead of directly to us. thanks!



On 1/27/15 11:23 AM, Ben Eliezer, Noam wrote:
Hi Doug —

My apologies for the confusion. Please ignore the commands set below.
There is only one set of commands that I tried.

It’s:

 mri_convert -it siemens_dicom -ot mgz 
 SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
 T2_siemens.mgz
 bbregister --s subj01 --mov T2_siemens.mgz   --reg T2_siemens_regMat.dat   
 --init-spm --t2
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz --interp 
 nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
 mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
 T2_siemens_stats.stats --seg-erode 1

But as I wrote below — loading the registered T2 map T2_siemens_reg.mgz into 
Freeview shows that it’s incorrectly registered on the segmentation maps.

Thanks and sorry for the confusion,
 — Noam


On Jan 27, 2015, at 5:07 PM, Ben Eliezer, Noam 
noam.ben-elie...@nyumc.orgmailto:noam.ben-elie...@nyumc.org wrote:

Hi Doug —

Thank you for the prompt reply!

I have indeed tried using bbregister (and consult the -- help) but I am 
probably not using it correctly.

I’ve tried two set of commands:

 mri_convert -it siemens_dicom -ot mgz 
 SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
 T2_siemens.mgz
 bbregister --s subj01--mov T2_siemens.mgz   --reg T2_siemens_regMat.dat   
 --init-spm --t2
 mri_segstats —seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
 T2_siemens_stats.stats --seg-erode 1

or,
 mri_convert -it siemens_dicom -ot mgz 
 SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
 T2_siemens.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz --interp 
 nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
 mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 --ctab 
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz --sum 
 T2_siemens_stats.stats --seg-erode 1

Both set of commands age the same statistics values, yet, in both cases the 
registration seemed wrong, when running:
 tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf

so I am not sure if the values I get are ok….

Also, when loading the registered T2 maps (T2_siemens_reg.mgz) into Freeview 
they did not coincide with my aseg+aparc.mgz or aseg+aparc-in-rawavg.mgz

Any help would be highly appreciated!

Best!
Noam





On 1/27/15 2:11 AM, Ben Eliezer, Noam wrote:



Re: [Freesurfer] Extract mean time series from parcellated region

2015-01-27 Thread sabin khadka
Hi doug. I now see the problem. When I run mri_info the test1.nii.gz and 
test2.nii.gz both have only 1 frame. But when I run# mri_label2vol --aparc+aseg 
--subject sub id --temp EPI.nii.gz --fillthresh 0.5 --reg regsiter.dat --o 
test1.nii.gz# mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz 
--reg register.dat --o test2.nii.gzEPI.nii.gz is 4D image with 210 frames. How 
can I get test1.nii.gz and test2.nii.gz in 4D format? Should be something basic 
but I could not figure out how.
I appreciate your help!!
 Cheers,
Sabin Khadka
  From: Douglas Greve gr...@nmr.mgh.harvard.edu
 To: sabin khadka sabink...@yahoo.com; Freesurfer support list 
freesurfer@nmr.mgh.harvard.edu 
 Sent: Tuesday, January 27, 2015 10:31 AM
 Subject: Re: [Freesurfer] Extract mean time series from parcellated region
   
 
 It all looks correct. How many frames does test2.nii.gz have? Try running 
mri_info test2.nii.gz to see
 
 

On 1/27/15 9:05 AM, sabin khadka wrote:
  
  Hi Doug- The command doesn't error out but it just give me one value. I was 
assuming the following command would give me value in  time series x mean value 
in text file. Am I following correct strategy/commands?   Cheers,
 Sabin Khadka 
  From: Douglas Greve gr...@nmr.mgh.harvard.edu
 To: sabin khadka sabink...@yahoo.com; Freesurfer Support List 
freesurfer@nmr.mgh.harvard.edu 
 Sent: Monday, January 26, 2015 5:33 PM
 Subject: Re: [Freesurfer] Extract mean time series from parcellated region
   
   
 what do you mean you can't get them? The program fails? It produces 0s?
 
 
 
   On 1/26/15 3:48 PM, sabin khadka wrote:
  
  Hi FS user, 
  I am trying to extract time series of fmri rest data of certain parcellated 
regions (both cortical and  subcortical). for that I am doing following
  
  # bbregister --s sub id --mov EPI.nii.gz --init-fsl --reg register.dat 
--bold # mri_label2vol --aparc+aseg --subject sub id --temp EPI.nii.gz 
--fillthresh 0.5 --reg regsiter.dat --o test1.nii.gz
  # mri_vol2vol --mov test1.nii.gz --targ sub id/mri/aparc+aseg.mgz --reg 
register.dat --o test2.nii.gz # mri_segstats --seg sub id/mri/aparc+aseg.mgz 
--id e.g. 11 for L caudate --in test2.nii.gz --avgwf textfile.txt
I am not able to get the mean time series values. Could anyone tell me what 
I am missing?
     Cheers,
 Sabin Khadka  
  
   
 ___
 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.
  
 
 
 
 
___
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.


  ___
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] Converting dicom images to nifti

2015-01-27 Thread pradeep mahato
Please tell how to use dcmunpack. Any help converting dicom to nii.
On Jan 27, 2015 9:03 PM, Douglas Greve gr...@nmr.mgh.harvard.edu wrote:


 Hi Pradeep, I don't think that we can convert that either. Sorry.
 doug

 On 1/27/15 7:18 AM, pradeep mahato wrote:

   Hi experts,

  I am trying to convert dicom images namely 00A0,00A1,00A2 [
 No file extension ] etc. These are generated by Philips machine. I used
 dcm2nii, it does not give correct result. It gives warning : this software
 will only convert the first slice of this multislice lossless compressed
 JPEG . In one thread I read that dicom images from Philips scanner are
 oriented differently.

  I tried to use dcmunpack method, but I am not able to save the converted
 image.
 I used dcmunpack -src srcDirc. Please share the correct procedure.

  In one of the subjects I have very less number of images:30. Is it
 necessary to have more dicom images to have a better brain mri image . If
 yes, what should be the optimal number of images

  Thanking You

  Pradeep Kumar Mahato


 ___
 Freesurfer mailing 
 listfreesur...@nmr.mgh.harvard.eduhttps://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.


___
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] Extraction of T2 map statistics-per-segment

2015-01-27 Thread Douglas Greve


On 1/27/15 12:38 PM, Ben Eliezer, Noam wrote:

Thanks Doug.

I’ve made two changes to the set of commands.

*1.* Following your suggestion, I’ve shifted from --init-spm to 
--init-header and now tkregister2 shows that the registration is OK.


tkregister2 --mov T2_siemens.mgz --reg T2_siemens_regMat.dat —surf
Thanks!


*2.* When loading the result of vol2vol command (T2_siemens_reg.mgz):
   mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg-in-rawavg.mgz --interp nearest --o 
T2_siemens_reg.mgz --reg T2_siemens_regMat.dat --no-save-reg
into freeview the maps are rotated 90-deg in-plane and 90-deg through 
plane versus the segmentation maps — in short they do not match in 
orientation.


I’ve solved this by changing from using aseg+aparc-in-rawavg.mgz to 
aseg+aparg.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz 
--interp nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat 
--no-save-reg


_Question1:_ Is that a correct approach? not to use the rawavg 
coordinate system?
Oh, I did not see that. Yes, that is the problem. If you want to use the 
rawavg coordinate system, then you'll have to create another 
registration file because the one that you have only goes between the T2 
and the conformed 256 1mm space. Let me know if that is what you want.


—

Now, I re- gather statistics using:
 mri_segstats --seg $FSsubjDIR/mri/aparc+aseg.mgz --id 2 7 41 46 
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i T2_siemens_reg.mgz 
--sum T2_siemens_stats.stats --seg-erode 1


and get the following values:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev 
Min Max Range
  1   2125567   125567.0  Left-Cerebral-White-Matter   97.9045
68.8609 0.  4000.  4000.
  2   7 1083310833.0  Left-Cerebellum-White-Matter   1.1878
14.7193 0.   608.   608.
  3  41130433   130433.0  Right-Cerebral-White-Matter   96.1764
60.0490 0.  4000.  4000.
  4  46 1155111551.0  Right-Cerebellum-White-Matter   1.2395  
  15.3000 0.   453.   453.


_Question 2:_
Is there any way to verify that these values are accurate…?
(I am a little worried by the large standard deviation values)
Yes, I see what you mean. Is the T2 whole brain? Have you tried it 
without --seg-erode?


Thanks again for the prompt replies,
 — Noam



On Jan 27, 2015, at 6:02 PM, Douglas Greve gr...@nmr.mgh.harvard.edu 
mailto:gr...@nmr.mgh.harvard.edu wrote:




First off, I would use --init-header instead of --init-spm. Probably 
won't make a difference, but it is safer in this case. Second, look 
at the registration in tkregister (bbregister prints out the command 
line, you can just cut and paste).

doug

ps. Please remember to post the list instead of directly to us. thanks!



On 1/27/15 11:23 AM, Ben Eliezer, Noam wrote:

Hi Doug —

My apologies for the confusion. Please ignore the commands set below.
There is only one set of commands that I tried.

It’s:

 mri_convert -it siemens_dicom -ot mgz 
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
T2_siemens.mgz
 bbregister --s subj01 --mov T2_siemens.mgz   --reg 
T2_siemens_regMat.dat --init-spm --t2
 mri_vol2vol --mov T2_siemens.mgz --targ subj01/mri/aparc+aseg.mgz 
--interp nearest --o T2_siemens_reg.mgz --reg T2_siemens_regMat.dat 
--no-save-reg
 mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i 
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1


But as I wrote below — loading the registered T2 map 
T2_siemens_reg.mgz into Freeview shows that it’s incorrectly 
registered on the segmentation maps.


Thanks and sorry for the confusion,
 — Noam


On Jan 27, 2015, at 5:07 PM, Ben Eliezer, Noam 
noam.ben-elie...@nyumc.org mailto:noam.ben-elie...@nyumc.org wrote:



Hi Doug —

Thank you for the prompt reply!

I have indeed tried using bbregister (and consult the -- help) but 
I am probably not using it correctly.


I’ve tried two set of commands:

 mri_convert -it siemens_dicom -ot mgz 
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
T2_siemens.mgz
 bbregister --s subj01--mov T2_siemens.mgz   --reg 
T2_siemens_regMat.dat --init-spm --t2
 mri_segstats —seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i 
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1


or,
 mri_convert -it siemens_dicom -ot mgz 
SEMC_siemens_T2maps/1.3.12.2.1107.5.2.19.45219.2014072207350934197931766.dcm 
T2_siemens.mgz
 mri_vol2vol --mov T2_siemens.mgz --targ 
subj01/mri/aparc+aseg.mgz --interp nearest --o T2_siemens_reg.mgz 
--reg T2_siemens_regMat.dat --no-save-reg
 mri_segstats --seg subj01/mri/aparc+aseg.mgz --id 2 7 41 46 
--ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --i 
T2_siemens_reg.mgz --sum T2_siemens_stats.stats --seg-erode 1


Both set of commands age the same statistics values, yet, in both 
cases