Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-03-19 Thread Elijah Mak
Dear Doug,

Is it possible to use BP SUVR PET that have been registered to T1 for this
gtmseg workflow? You mentioned that the mean TAC should be used as the
input. 2 quick questions: What's mean TAC and why?

Thanks.

Best Wishes,
Elijah
___
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] Reading values from overlays with PETcoreg

2016-03-03 Thread Douglas N Greve
No, not yet, though I recently had a need to do the same thing. It is 
pretty easy to do though. If you run mri_gtmpvc with --save-input, it 
will create a file called input.rescaled.nii.gz. Then you can run
mri_segstats --i input.rescaled.nii.gz --seg aux/seg.nii.gz --ctab 
aux/seg.ctab --avgwfvol nopvc.nii.gz

nopvc.nii.gz will be the same size as gtm.nii.gz with the same order of 
ROIs. Not that the ROI used to rescale in the gtmpvc command (251 for 
you) will not have a value of 1.0 in the nopvc.nii.gz, so if you want to 
compare, then you'll need to rescale yourself.



On 02/24/2016 12:46 PM, Pradeep wrote:
> Hello Doug,
>
> I was wondering if there is a flag in the command  to obtain the SUVRs 
> for the same ROIs with out partial volume correction so that it would 
> be easier to compare.
>
> Thanks,
> Pradeep
>
> On Fri, Jan 29, 2016 at 1:30 PM, Pradeep  > wrote:
>
> It worked! Thank you!
> mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> gtmseg.mgz --reg output.lta --replace-file seg.replace251.list
> --rescale 251 --mgx 0.01 --o gtmpvcRcc.output
>
> On Fri, Jan 29, 2016 at 12:23 PM, Douglas N Greve
> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>
> The problem is that --default-seg-merge merges the CC with WM,
> so you
> can't use that option, which means that you'll have to specify
> the rest
> of the default seg merge manually. You can do this with more
> --replace
> args or you can create a file. If you've been able to run
> mri_gtmpvc
> without the current replace, then it will create a replacement
> file in
> the aux folder. Get that, remove the 251 entry, and change the
> 252-255
> entries to point to 251
>
> On 01/29/2016 02:12 PM, Pradeep wrote:
> > Unfortunately, that did not fix the problem.
> >
> > Here is what I did
> > 1)gtmseg --s 128_S_0225_v06 --keep-cc # noerrors
> > 2)gtmseg --s 128_S_0225_v06 --keep-cc --no-xcerseg  # no errors
> >
> > 3)mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2
> 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --replace
> 252 251
> > --replace 253 251 --replace 254 251 --replace 255 251 --mgx
> 0.01 --o
> > gtmpvcrcc.output
> > Loading input t12pet.nii.gz
> >   done loading input 1 frames
> > ERROR: item 251 appears as both source and target seg id in
> > replacement list
> >
> > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> > cd /analysis/software_test/fs6pvc/128_S_0225_v06/mri
> > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01
> --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --replace
> 252 251
> > --replace 253 251 --replace 254 251 --replace 255 251 --mgx
> 0.01 --o
> > gtmpvcrcc.output
> > sysname  Linux
> > hostname
> > machine  x86_64
> > user
> > vgthresh   0.001000
> > nReplace   22
> > 0. 0. 0. 0. 0. 0.
> > 9 avail.processors, using 9
> > Creating output directory gtmpvcrcc.output
> > Loading seg for gtm gtmseg.mgz
> > Loading seg ctab gtmseg.ctab
> > Reading gtmseg.lta
> > Replacing 22
> > ERROR: CheckSegTissueType() no entry for seg 192
> > Failed tissue type check
> >
> > Thank you for looking into this,
> > Pradeep
> >
> >
> > On Fri, Jan 29, 2016 at 10:13 AM, Douglas N Greve
> >  
>  >> wrote:
> >
> > I think I see the problem. When you run gtmseg, you need
> to add
> > --keep-cc. You can rerun it using the previous command
> line, but add
> > --keep-cc and --no-xcerseg. The second option tells it
> not to redo the
> > extracerebral segmentation (which won't change with CC)
> >
> > On 01/29/2016 11:21 AM, Pradeep wrote:
> > > Thank you for the response.
> > >
> > > Here is my full command log with error
> > >
> > >
> > > $gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc
> > >
> > > $ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask
> PSF+2 0.01 --seg
> > > gtmseg.mgz --reg output.lta --default-seg-merge --mgx
> 0.01 --o
> > > gtmpvccc.output
> > > Loading input t12pet.nii.gz
> > >   done loading input 1 frames
> > >
> > > $Id: mr

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-02-24 Thread Pradeep
Hello Doug,

I was wondering if there is a flag in the command  to obtain the SUVRs for
the same ROIs with out partial volume correction so that it would be easier
to compare.

Thanks,
Pradeep

On Fri, Jan 29, 2016 at 1:30 PM, Pradeep  wrote:

> It worked! Thank you!
> mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> gtmseg.mgz --reg output.lta --replace-file seg.replace251.list --rescale
> 251 --mgx 0.01 --o gtmpvcRcc.output
>
> On Fri, Jan 29, 2016 at 12:23 PM, Douglas N Greve <
> gr...@nmr.mgh.harvard.edu> wrote:
>
>> The problem is that --default-seg-merge merges the CC with WM, so you
>> can't use that option, which means that you'll have to specify the rest
>> of the default seg merge manually. You can do this with more --replace
>> args or you can create a file. If you've been able to run mri_gtmpvc
>> without the current replace, then it will create a replacement file in
>> the aux folder. Get that, remove the 251 entry, and change the 252-255
>> entries to point to 251
>>
>> On 01/29/2016 02:12 PM, Pradeep wrote:
>> > Unfortunately, that did not fix the problem.
>> >
>> > Here is what I did
>> > 1)gtmseg --s 128_S_0225_v06 --keep-cc # noerrors
>> > 2)gtmseg --s 128_S_0225_v06 --keep-cc --no-xcerseg  # no errors
>> >
>> > 3)mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
>> > gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251
>> > --replace 253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o
>> > gtmpvcrcc.output
>> > Loading input t12pet.nii.gz
>> >   done loading input 1 frames
>> > ERROR: item 251 appears as both source and target seg id in
>> > replacement list
>> >
>> > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
>> > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
>> > cd /analysis/software_test/fs6pvc/128_S_0225_v06/mri
>> > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
>> > gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251
>> > --replace 253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o
>> > gtmpvcrcc.output
>> > sysname  Linux
>> > hostname
>> > machine  x86_64
>> > user
>> > vgthresh   0.001000
>> > nReplace   22
>> > 0. 0. 0. 0. 0. 0.
>> > 9 avail.processors, using 9
>> > Creating output directory gtmpvcrcc.output
>> > Loading seg for gtm gtmseg.mgz
>> > Loading seg ctab gtmseg.ctab
>> > Reading gtmseg.lta
>> > Replacing 22
>> > ERROR: CheckSegTissueType() no entry for seg 192
>> > Failed tissue type check
>> >
>> > Thank you for looking into this,
>> > Pradeep
>> >
>> >
>> > On Fri, Jan 29, 2016 at 10:13 AM, Douglas N Greve
>> > mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>> >
>> > I think I see the problem. When you run gtmseg, you need to add
>> > --keep-cc. You can rerun it using the previous command line, but add
>> > --keep-cc and --no-xcerseg. The second option tells it not to redo
>> the
>> > extracerebral segmentation (which won't change with CC)
>> >
>> > On 01/29/2016 11:21 AM, Pradeep wrote:
>> > > Thank you for the response.
>> > >
>> > > Here is my full command log with error
>> > >
>> > >
>> > > $gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc
>> > >
>> > > $ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01
>> --seg
>> > > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
>> > > gtmpvccc.output
>> > > Loading input t12pet.nii.gz
>> > >   done loading input 1 frames
>> > >
>> > > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
>> > > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
>> > > cd /analysis/software_test/fs6pvc/**/mri
>> > > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
>> > > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
>> > > gtmpvccc.output
>> > > sysname  Linux
>> > > hostname server
>> > > machine  x86_64
>> > > user user
>> > > vgthresh   0.001000
>> > > nReplace   18
>> > > 0. 0. 0. 0. 0. 0.
>> > > 9 avail.processors, using 9
>> > > Creating output directory gtmpvccc.output
>> > > Loading seg for gtm gtmseg.mgz
>> > > Loading seg ctab gtmseg.ctab
>> > > Reading gtmseg.lta
>> > > Replacing 18
>> > > ERROR: CheckSegTissueType() no entry for seg 192
>> > > Failed tissue type check
>> > >
>> > >
>> > > Thanks,
>> > > Pradeep
>> > >
>> > >
>> > > On Thu, Jan 28, 2016 at 5:34 PM, Douglas N Greve
>> > > mailto:gr...@nmr.mgh.harvard.edu>
>> > > > >> wrote:
>> > >
>> > >
>> > >
>> > > On 01/28/2016 06:50 PM, Pradeep wrote:
>> > > > Hello Doug,
>> > > >
>> > > > I have used the gtmseg with --keep-cc flag and the
>> > > corresponding ctab
>> > > > files showed the labels but the mri_gtmpvc step fai

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-02-18 Thread Douglas N Greve
If you are not doing PVC, then the easiest (and most accurate) will be 
to map the PET to the individual anatomical space, then use mri_segstats 
with aparc+aseg.mgz as the segmentation to compute the mean in each ROI. 
If you want to continue with your stream, you can use mri_segstats using 
--annot fsaverage lh aparc


On 02/17/2016 09:26 AM, Benjamin Spurny wrote:
> Hi Doug,
>
> Yes kind of,
> I am just looking for a way to read out PET data from a surface.
> I want to do an ROI-based analysis just on brainsurfaces of PET data.
>
> What I did so far is that I coregistered the PET with the MR and used to
> vol2surf function to project my surface on the fsaverage with each
> subject.
>
> Is there now a method to read the .mgh files of the surfaces ROI-based
> using the Desikan atlas?
>
> Currently I am reading them out in Matlab using the .mgh file of my
> subjects surface and the .annot file from the fsaverage.
> I just wondered if there is a way to do this in Freesurfer as well?
>
> Best,
> Benjamin
>
>
> Am 16.02.2016 20:56, schrieb Douglas N Greve:
>> Hi Benjamin, do you still have a question about this? I lost the thread
>> so please summarize the problem again.
>> thanks
>> doug
>>
>> On 02/09/2016 05:01 AM, Benjamin Spurny wrote:
>>> Hello Doug,
>>>
>>> Thanks for your answer!
>>> I already tried this workflow but basically I am interested in a
>>> surface-based analysis. Is it possible by using this workflow to get
>>> the
>>> any stats.dat just for surface-ROIs?
>>>
>>> Best,
>>> Benjamin Spurny
>>>
>>>
>>> On Fr, 29.01.2016, 01:34, Douglas N Greve wrote:
 On 01/28/2016 06:50 PM, Pradeep wrote:
> Hello Doug,
>
> I have used the gtmseg with --keep-cc  flag and the corresponding
> ctab
> files showed the labels but the mri_gtmpvc step failed.
> 
> Loading seg for gtm gtmseg.mgz
> Loading seg ctab gtmseg.ctab
> Reading gtmseg.lta
> Replacing 18
> ERROR: CheckSegTissueType() no entry for seg 192
> Failed tissue type check
> 
 What is your mri_gtmpvc command line? What is the rest of the
 terminal
 output?
> My objective is to use the combination of all CC's as a reference
> region and obtain the PVC results, which would be listed in
> gtm.stats.dat
 It will be best to combine them when running mri_gtmpvc using
 --replace,
 eg, --replace 252 251 --replace 253 251 --replace 254 251 --replace
 255
 251
 this will cause all segments of the CC to appear to be a single
 segment
 (251).
> Also, I read in the previous email discussions that the default
> ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with
> another ROI as a reference region,
> would it be OK take a ratio of the ROI's in gtm.stats.dat table.
 Yes, or you can spec the new region, eg --rescale 251
> Thanks,
> Pradeep
>
> On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
> mailto:gr...@nmr.mgh.harvard.edu>>
> wrote:
>
>
>   If you want to use partial volume correction, then you are
> better
> off
>   using mri_gtmpvc with the bbr registration, something like
>
>   1. To start, run
>
>   gtmseg --s subject
>
>   This will take a couple of hours and produces some files needed
>   for GTM
>   PVC (which is used for GTM, MG, RBV).
>
>   2. You'd then register the PET to the anatomical with
> bbregister
>   (probably with --t2 weighting). Make sure to save the output as
> an
> LTA
>   (--lta). I usually use the mean TAC as the input. You can do
> this in
>   parallel with #1.
>
>   3. You'd then run mri_gtmpvc, something like
>
>   mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01
> --seg
>   gtmseg.mgz
>   --reg reg.lta --default-seg-merge  --o gtmpvc.output
>
>   PSF is the point-spread FWHM of the scanner; reg.lta is the
>   registration from #2. By default, this will scale by pons. The
> output
>   will be gtm.stats.dat and gtm.nii.gz. They both basically have
> the
>   same information. gtm.stats.dat is an easy to read text file.
> Where
>   each row is an ROI, something like:
>
>   9   17 Left-Hippocampussubcort_gm   473
>   174.0831.406   0.1216
>
>   9 = nineth row
>   17 = index for RO
>   Left-Hippocampus = name of ROI
>   subcort_gm = tissue class
>   473 = number of PET voxels in the ROI
>   174 = variance reduction factor for ROI (based on GLM/SGTM)
>   1.406 = PVC uptake of ROI relative to Pons
>   0.1216 = resdiual varaince across voxels in the ROI
>
>   gtm.nii.gz is a nifti file with each "voxel" being an ROI. The
> value
>   is the PVC uptake of ROI relative to Pons. These c

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-02-17 Thread Benjamin Spurny
Hi Doug,

Yes kind of,
I am just looking for a way to read out PET data from a surface.
I want to do an ROI-based analysis just on brainsurfaces of PET data.

What I did so far is that I coregistered the PET with the MR and used to 
vol2surf function to project my surface on the fsaverage with each 
subject.

Is there now a method to read the .mgh files of the surfaces ROI-based 
using the Desikan atlas?

Currently I am reading them out in Matlab using the .mgh file of my 
subjects surface and the .annot file from the fsaverage.
I just wondered if there is a way to do this in Freesurfer as well?

Best,
Benjamin


Am 16.02.2016 20:56, schrieb Douglas N Greve:
> Hi Benjamin, do you still have a question about this? I lost the thread
> so please summarize the problem again.
> thanks
> doug
> 
> On 02/09/2016 05:01 AM, Benjamin Spurny wrote:
>> Hello Doug,
>> 
>> Thanks for your answer!
>> I already tried this workflow but basically I am interested in a
>> surface-based analysis. Is it possible by using this workflow to get 
>> the
>> any stats.dat just for surface-ROIs?
>> 
>> Best,
>> Benjamin Spurny
>> 
>> 
>> On Fr, 29.01.2016, 01:34, Douglas N Greve wrote:
>>> 
>>> On 01/28/2016 06:50 PM, Pradeep wrote:
 Hello Doug,
 
 I have used the gtmseg with --keep-cc  flag and the corresponding 
 ctab
 files showed the labels but the mri_gtmpvc step failed.
 
 Loading seg for gtm gtmseg.mgz
 Loading seg ctab gtmseg.ctab
 Reading gtmseg.lta
 Replacing 18
 ERROR: CheckSegTissueType() no entry for seg 192
 Failed tissue type check
 
>>> What is your mri_gtmpvc command line? What is the rest of the 
>>> terminal
>>> output?
 My objective is to use the combination of all CC's as a reference
 region and obtain the PVC results, which would be listed in
 gtm.stats.dat
>>> It will be best to combine them when running mri_gtmpvc using 
>>> --replace,
>>> eg, --replace 252 251 --replace 253 251 --replace 254 251 --replace 
>>> 255
>>> 251
>>> this will cause all segments of the CC to appear to be a single 
>>> segment
>>> (251).
 Also, I read in the previous email discussions that the default
 ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with
 another ROI as a reference region,
 would it be OK take a ratio of the ROI's in gtm.stats.dat table.
>>> Yes, or you can spec the new region, eg --rescale 251
 Thanks,
 Pradeep
 
 On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
 mailto:gr...@nmr.mgh.harvard.edu>> 
 wrote:
 
 
  If you want to use partial volume correction, then you are 
 better
 off
  using mri_gtmpvc with the bbr registration, something like
 
  1. To start, run
 
  gtmseg --s subject
 
  This will take a couple of hours and produces some files needed
  for GTM
  PVC (which is used for GTM, MG, RBV).
 
  2. You'd then register the PET to the anatomical with 
 bbregister
  (probably with --t2 weighting). Make sure to save the output as 
 an
 LTA
  (--lta). I usually use the mean TAC as the input. You can do 
 this in
  parallel with #1.
 
  3. You'd then run mri_gtmpvc, something like
 
  mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 
 --seg
  gtmseg.mgz
  --reg reg.lta --default-seg-merge  --o gtmpvc.output
 
  PSF is the point-spread FWHM of the scanner; reg.lta is the
  registration from #2. By default, this will scale by pons. The
 output
  will be gtm.stats.dat and gtm.nii.gz. They both basically have 
 the
  same information. gtm.stats.dat is an easy to read text file. 
 Where
  each row is an ROI, something like:
 
  9   17 Left-Hippocampussubcort_gm   473
  174.0831.406   0.1216
 
  9 = nineth row
  17 = index for RO
  Left-Hippocampus = name of ROI
  subcort_gm = tissue class
  473 = number of PET voxels in the ROI
  174 = variance reduction factor for ROI (based on GLM/SGTM)
  1.406 = PVC uptake of ROI relative to Pons
  0.1216 = resdiual varaince across voxels in the ROI
 
  gtm.nii.gz is a nifti file with each "voxel" being an ROI. The 
 value
  is the PVC uptake of ROI relative to Pons. These can easily be
  concatenated together (mri_concat) and used as input to 
 mri_glmfit
  for group analysis.
 
 
 
 
  On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
  > Dear Freesurfer experts!
  >
  > I am currently working on PET analysis using FS
  >
  > I coregistered my PET with the processed MR using bbregister,
  > transfered it to a surface using mri_vol2surf
  > and now createt an overlay in freevie

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-02-16 Thread Douglas N Greve
Hi Benjamin, do you still have a question about this? I lost the thread 
so please summarize the problem again.
thanks
doug

On 02/09/2016 05:01 AM, Benjamin Spurny wrote:
> Hello Doug,
>
> Thanks for your answer!
> I already tried this workflow but basically I am interested in a
> surface-based analysis. Is it possible by using this workflow to get the
> any stats.dat just for surface-ROIs?
>
> Best,
> Benjamin Spurny
>
>
> On Fr, 29.01.2016, 01:34, Douglas N Greve wrote:
>>
>> On 01/28/2016 06:50 PM, Pradeep wrote:
>>> Hello Doug,
>>>
>>> I have used the gtmseg with --keep-cc  flag and the corresponding ctab
>>> files showed the labels but the mri_gtmpvc step failed.
>>> 
>>> Loading seg for gtm gtmseg.mgz
>>> Loading seg ctab gtmseg.ctab
>>> Reading gtmseg.lta
>>> Replacing 18
>>> ERROR: CheckSegTissueType() no entry for seg 192
>>> Failed tissue type check
>>> 
>> What is your mri_gtmpvc command line? What is the rest of the terminal
>> output?
>>> My objective is to use the combination of all CC's as a reference
>>> region and obtain the PVC results, which would be listed in
>>> gtm.stats.dat
>> It will be best to combine them when running mri_gtmpvc using --replace,
>> eg, --replace 252 251 --replace 253 251 --replace 254 251 --replace 255
>> 251
>> this will cause all segments of the CC to appear to be a single segment
>> (251).
>>> Also, I read in the previous email discussions that the default
>>> ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with
>>> another ROI as a reference region,
>>> would it be OK take a ratio of the ROI's in gtm.stats.dat table.
>> Yes, or you can spec the new region, eg --rescale 251
>>> Thanks,
>>> Pradeep
>>>
>>> On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
>>> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>>
>>>
>>>  If you want to use partial volume correction, then you are better
>>> off
>>>  using mri_gtmpvc with the bbr registration, something like
>>>
>>>  1. To start, run
>>>
>>>  gtmseg --s subject
>>>
>>>  This will take a couple of hours and produces some files needed
>>>  for GTM
>>>  PVC (which is used for GTM, MG, RBV).
>>>
>>>  2. You'd then register the PET to the anatomical with bbregister
>>>  (probably with --t2 weighting). Make sure to save the output as an
>>> LTA
>>>  (--lta). I usually use the mean TAC as the input. You can do this in
>>>  parallel with #1.
>>>
>>>  3. You'd then run mri_gtmpvc, something like
>>>
>>>  mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 --seg
>>>  gtmseg.mgz
>>>  --reg reg.lta --default-seg-merge  --o gtmpvc.output
>>>
>>>  PSF is the point-spread FWHM of the scanner; reg.lta is the
>>>  registration from #2. By default, this will scale by pons. The
>>> output
>>>  will be gtm.stats.dat and gtm.nii.gz. They both basically have the
>>>  same information. gtm.stats.dat is an easy to read text file. Where
>>>  each row is an ROI, something like:
>>>
>>>  9   17 Left-Hippocampussubcort_gm   473
>>>  174.0831.406   0.1216
>>>
>>>  9 = nineth row
>>>  17 = index for RO
>>>  Left-Hippocampus = name of ROI
>>>  subcort_gm = tissue class
>>>  473 = number of PET voxels in the ROI
>>>  174 = variance reduction factor for ROI (based on GLM/SGTM)
>>>  1.406 = PVC uptake of ROI relative to Pons
>>>  0.1216 = resdiual varaince across voxels in the ROI
>>>
>>>  gtm.nii.gz is a nifti file with each "voxel" being an ROI. The value
>>>  is the PVC uptake of ROI relative to Pons. These can easily be
>>>  concatenated together (mri_concat) and used as input to mri_glmfit
>>>  for group analysis.
>>>
>>>
>>>
>>>
>>>  On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
>>>  > Dear Freesurfer experts!
>>>  >
>>>  > I am currently working on PET analysis using FS
>>>  >
>>>  > I coregistered my PET with the processed MR using bbregister,
>>>  > transfered it to a surface using mri_vol2surf
>>>  > and now createt an overlay in freeview with the lh.inflated and
>>>  used the
>>>  > labels from the lh.aparc.a2009s.annot file.
>>>  >
>>>  > In freeview i get the corresponding BP value for each vertex now
>>> but
>>>  > is there a way to get a list of vertices with the corresponding
>>>  BP value
>>>  > and the corresponding ROI this vertex belongs to?
>>>  > Or is there a better to do this analyis?
>>>  >
>>>  > Many thanks in advance!
>>>  >
>>>  > Benjamin
>>>  >
>>>  > ___
>>>  > 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 

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-02-09 Thread Benjamin Spurny
Hello Doug,

Thanks for your answer!
I already tried this workflow but basically I am interested in a
surface-based analysis. Is it possible by using this workflow to get the
any stats.dat just for surface-ROIs?

Best,
Benjamin Spurny


On Fr, 29.01.2016, 01:34, Douglas N Greve wrote:
>
>
> On 01/28/2016 06:50 PM, Pradeep wrote:
>> Hello Doug,
>>
>> I have used the gtmseg with --keep-cc  flag and the corresponding ctab
>> files showed the labels but the mri_gtmpvc step failed.
>> 
>> Loading seg for gtm gtmseg.mgz
>> Loading seg ctab gtmseg.ctab
>> Reading gtmseg.lta
>> Replacing 18
>> ERROR: CheckSegTissueType() no entry for seg 192
>> Failed tissue type check
>> 
> What is your mri_gtmpvc command line? What is the rest of the terminal
> output?
>> My objective is to use the combination of all CC's as a reference
>> region and obtain the PVC results, which would be listed in
>> gtm.stats.dat
> It will be best to combine them when running mri_gtmpvc using --replace,
> eg, --replace 252 251 --replace 253 251 --replace 254 251 --replace 255
> 251
> this will cause all segments of the CC to appear to be a single segment
> (251).
>>
>> Also, I read in the previous email discussions that the default
>> ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with
>> another ROI as a reference region,
>> would it be OK take a ratio of the ROI's in gtm.stats.dat table.
> Yes, or you can spec the new region, eg --rescale 251
>>
>> Thanks,
>> Pradeep
>>
>> On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
>> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>
>>
>> If you want to use partial volume correction, then you are better
>> off
>> using mri_gtmpvc with the bbr registration, something like
>>
>> 1. To start, run
>>
>> gtmseg --s subject
>>
>> This will take a couple of hours and produces some files needed
>> for GTM
>> PVC (which is used for GTM, MG, RBV).
>>
>> 2. You'd then register the PET to the anatomical with bbregister
>> (probably with --t2 weighting). Make sure to save the output as an
>> LTA
>> (--lta). I usually use the mean TAC as the input. You can do this in
>> parallel with #1.
>>
>> 3. You'd then run mri_gtmpvc, something like
>>
>> mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 --seg
>> gtmseg.mgz
>> --reg reg.lta --default-seg-merge  --o gtmpvc.output
>>
>> PSF is the point-spread FWHM of the scanner; reg.lta is the
>> registration from #2. By default, this will scale by pons. The
>> output
>> will be gtm.stats.dat and gtm.nii.gz. They both basically have the
>> same information. gtm.stats.dat is an easy to read text file. Where
>> each row is an ROI, something like:
>>
>> 9   17 Left-Hippocampussubcort_gm   473
>> 174.0831.406   0.1216
>>
>> 9 = nineth row
>> 17 = index for RO
>> Left-Hippocampus = name of ROI
>> subcort_gm = tissue class
>> 473 = number of PET voxels in the ROI
>> 174 = variance reduction factor for ROI (based on GLM/SGTM)
>> 1.406 = PVC uptake of ROI relative to Pons
>> 0.1216 = resdiual varaince across voxels in the ROI
>>
>> gtm.nii.gz is a nifti file with each "voxel" being an ROI. The value
>> is the PVC uptake of ROI relative to Pons. These can easily be
>> concatenated together (mri_concat) and used as input to mri_glmfit
>> for group analysis.
>>
>>
>>
>>
>> On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
>> > Dear Freesurfer experts!
>> >
>> > I am currently working on PET analysis using FS
>> >
>> > I coregistered my PET with the processed MR using bbregister,
>> > transfered it to a surface using mri_vol2surf
>> > and now createt an overlay in freeview with the lh.inflated and
>> used the
>> > labels from the lh.aparc.a2009s.annot file.
>> >
>> > In freeview i get the corresponding BP value for each vertex now
>> but
>> > is there a way to get a list of vertices with the corresponding
>> BP value
>> > and the corresponding ROI this vertex belongs to?
>> > Or is there a better to do this analyis?
>> >
>> > Many thanks in advance!
>> >
>> > Benjamin
>> >
>> > ___
>> > 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
>> 

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-29 Thread Pradeep
It worked! Thank you!
mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
gtmseg.mgz --reg output.lta --replace-file seg.replace251.list --rescale
251 --mgx 0.01 --o gtmpvcRcc.output

On Fri, Jan 29, 2016 at 12:23 PM, Douglas N Greve  wrote:

> The problem is that --default-seg-merge merges the CC with WM, so you
> can't use that option, which means that you'll have to specify the rest
> of the default seg merge manually. You can do this with more --replace
> args or you can create a file. If you've been able to run mri_gtmpvc
> without the current replace, then it will create a replacement file in
> the aux folder. Get that, remove the 251 entry, and change the 252-255
> entries to point to 251
>
> On 01/29/2016 02:12 PM, Pradeep wrote:
> > Unfortunately, that did not fix the problem.
> >
> > Here is what I did
> > 1)gtmseg --s 128_S_0225_v06 --keep-cc # noerrors
> > 2)gtmseg --s 128_S_0225_v06 --keep-cc --no-xcerseg  # no errors
> >
> > 3)mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251
> > --replace 253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o
> > gtmpvcrcc.output
> > Loading input t12pet.nii.gz
> >   done loading input 1 frames
> > ERROR: item 251 appears as both source and target seg id in
> > replacement list
> >
> > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> > cd /analysis/software_test/fs6pvc/128_S_0225_v06/mri
> > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251
> > --replace 253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o
> > gtmpvcrcc.output
> > sysname  Linux
> > hostname
> > machine  x86_64
> > user
> > vgthresh   0.001000
> > nReplace   22
> > 0. 0. 0. 0. 0. 0.
> > 9 avail.processors, using 9
> > Creating output directory gtmpvcrcc.output
> > Loading seg for gtm gtmseg.mgz
> > Loading seg ctab gtmseg.ctab
> > Reading gtmseg.lta
> > Replacing 22
> > ERROR: CheckSegTissueType() no entry for seg 192
> > Failed tissue type check
> >
> > Thank you for looking into this,
> > Pradeep
> >
> >
> > On Fri, Jan 29, 2016 at 10:13 AM, Douglas N Greve
> > mailto:gr...@nmr.mgh.harvard.edu>> wrote:
> >
> > I think I see the problem. When you run gtmseg, you need to add
> > --keep-cc. You can rerun it using the previous command line, but add
> > --keep-cc and --no-xcerseg. The second option tells it not to redo
> the
> > extracerebral segmentation (which won't change with CC)
> >
> > On 01/29/2016 11:21 AM, Pradeep wrote:
> > > Thank you for the response.
> > >
> > > Here is my full command log with error
> > >
> > >
> > > $gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc
> > >
> > > $ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
> > > gtmpvccc.output
> > > Loading input t12pet.nii.gz
> > >   done loading input 1 frames
> > >
> > > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> > > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> > > cd /analysis/software_test/fs6pvc/**/mri
> > > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
> > > gtmpvccc.output
> > > sysname  Linux
> > > hostname server
> > > machine  x86_64
> > > user user
> > > vgthresh   0.001000
> > > nReplace   18
> > > 0. 0. 0. 0. 0. 0.
> > > 9 avail.processors, using 9
> > > Creating output directory gtmpvccc.output
> > > Loading seg for gtm gtmseg.mgz
> > > Loading seg ctab gtmseg.ctab
> > > Reading gtmseg.lta
> > > Replacing 18
> > > ERROR: CheckSegTissueType() no entry for seg 192
> > > Failed tissue type check
> > >
> > >
> > > Thanks,
> > > Pradeep
> > >
> > >
> > > On Thu, Jan 28, 2016 at 5:34 PM, Douglas N Greve
> > > mailto:gr...@nmr.mgh.harvard.edu>
> >  > >> wrote:
> > >
> > >
> > >
> > > On 01/28/2016 06:50 PM, Pradeep wrote:
> > > > Hello Doug,
> > > >
> > > > I have used the gtmseg with --keep-cc flag and the
> > > corresponding ctab
> > > > files showed the labels but the mri_gtmpvc step failed.
> > > > 
> > > > Loading seg for gtm gtmseg.mgz
> > > > Loading seg ctab gtmseg.ctab
> > > > Reading gtmseg.lta
> > > > Replacing 18
> > > > ERROR: CheckSegTissueType() no entry for seg 192
> > > > Failed tissue type check
> > > > 
> > > What is your mri_gtmpvc command line? What is the rest of
> > the terminal
>

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-29 Thread Douglas N Greve
The problem is that --default-seg-merge merges the CC with WM, so you 
can't use that option, which means that you'll have to specify the rest 
of the default seg merge manually. You can do this with more --replace 
args or you can create a file. If you've been able to run mri_gtmpvc 
without the current replace, then it will create a replacement file in 
the aux folder. Get that, remove the 251 entry, and change the 252-255 
entries to point to 251

On 01/29/2016 02:12 PM, Pradeep wrote:
> Unfortunately, that did not fix the problem.
>
> Here is what I did
> 1)gtmseg --s 128_S_0225_v06 --keep-cc # noerrors
> 2)gtmseg --s 128_S_0225_v06 --keep-cc --no-xcerseg  # no errors
>
> 3)mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg 
> gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251 
> --replace 253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o 
> gtmpvcrcc.output
> Loading input t12pet.nii.gz
>   done loading input 1 frames
> ERROR: item 251 appears as both source and target seg id in 
> replacement list
>
> $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> cd /analysis/software_test/fs6pvc/128_S_0225_v06/mri
> mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg 
> gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251 
> --replace 253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o 
> gtmpvcrcc.output
> sysname  Linux
> hostname
> machine  x86_64
> user
> vgthresh   0.001000
> nReplace   22
> 0. 0. 0. 0. 0. 0.
> 9 avail.processors, using 9
> Creating output directory gtmpvcrcc.output
> Loading seg for gtm gtmseg.mgz
> Loading seg ctab gtmseg.ctab
> Reading gtmseg.lta
> Replacing 22
> ERROR: CheckSegTissueType() no entry for seg 192
> Failed tissue type check
>
> Thank you for looking into this,
> Pradeep
>
>
> On Fri, Jan 29, 2016 at 10:13 AM, Douglas N Greve 
> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>
> I think I see the problem. When you run gtmseg, you need to add
> --keep-cc. You can rerun it using the previous command line, but add
> --keep-cc and --no-xcerseg. The second option tells it not to redo the
> extracerebral segmentation (which won't change with CC)
>
> On 01/29/2016 11:21 AM, Pradeep wrote:
> > Thank you for the response.
> >
> > Here is my full command log with error
> >
> >
> > $gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc
> >
> > $ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
> > gtmpvccc.output
> > Loading input t12pet.nii.gz
> >   done loading input 1 frames
> >
> > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> > cd /analysis/software_test/fs6pvc/**/mri
> > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
> > gtmpvccc.output
> > sysname  Linux
> > hostname server
> > machine  x86_64
> > user user
> > vgthresh   0.001000
> > nReplace   18
> > 0. 0. 0. 0. 0. 0.
> > 9 avail.processors, using 9
> > Creating output directory gtmpvccc.output
> > Loading seg for gtm gtmseg.mgz
> > Loading seg ctab gtmseg.ctab
> > Reading gtmseg.lta
> > Replacing 18
> > ERROR: CheckSegTissueType() no entry for seg 192
> > Failed tissue type check
> >
> >
> > Thanks,
> > Pradeep
> >
> >
> > On Thu, Jan 28, 2016 at 5:34 PM, Douglas N Greve
> > mailto:gr...@nmr.mgh.harvard.edu>
>  >> wrote:
> >
> >
> >
> > On 01/28/2016 06:50 PM, Pradeep wrote:
> > > Hello Doug,
> > >
> > > I have used the gtmseg with --keep-cc flag and the
> > corresponding ctab
> > > files showed the labels but the mri_gtmpvc step failed.
> > > 
> > > Loading seg for gtm gtmseg.mgz
> > > Loading seg ctab gtmseg.ctab
> > > Reading gtmseg.lta
> > > Replacing 18
> > > ERROR: CheckSegTissueType() no entry for seg 192
> > > Failed tissue type check
> > > 
> > What is your mri_gtmpvc command line? What is the rest of
> the terminal
> > output?
> > > My objective is to use the combination of all CC's as a
> reference
> > > region and obtain the PVC results, which would be listed in
> > gtm.stats.dat
> > It will be best to combine them when running mri_gtmpvc using
> > --replace,
> > eg, --replace 252 251 --replace 253 251 --replace 254 251
> > --replace 255 251
> > this will cause all segments of the CC to appear to be a single
> > 

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-29 Thread Pradeep
Unfortunately, that did not fix the problem.

Here is what I did
1)gtmseg --s 128_S_0225_v06 --keep-cc # noerrors
2)gtmseg --s 128_S_0225_v06 --keep-cc --no-xcerseg  # no errors

3)mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251 --replace
253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o gtmpvcrcc.output
Loading input t12pet.nii.gz
  done loading input 1 frames
ERROR: item 251 appears as both source and target seg id in replacement list

$Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
cd /analysis/software_test/fs6pvc/128_S_0225_v06/mri
mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
gtmseg.mgz --reg output.lta --default-seg-merge --replace 252 251 --replace
253 251 --replace 254 251 --replace 255 251 --mgx 0.01 --o gtmpvcrcc.output
sysname  Linux
hostname
machine  x86_64
user
vgthresh   0.001000
nReplace   22
0. 0. 0. 0. 0. 0.
9 avail.processors, using 9
Creating output directory gtmpvcrcc.output
Loading seg for gtm gtmseg.mgz
Loading seg ctab gtmseg.ctab
Reading gtmseg.lta
Replacing 22
ERROR: CheckSegTissueType() no entry for seg 192
Failed tissue type check

Thank you for looking into this,
Pradeep


On Fri, Jan 29, 2016 at 10:13 AM, Douglas N Greve  wrote:

> I think I see the problem. When you run gtmseg, you need to add
> --keep-cc. You can rerun it using the previous command line, but add
> --keep-cc and --no-xcerseg. The second option tells it not to redo the
> extracerebral segmentation (which won't change with CC)
>
> On 01/29/2016 11:21 AM, Pradeep wrote:
> > Thank you for the response.
> >
> > Here is my full command log with error
> >
> >
> > $gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc
> >
> > $ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
> > gtmpvccc.output
> > Loading input t12pet.nii.gz
> >   done loading input 1 frames
> >
> > $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> > setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> > cd /analysis/software_test/fs6pvc/**/mri
> > mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
> > gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
> > gtmpvccc.output
> > sysname  Linux
> > hostname server
> > machine  x86_64
> > user user
> > vgthresh   0.001000
> > nReplace   18
> > 0. 0. 0. 0. 0. 0.
> > 9 avail.processors, using 9
> > Creating output directory gtmpvccc.output
> > Loading seg for gtm gtmseg.mgz
> > Loading seg ctab gtmseg.ctab
> > Reading gtmseg.lta
> > Replacing 18
> > ERROR: CheckSegTissueType() no entry for seg 192
> > Failed tissue type check
> >
> >
> > Thanks,
> > Pradeep
> >
> >
> > On Thu, Jan 28, 2016 at 5:34 PM, Douglas N Greve
> > mailto:gr...@nmr.mgh.harvard.edu>> wrote:
> >
> >
> >
> > On 01/28/2016 06:50 PM, Pradeep wrote:
> > > Hello Doug,
> > >
> > > I have used the gtmseg with --keep-cc  flag and the
> > corresponding ctab
> > > files showed the labels but the mri_gtmpvc step failed.
> > > 
> > > Loading seg for gtm gtmseg.mgz
> > > Loading seg ctab gtmseg.ctab
> > > Reading gtmseg.lta
> > > Replacing 18
> > > ERROR: CheckSegTissueType() no entry for seg 192
> > > Failed tissue type check
> > > 
> > What is your mri_gtmpvc command line? What is the rest of the
> terminal
> > output?
> > > My objective is to use the combination of all CC's as a reference
> > > region and obtain the PVC results, which would be listed in
> > gtm.stats.dat
> > It will be best to combine them when running mri_gtmpvc using
> > --replace,
> > eg, --replace 252 251 --replace 253 251 --replace 254 251
> > --replace 255 251
> > this will cause all segments of the CC to appear to be a single
> > segment
> > (251).
> > >
> > > Also, I read in the previous email discussions that the default
> > > ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR
> with
> > > another ROI as a reference region,
> > > would it be OK take a ratio of the ROI's in gtm.stats.dat table.
> > Yes, or you can spec the new region, eg --rescale 251
> > >
> > > Thanks,
> > > Pradeep
> > >
> > > On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
> > > mailto:gr...@nmr.mgh.harvard.edu>
> >  > >> wrote:
> > >
> > >
> > > If you want to use partial volume correction, then you are
> > better off
> > > using mri_gtmpvc with the bbr registration, something like
> > >
> > > 1. To start, run
> > >
> > > gtmseg --s subject
> > >
> > > This will take a couple of hours and produces some files needed
> > > for GTM
> > 

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-29 Thread Douglas N Greve
I think I see the problem. When you run gtmseg, you need to add 
--keep-cc. You can rerun it using the previous command line, but add 
--keep-cc and --no-xcerseg. The second option tells it not to redo the 
extracerebral segmentation (which won't change with CC)

On 01/29/2016 11:21 AM, Pradeep wrote:
> Thank you for the response.
>
> Here is my full command log with error
>
>
> $gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc
>
> $ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg 
> gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o 
> gtmpvccc.output
> Loading input t12pet.nii.gz
>   done loading input 1 frames
>
> $Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
> setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
> cd /analysis/software_test/fs6pvc/**/mri
> mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg 
> gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o 
> gtmpvccc.output
> sysname  Linux
> hostname server
> machine  x86_64
> user user
> vgthresh   0.001000
> nReplace   18
> 0. 0. 0. 0. 0. 0.
> 9 avail.processors, using 9
> Creating output directory gtmpvccc.output
> Loading seg for gtm gtmseg.mgz
> Loading seg ctab gtmseg.ctab
> Reading gtmseg.lta
> Replacing 18
> ERROR: CheckSegTissueType() no entry for seg 192
> Failed tissue type check
>
>
> Thanks,
> Pradeep
>
>
> On Thu, Jan 28, 2016 at 5:34 PM, Douglas N Greve 
> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>
>
>
> On 01/28/2016 06:50 PM, Pradeep wrote:
> > Hello Doug,
> >
> > I have used the gtmseg with --keep-cc  flag and the
> corresponding ctab
> > files showed the labels but the mri_gtmpvc step failed.
> > 
> > Loading seg for gtm gtmseg.mgz
> > Loading seg ctab gtmseg.ctab
> > Reading gtmseg.lta
> > Replacing 18
> > ERROR: CheckSegTissueType() no entry for seg 192
> > Failed tissue type check
> > 
> What is your mri_gtmpvc command line? What is the rest of the terminal
> output?
> > My objective is to use the combination of all CC's as a reference
> > region and obtain the PVC results, which would be listed in
> gtm.stats.dat
> It will be best to combine them when running mri_gtmpvc using
> --replace,
> eg, --replace 252 251 --replace 253 251 --replace 254 251
> --replace 255 251
> this will cause all segments of the CC to appear to be a single
> segment
> (251).
> >
> > Also, I read in the previous email discussions that the default
> > ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with
> > another ROI as a reference region,
> > would it be OK take a ratio of the ROI's in gtm.stats.dat table.
> Yes, or you can spec the new region, eg --rescale 251
> >
> > Thanks,
> > Pradeep
> >
> > On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
> > mailto:gr...@nmr.mgh.harvard.edu>
>  >> wrote:
> >
> >
> > If you want to use partial volume correction, then you are
> better off
> > using mri_gtmpvc with the bbr registration, something like
> >
> > 1. To start, run
> >
> > gtmseg --s subject
> >
> > This will take a couple of hours and produces some files needed
> > for GTM
> > PVC (which is used for GTM, MG, RBV).
> >
> > 2. You'd then register the PET to the anatomical with bbregister
> > (probably with --t2 weighting). Make sure to save the output
> as an LTA
> > (--lta). I usually use the mean TAC as the input. You can do
> this in
> > parallel with #1.
> >
> > 3. You'd then run mri_gtmpvc, something like
> >
> > mri_gtmpvc --i pet.nii.gz --psf PSF --auto-mask PSF+2 .01 --seg
> > gtmseg.mgz
> > --reg reg.lta --default-seg-merge  --o gtmpvc.output
> >
> > PSF is the point-spread FWHM of the scanner; reg.lta is the
> > registration from #2. By default, this will scale by pons.
> The output
> > will be gtm.stats.dat and gtm.nii.gz. They both basically
> have the
> > same information. gtm.stats.dat is an easy to read text
> file. Where
> > each row is an ROI, something like:
> >
> > 9   17 Left-Hippocampus subcort_gm   473
> > 174.0831.406   0.1216
> >
> > 9 = nineth row
> > 17 = index for RO
> > Left-Hippocampus = name of ROI
> > subcort_gm = tissue class
> > 473 = number of PET voxels in the ROI
> > 174 = variance reduction factor for ROI (based on GLM/SGTM)
> > 1.406 = PVC uptake of ROI relative to Pons
> > 0.1216 = resdiual varaince across voxels in the ROI
> >
> > gtm.nii.gz is a nifti file with each "voxel" being an ROI.
> The value
> > is the PVC uptake 

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-29 Thread Pradeep
Thank you for the response.

Here is my full command log with error


$gtmseg --s 128_S_0225_v06 --keep-hypo --keep-cc

$ mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
gtmpvccc.output
Loading input t12pet.nii.gz
  done loading input 1 frames

$Id: mri_gtmpvc.c,v 1.52.2.5 2015/08/28 19:00:13 greve Exp $
setenv SUBJECTS_DIR /analysis/software_test/fs6pvc
cd /analysis/software_test/fs6pvc/**/mri
mri_gtmpvc --i t12pet.nii.gz --psf 4 --auto-mask PSF+2 0.01 --seg
gtmseg.mgz --reg output.lta --default-seg-merge --mgx 0.01 --o
gtmpvccc.output
sysname  Linux
hostname server
machine  x86_64
user user
vgthresh   0.001000
nReplace   18
0. 0. 0. 0. 0. 0.
9 avail.processors, using 9
Creating output directory gtmpvccc.output
Loading seg for gtm gtmseg.mgz
Loading seg ctab gtmseg.ctab
Reading gtmseg.lta
Replacing 18
ERROR: CheckSegTissueType() no entry for seg 192
Failed tissue type check


Thanks,
Pradeep


On Thu, Jan 28, 2016 at 5:34 PM, Douglas N Greve 
wrote:

>
>
> On 01/28/2016 06:50 PM, Pradeep wrote:
> > Hello Doug,
> >
> > I have used the gtmseg with --keep-cc  flag and the corresponding ctab
> > files showed the labels but the mri_gtmpvc step failed.
> > 
> > Loading seg for gtm gtmseg.mgz
> > Loading seg ctab gtmseg.ctab
> > Reading gtmseg.lta
> > Replacing 18
> > ERROR: CheckSegTissueType() no entry for seg 192
> > Failed tissue type check
> > 
> What is your mri_gtmpvc command line? What is the rest of the terminal
> output?
> > My objective is to use the combination of all CC's as a reference
> > region and obtain the PVC results, which would be listed in gtm.stats.dat
> It will be best to combine them when running mri_gtmpvc using --replace,
> eg, --replace 252 251 --replace 253 251 --replace 254 251 --replace 255 251
> this will cause all segments of the CC to appear to be a single segment
> (251).
> >
> > Also, I read in the previous email discussions that the default
> > ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with
> > another ROI as a reference region,
> > would it be OK take a ratio of the ROI's in gtm.stats.dat table.
> Yes, or you can spec the new region, eg --rescale 251
> >
> > Thanks,
> > Pradeep
> >
> > On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve
> > mailto:gr...@nmr.mgh.harvard.edu>> wrote:
> >
> >
> > If you want to use partial volume correction, then you are better off
> > using mri_gtmpvc with the bbr registration, something like
> >
> > 1. To start, run
> >
> > gtmseg --s subject
> >
> > This will take a couple of hours and produces some files needed
> > for GTM
> > PVC (which is used for GTM, MG, RBV).
> >
> > 2. You'd then register the PET to the anatomical with bbregister
> > (probably with --t2 weighting). Make sure to save the output as an
> LTA
> > (--lta). I usually use the mean TAC as the input. You can do this in
> > parallel with #1.
> >
> > 3. You'd then run mri_gtmpvc, something like
> >
> > mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 --seg
> > gtmseg.mgz
> > --reg reg.lta --default-seg-merge  --o gtmpvc.output
> >
> > PSF is the point-spread FWHM of the scanner; reg.lta is the
> > registration from #2. By default, this will scale by pons. The output
> > will be gtm.stats.dat and gtm.nii.gz. They both basically have the
> > same information. gtm.stats.dat is an easy to read text file. Where
> > each row is an ROI, something like:
> >
> > 9   17 Left-Hippocampussubcort_gm   473
> > 174.0831.406   0.1216
> >
> > 9 = nineth row
> > 17 = index for RO
> > Left-Hippocampus = name of ROI
> > subcort_gm = tissue class
> > 473 = number of PET voxels in the ROI
> > 174 = variance reduction factor for ROI (based on GLM/SGTM)
> > 1.406 = PVC uptake of ROI relative to Pons
> > 0.1216 = resdiual varaince across voxels in the ROI
> >
> > gtm.nii.gz is a nifti file with each "voxel" being an ROI. The value
> > is the PVC uptake of ROI relative to Pons. These can easily be
> > concatenated together (mri_concat) and used as input to mri_glmfit
> > for group analysis.
> >
> >
> >
> >
> > On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
> > > Dear Freesurfer experts!
> > >
> > > I am currently working on PET analysis using FS
> > >
> > > I coregistered my PET with the processed MR using bbregister,
> > > transfered it to a surface using mri_vol2surf
> > > and now createt an overlay in freeview with the lh.inflated and
> > used the
> > > labels from the lh.aparc.a2009s.annot file.
> > >
> > > In freeview i get the corresponding BP value for each vertex now
> but
> > > is there a way to get a list of vertices with the corresponding
> > BP value
> > > and the corresponding ROI this vertex belongs to?
> > > Or is

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-28 Thread Douglas N Greve


On 01/28/2016 06:50 PM, Pradeep wrote:
> Hello Doug,
>
> I have used the gtmseg with --keep-cc  flag and the corresponding ctab 
> files showed the labels but the mri_gtmpvc step failed.
> 
> Loading seg for gtm gtmseg.mgz
> Loading seg ctab gtmseg.ctab
> Reading gtmseg.lta
> Replacing 18
> ERROR: CheckSegTissueType() no entry for seg 192
> Failed tissue type check
> 
What is your mri_gtmpvc command line? What is the rest of the terminal 
output?
> My objective is to use the combination of all CC's as a reference 
> region and obtain the PVC results, which would be listed in gtm.stats.dat
It will be best to combine them when running mri_gtmpvc using --replace, 
eg, --replace 252 251 --replace 253 251 --replace 254 251 --replace 255 251
this will cause all segments of the CC to appear to be a single segment 
(251).
>
> Also, I read in the previous email discussions that the default 
> ref-region Pons is 'PVC'ed'. So if I want to calculate the SUVR with 
> another ROI as a reference region,
> would it be OK take a ratio of the ROI's in gtm.stats.dat table.
Yes, or you can spec the new region, eg --rescale 251
>
> Thanks,
> Pradeep
>
> On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve 
> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>
>
> If you want to use partial volume correction, then you are better off
> using mri_gtmpvc with the bbr registration, something like
>
> 1. To start, run
>
> gtmseg --s subject
>
> This will take a couple of hours and produces some files needed
> for GTM
> PVC (which is used for GTM, MG, RBV).
>
> 2. You'd then register the PET to the anatomical with bbregister
> (probably with --t2 weighting). Make sure to save the output as an LTA
> (--lta). I usually use the mean TAC as the input. You can do this in
> parallel with #1.
>
> 3. You'd then run mri_gtmpvc, something like
>
> mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 --seg
> gtmseg.mgz
> --reg reg.lta --default-seg-merge  --o gtmpvc.output
>
> PSF is the point-spread FWHM of the scanner; reg.lta is the
> registration from #2. By default, this will scale by pons. The output
> will be gtm.stats.dat and gtm.nii.gz. They both basically have the
> same information. gtm.stats.dat is an easy to read text file. Where
> each row is an ROI, something like:
>
> 9   17 Left-Hippocampussubcort_gm   473
> 174.0831.406   0.1216
>
> 9 = nineth row
> 17 = index for RO
> Left-Hippocampus = name of ROI
> subcort_gm = tissue class
> 473 = number of PET voxels in the ROI
> 174 = variance reduction factor for ROI (based on GLM/SGTM)
> 1.406 = PVC uptake of ROI relative to Pons
> 0.1216 = resdiual varaince across voxels in the ROI
>
> gtm.nii.gz is a nifti file with each "voxel" being an ROI. The value
> is the PVC uptake of ROI relative to Pons. These can easily be
> concatenated together (mri_concat) and used as input to mri_glmfit
> for group analysis.
>
>
>
>
> On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
> > Dear Freesurfer experts!
> >
> > I am currently working on PET analysis using FS
> >
> > I coregistered my PET with the processed MR using bbregister,
> > transfered it to a surface using mri_vol2surf
> > and now createt an overlay in freeview with the lh.inflated and
> used the
> > labels from the lh.aparc.a2009s.annot file.
> >
> > In freeview i get the corresponding BP value for each vertex now but
> > is there a way to get a list of vertices with the corresponding
> BP value
> > and the corresponding ROI this vertex belongs to?
> > Or is there a better to do this analyis?
> >
> > Many thanks in advance!
> >
> > Benjamin
> >
> > ___
> > 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
>
>
> The information in this e-mail is intended only for the person to
> whom it is
>  

Re: [Freesurfer] Reading values from overlays with PETcoreg

2016-01-28 Thread Pradeep
Hello Doug,

I have used the gtmseg with --keep-cc  flag and the corresponding ctab
files showed the labels but the mri_gtmpvc step failed.

Loading seg for gtm gtmseg.mgz
Loading seg ctab gtmseg.ctab
Reading gtmseg.lta
Replacing 18
ERROR: CheckSegTissueType() no entry for seg 192
Failed tissue type check

My objective is to use the combination of all CC's as a reference region
and obtain the PVC results, which would be listed in gtm.stats.dat

Also, I read in the previous email discussions that the default ref-region
Pons is 'PVC'ed'. So if I want to calculate the SUVR with another ROI as a
reference region,
would it be OK take a ratio of the ROI's in gtm.stats.dat table.

Thanks,
Pradeep

On Mon, Jan 11, 2016 at 9:25 AM, Douglas N Greve 
wrote:

>
> If you want to use partial volume correction, then you are better off
> using mri_gtmpvc with the bbr registration, something like
>
> 1. To start, run
>
> gtmseg --s subject
>
> This will take a couple of hours and produces some files needed for GTM
> PVC (which is used for GTM, MG, RBV).
>
> 2. You'd then register the PET to the anatomical with bbregister
> (probably with --t2 weighting). Make sure to save the output as an LTA
> (--lta). I usually use the mean TAC as the input. You can do this in
> parallel with #1.
>
> 3. You'd then run mri_gtmpvc, something like
>
> mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 --seg gtmseg.mgz
> --reg reg.lta --default-seg-merge  --o gtmpvc.output
>
> PSF is the point-spread FWHM of the scanner; reg.lta is the
> registration from #2. By default, this will scale by pons.  The output
> will be gtm.stats.dat and gtm.nii.gz. They both basically have the
> same information. gtm.stats.dat is an easy to read text file. Where
> each row is an ROI, something like:
>
> 9   17 Left-Hippocampussubcort_gm   473
> 174.0831.406   0.1216
>
> 9 = nineth row
> 17 = index for RO
> Left-Hippocampus = name of ROI
> subcort_gm = tissue class
> 473 = number of PET voxels in the ROI
> 174 = variance reduction factor for ROI (based on GLM/SGTM)
> 1.406 = PVC uptake of ROI relative to Pons
> 0.1216 = resdiual varaince across voxels in the ROI
>
> gtm.nii.gz is a nifti file with each "voxel" being an ROI. The value
> is the PVC uptake of ROI relative to Pons. These can easily be
> concatenated together (mri_concat) and used as input to mri_glmfit
> for group analysis.
>
>
>
>
> On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
> > Dear Freesurfer experts!
> >
> > I am currently working on PET analysis using FS
> >
> > I coregistered my PET with the processed MR using bbregister,
> > transfered it to a surface using mri_vol2surf
> > and now createt an overlay in freeview with the lh.inflated and used the
> > labels from the lh.aparc.a2009s.annot file.
> >
> > In freeview i get the corresponding BP value for each vertex now but
> > is there a way to get a list of vertices with the corresponding BP value
> > and the corresponding ROI this vertex belongs to?
> > Or is there a better to do this analyis?
> >
> > Many thanks in advance!
> >
> > Benjamin
> >
> > ___
> > 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
>
>
> 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] Reading values from overlays with PETcoreg

2016-01-11 Thread Douglas N Greve

If you want to use partial volume correction, then you are better off 
using mri_gtmpvc with the bbr registration, something like

1. To start, run

gtmseg --s subject

This will take a couple of hours and produces some files needed for GTM 
PVC (which is used for GTM, MG, RBV).

2. You'd then register the PET to the anatomical with bbregister
(probably with --t2 weighting). Make sure to save the output as an LTA
(--lta). I usually use the mean TAC as the input. You can do this in
parallel with #1.

3. You'd then run mri_gtmpvc, something like

mri_gtmpvc --i pet.nii.gz --psf PSF  --auto-mask PSF+2 .01 --seg gtmseg.mgz
--reg reg.lta --default-seg-merge  --o gtmpvc.output

PSF is the point-spread FWHM of the scanner; reg.lta is the
registration from #2. By default, this will scale by pons.  The output
will be gtm.stats.dat and gtm.nii.gz. They both basically have the
same information. gtm.stats.dat is an easy to read text file. Where
each row is an ROI, something like:

9   17 Left-Hippocampussubcort_gm   473 
174.0831.406   0.1216

9 = nineth row
17 = index for RO
Left-Hippocampus = name of ROI
subcort_gm = tissue class
473 = number of PET voxels in the ROI
174 = variance reduction factor for ROI (based on GLM/SGTM)
1.406 = PVC uptake of ROI relative to Pons
0.1216 = resdiual varaince across voxels in the ROI

gtm.nii.gz is a nifti file with each "voxel" being an ROI. The value
is the PVC uptake of ROI relative to Pons. These can easily be
concatenated together (mri_concat) and used as input to mri_glmfit
for group analysis.




On 01/08/2016 04:22 AM, Benjamin Spurny wrote:
> Dear Freesurfer experts!
>
> I am currently working on PET analysis using FS
>
> I coregistered my PET with the processed MR using bbregister,
> transfered it to a surface using mri_vol2surf
> and now createt an overlay in freeview with the lh.inflated and used the
> labels from the lh.aparc.a2009s.annot file.
>
> In freeview i get the corresponding BP value for each vertex now but
> is there a way to get a list of vertices with the corresponding BP value
> and the corresponding ROI this vertex belongs to?
> Or is there a better to do this analyis?
>
> Many thanks in advance!
>
> Benjamin
>
> ___
> 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


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.