Re: [Freesurfer] Projecting processed 4D functional data to individual surfaces

2016-09-28 Thread Jared P Zimmerman
Thanks Doug,

This does seem like it will do the right thing, but it’s failing because it’s 
looking for /SUBJECTS_DIR/ico/ and I do not seem to have an ico subject in my 
subjects_dir

Should this normally be in the subjects_dir?  I don’t recall ever seeing this 
made when I’ve run recon-all in the past.

Thanks,
Jared

Here’s the full terminal output when I run the command:

mri_vol2surf --mov /func_test/filtered_func_residuals.nii.gz --reg 
func_test/coreg/fs_ep2struct_fsl.dat --hemi lh --o 
func_test/surface/lh_surf_filtered_func_residuals.mgh --projfrac 0.5 --interp 
trilinear --noreshape --trgsubject ico --icoorder 6 --out_type mgh --surf-fwhm 6
IcoOrder = 6, nIcoVtxs = 40962
srcvol = /func_test/filtered_func_residuals.nii.gz
srcreg = func_test/coreg/fs_ep2struct_fsl.dat
srcregold = 0
srcwarp unspecified
surf = white
hemi = lh
trgsubject = ico
surfreg = sphere.reg
ProjFrac = 0.5
thickness = thickness
reshape = 0
interp = trilinear
float2int = round
GetProjMax = 0
INFO: float2int code = 0
Done loading volume
Reading surface /subjdir_test//subID/surf/lh.white
Done reading source surface
Reading thickness /subjdir_test//subID/surf/lh.thickness
Done
Mapping Source Volume onto Source Subject Surface
 1 0.5 0.5 0.5
using old
Done mapping volume to surface
Number of source voxels hit = 11345
Reading source surface registration 
 subjdir_test//subID/surf/lh.sphere.reg
Done loading source registration surface
Reading icosahedron, order = 6, radius = 100
   Reading icosahedron /share/apps/freesurfer/5.3.0/lib/bem/ic6.tri
Done loading target registration surface
Mapping Surfaces (subID -> ico)
surf2surf_nnfr: building source hash (res=16).
Surf2Surf: Forward Loop (40962)

surf2surf_nnfr: building target hash (res=16).
Surf2Surf: Reverse Loop (112745)
Reverse Loop had 72236 hits 

> On Sep 28, 2016, at 3:34 PM, Douglas Greve  wrote:
> 
> You need to specify --trgsubject ico in mri_vol2surf
> 
> 
> On 9/28/16 3:01 PM, Jared Zimmerman wrote:
>> Hi All, forwarding this message along again as I'm still having some trouble 
>> getting this to work.  Basically I would like to 1) project processed 
>> residual time-series from the subject-space volume to the subject-space 
>> surface, 2) smooth on the surface, 3) down-sample to FS4 space.
>> 
>> To do this is have used bbregister to calculate the registration, then 
>> mri_vol2surf to project to the surface, but I am not sure the output of 
>> mri_vol2surf is what I should be expecting.  The output file has dimensions 
>> 112745 x 1 x 1 x 120 when I'm expecting ~40k vertices for FS6 space and ~3k 
>> vertices for FS4 space, but changing the --icoorder flag seems to have no 
>> effect on the number of vertices in the output.
>> 
>> I have loaded the output surface functional image into Matlab to se that 
>> there is real time-series data in there, but I have no way of knowing if it 
>> has mapped the data appropriately.  Additionally, I've tried to use 
>> mri_surf2surf to downsample this data but have not ben able to successfully 
>> get that to downsample the surface.  The mri_surf2surf call I used is as 
>> follows:
>> 
>> mri_surf2surf --srcsubject subjID --srcsurfval 
>> /mov_dir/filtered_func_residuals_fs6_lh_6mm_noreshape.mgh --trgsubject 
>> subjID --trgsurfval 
>> /mov_dir/filtered_func_residuals_fs4_lh_6mm_noreshape.mgh --hemi lh 
>> --trgicoorder 4
>> 
>> Any advice on how to achieve my goal of projecting to subject surfaces, 
>> smoothing and downsampling to FS4, as well as recommendations on how to 
>> visualize the surface functional data and confirm that the projections has 
>> worked properly would be much appreciated.  Additionally, what should the 
>> dimensions of a surface time series look like?  I would have expected for 
>> have an nVertices x nFrames x 1 array instead of the nVertices x 1 x 1 x 
>> nFrames array, is this correct?
>> 
>> 
>> Thank you,
>> Jared
>> 
>> - Forwarded Message -
>> From: "Jared Zimmerman" 
>> To: freesurfer@nmr.mgh.harvard.edu
>> Sent: Monday, September 19, 2016 8:46:17 PM
>> Subject: [Freesurfer] Projecting processed 4D functional data to individual  
>> surfaces
>> 
>> Hi All,
>> 
>> I'm trying to project some processed resting-state data onto the surface to 
>> run some surface based parcellations, and I'm running into a bit of 
>> difficulty.  Basically I'm using bbregister to register my functional to the 
>> T1, then mri_vol2surf to project to the surface with the following 
>> pseudocode:
>> 
>> bbregister --s subjID --mov /mov_dir/subjID_example_func_brain.nii.gz \
>>  --reg /mov_dir/coreg/fs_ep2struct_fsl.dat \
>>  --init-fsl --bold
>> 
>> mri_vol2surf --src /mov_dir/filtered_func_residuals.nii.gz \
>>  --out /mov_dir/filtered_func_residuals_fs6_lh_6mm_noreshape.mgh \
>>  --srcreg /coreg/fs_ep2struct_fsl.dat --hemi lh \
>>  --surf white --projfrac 0.5 --icoorder 6 --fwhm 6 --out_type mgh --noreshape
>> 
>> 
>> The registration looks pretty good after I run bbregister, but what I get 
>> out from the mri_

Re: [Freesurfer] Projecting processed 4D functional data to individual surfaces

2016-09-29 Thread Jared P Zimmerman
I want to project to the native subject surfaces though, not fsaverage.  If I 
use —trgsubject subjID would that work with the —icoorder flag?  Alternatively 
I guess I could project to fsaverage and then use mri_surf2surf to move back to 
the subject surface, but that seems like a roundabout way to do it and will 
probably add some unnecessary interpolation.

Also, I’ve used mri_vol2surf without the —trgsubject or —icoorder flags and I 
did successfully get output with 112745 vertices (is this FS7 space?  I would 
have expected ~164k vertices, is this with medial wall masked?) and I could try 
to resample that with mri_surf2surf.  I wasn’t able to do this before, but I 
didn’t use the flag —trgsubject or —trgicoorder flags, though I suspect I will 
run into the same problem trying doing this.  I’m not at my computer now but 
can try this later this afternoon though.

Thanks,
Jared

> On Sep 29, 2016, at 12:00 AM, Douglas Greve  wrote:
> 
> you can actually skip the ico thing and just use --trgsubject fsaverage6
> 
> On 9/28/16 7:06 PM, Jared P Zimmerman wrote:
>> Thanks Doug,
>> 
>> This does seem like it will do the right thing, but it’s failing because 
>> it’s looking for /SUBJECTS_DIR/ico/ and I do not seem to have an ico subject 
>> in my subjects_dir
>> 
>> Should this normally be in the subjects_dir?  I don’t recall ever seeing 
>> this made when I’ve run recon-all in the past.
>> 
>> Thanks,
>> Jared
>> 
>> Here’s the full terminal output when I run the command:
>> 
>>  mri_vol2surf --mov /func_test/filtered_func_residuals.nii.gz --reg 
>> func_test/coreg/fs_ep2struct_fsl.dat --hemi lh --o 
>> func_test/surface/lh_surf_filtered_func_residuals.mgh --projfrac 0.5 
>> --interp trilinear --noreshape --trgsubject ico --icoorder 6 --out_type mgh 
>> --surf-fwhm 6
>> IcoOrder = 6, nIcoVtxs = 40962
>> srcvol = /func_test/filtered_func_residuals.nii.gz
>> srcreg = func_test/coreg/fs_ep2struct_fsl.dat
>> srcregold = 0
>> srcwarp unspecified
>> surf = white
>> hemi = lh
>> trgsubject = ico
>> surfreg = sphere.reg
>> ProjFrac = 0.5
>> thickness = thickness
>> reshape = 0
>> interp = trilinear
>> float2int = round
>> GetProjMax = 0
>> INFO: float2int code = 0
>> Done loading volume
>> Reading surface /subjdir_test//subID/surf/lh.white
>> Done reading source surface
>> Reading thickness /subjdir_test//subID/surf/lh.thickness
>> Done
>> Mapping Source Volume onto Source Subject Surface
>>  1 0.5 0.5 0.5
>> using old
>> Done mapping volume to surface
>> Number of source voxels hit = 11345
>> Reading source surface registration 
>>  subjdir_test//subID/surf/lh.sphere.reg
>> Done loading source registration surface
>> Reading icosahedron, order = 6, radius = 100
>>Reading icosahedron /share/apps/freesurfer/5.3.0/lib/bem/ic6.tri
>> Done loading target registration surface
>> Mapping Surfaces (subID -> ico)
>> surf2surf_nnfr: building source hash (res=16).
>> Surf2Surf: Forward Loop (40962)
>> 
>> surf2surf_nnfr: building target hash (res=16).
>> Surf2Surf: Reverse Loop (112745)
>>  Reverse Loop had 72236 hits 
>> 
>>> On Sep 28, 2016, at 3:34 PM, Douglas Greve >> <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>> 
>>> You need to specify --trgsubject ico in mri_vol2surf
>>> 
>>> 
>>> On 9/28/16 3:01 PM, Jared Zimmerman wrote:
>>>> Hi All, forwarding this message along again as I'm still having some 
>>>> trouble getting this to work.  Basically I would like to 1) project 
>>>> processed residual time-series from the subject-space volume to the 
>>>> subject-space surface, 2) smooth on the surface, 3) down-sample to FS4 
>>>> space.
>>>> 
>>>> To do this is have used bbregister to calculate the registration, then 
>>>> mri_vol2surf to project to the surface, but I am not sure the output of 
>>>> mri_vol2surf is what I should be expecting.  The output file has 
>>>> dimensions 112745 x 1 x 1 x 120 when I'm expecting ~40k vertices for FS6 
>>>> space and ~3k vertices for FS4 space, but changing the --icoorder flag 
>>>> seems to have no effect on the number of vertices in the output.
>>>> 
>>>> I have loaded the output surface functional image into Matlab to se that 
>>>> there is real time-series data in there, but I have no way of knowing if 
>>>> it has mapped the data appropriately.  Additionally, I've tried to use 
>>>> mri_surf2surf to downsample this data but ha

Re: [Freesurfer] Projecting processed 4D functional data to individual surfaces

2016-09-29 Thread Jared P Zimmerman
Ahh, thanks Bruce.  Is there a way to downsample the subject meshes?

-jared

> On Sep 29, 2016, at 10:18 AM, Bruce Fischl  wrote:
> 
> Hi Jared
> 
> the icosahedra are only used to represent average space surface 
> (fsaverage[4-7]), not individual subjects.
> 
> cheers
> Bruce
> On Thu, 29 Sep 2016, Jared P Zimmerman wrote:
> 
>> I want to project to the native subject surfaces though, not fsaverage.  If
>> I use —trgsubject subjID would that work with the —icoorder flag?
>>  Alternatively I guess I could project to fsaverage and then use
>> mri_surf2surf to move back to the subject surface, but that seems like a
>> roundabout way to do it and will probably add some unnecessary
>> interpolation.
>> Also, I’ve used mri_vol2surf without the —trgsubject or —icoorder flags and
>> I did successfully get output with 112745 vertices (is this FS7 space?  I
>> would have expected ~164k vertices, is this with medial wall masked?) and I
>> could try to resample that with mri_surf2surf.  I wasn’t able to do this
>> before, but I didn’t use the flag —trgsubject or —trgicoorder flags, though
>> I suspect I will run into the same problem trying doing this.  I’m not at my
>> computer now but can try this later this afternoon though.
>> Thanks,
>> Jared
>> 
>>  On Sep 29, 2016, at 12:00 AM, Douglas Greve
>>   wrote:
>> you can actually skip the ico thing and just use --trgsubject
>> fsaverage6
>> On 9/28/16 7:06 PM, Jared P Zimmerman wrote:
>>  Thanks Doug,
>> This does seem like it will do the right thing, but it’s failing
>> because it’s looking for /SUBJECTS_DIR/ico/ and I do not seem to
>> have an ico subject in my subjects_dir
>> Should this normally be in the subjects_dir?  I don’t recall
>> ever seeing this made when I’ve run recon-all in the past.
>> Thanks,
>> Jared
>> Here’s the full terminal output when I run the command:
>> mri_vol2surf --mov /func_test/filtered_func_residuals.nii.gz
>> --reg func_test/coreg/fs_ep2struct_fsl.dat --hemi lh --o
>> func_test/surface/lh_surf_filtered_func_residuals.mgh --projfrac
>> 0.5 --interp trilinear --noreshape --trgsubject ico --icoorder 6
>> --out_type mgh --surf-fwhm 6
>> IcoOrder = 6, nIcoVtxs = 40962
>> srcvol = /func_test/filtered_func_residuals.nii.gz
>> srcreg = func_test/coreg/fs_ep2struct_fsl.dat
>> srcregold = 0
>> srcwarp unspecified
>> surf = white
>> hemi = lh
>> trgsubject = ico
>> surfreg = sphere.reg
>> ProjFrac = 0.5
>> thickness = thickness
>> reshape = 0
>> interp = trilinear
>> float2int = round
>> GetProjMax = 0
>> INFO: float2int code = 0
>> Done loading volume
>> Reading surface /subjdir_test//subID/surf/lh.white
>> Done reading source surface
>> Reading thickness /subjdir_test//subID/surf/lh.thickness
>> Done
>> Mapping Source Volume onto Source Subject Surface
>> 1 0.5 0.5 0.5
>> using old
>> Done mapping volume to surface
>> Number of source voxels hit = 11345
>> Reading source surface registration
>> subjdir_test//subID/surf/lh.sphere.reg
>> Done loading source registration surface
>> Reading icosahedron, order = 6, radius = 100
>>   Reading icosahedron
>> /share/apps/freesurfer/5.3.0/lib/bem/ic6.tri
>> Done loading target registration surface
>> Mapping Surfaces (subID -> ico)
>> surf2surf_nnfr: building source hash (res=16).
>> Surf2Surf: Forward Loop (40962)
>> surf2surf_nnfr: building target hash (res=16).
>> Surf2Surf: Reverse Loop (112745)
>> Reverse Loop had 72236 hits 
>> 
>>  On Sep 28, 2016, at 3:34 PM, Douglas Greve
>>   wrote:
>> You need to specify --trgsubject ico in mri_vol2surf
>> On 9/28/16 3:01 PM, Jared Zimmerman wrote:
>>  Hi All, forwarding this message along again as
>>  I'm still having some trouble getting this to
>>  work.  Basically I would like to 1) project
>>  processed residual time-series from the
>>  subject-space volume to the subject-space
>>  surface, 2) smooth on the surface, 3)
>>  down-sample to FS4 space.
>> 
>>  To do this is have used bbregister to
>>  calculate the registration, then mri_vol2surf
>>  to project to the surface, but I am not sure
>>  the output of mri_vol2surf is what I should be
>>  expecting.  The output file has dimensions
>>  112745 x 1 x 1 x 120 when I'm expecting ~40k
>>  vertices for FS6 space and ~3k vertices for
>>  FS4 space, but changing the --icoor

Re: [Freesurfer] Projecting processed 4D functional data to individual surfaces

2016-09-29 Thread Jared P Zimmerman
Yeah, I think I misunderstood what was happening with the ico registration.  I 
thought it was using the ico to downsample the subject surface, but I see that 
this is an atlas space and I can do w/e calculations I need I this space and 
then register back to subject space after. 

Thanks for the help, I got it to work by doing mri_vol2surf to register to my 
subject surface and then mri_surf2surf to downsample.

-jared

> On Sep 29, 2016, at 12:34 PM, Douglas N Greve  
> wrote:
> 
> I don't understand what you mean. When you use ico (when it used to 
> work), it always went to fsaverage space. Do you want to decimate the 
> native space surfaces?
> 
> 
> On 09/29/2016 10:15 AM, Jared P Zimmerman wrote:
>> I want to project to the native subject surfaces though, not 
>> fsaverage.  If I use —trgsubject subjID would that work with the 
>> —icoorder flag?  Alternatively I guess I could project to fsaverage 
>> and then use mri_surf2surf to move back to the subject surface, but 
>> that seems like a roundabout way to do it and will probably add some 
>> unnecessary interpolation.
>> 
>> Also, I’ve used mri_vol2surf without the —trgsubject or —icoorder 
>> flags and I did successfully get output with 112745 vertices (is this 
>> FS7 space?  I would have expected ~164k vertices, is this with medial 
>> wall masked?) and I could try to resample that with mri_surf2surf.  I 
>> wasn’t able to do this before, but I didn’t use the flag —trgsubject 
>> or —trgicoorder flags, though I suspect I will run into the same 
>> problem trying doing this.  I’m not at my computer now but can try 
>> this later this afternoon though.
>> 
>> Thanks,
>> Jared
>> 
>>> On Sep 29, 2016, at 12:00 AM, Douglas Greve 
>>> mailto:gr...@nmr.mgh.harvard.edu> 
>>> <mailto:gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>>> 
>>> wrote:
>>> 
>>> you can actually skip the ico thing and just use --trgsubject fsaverage6
>>> 
>>> 
>>> On 9/28/16 7:06 PM, Jared P Zimmerman wrote:
>>>> Thanks Doug,
>>>> 
>>>> This does seem like it will do the right thing, but it’s failing 
>>>> because it’s looking for /SUBJECTS_DIR/ico/ and I do not seem to 
>>>> have an ico subject in my subjects_dir
>>>> 
>>>> Should this normally be in the subjects_dir?  I don’t recall ever 
>>>> seeing this made when I’ve run recon-all in the past.
>>>> 
>>>> Thanks,
>>>> Jared
>>>> 
>>>> Here’s the full terminal output when I run the command:
>>>> 
>>>> mri_vol2surf --mov /func_test/filtered_func_residuals.nii.gz --reg 
>>>> func_test/coreg/fs_ep2struct_fsl.dat --hemi lh --o 
>>>> func_test/surface/lh_surf_filtered_func_residuals.mgh --projfrac 0.5 
>>>> --interp trilinear --noreshape --trgsubject ico --icoorder 6 
>>>> --out_type mgh --surf-fwhm 6
>>>> IcoOrder = 6, nIcoVtxs = 40962
>>>> srcvol = /func_test/filtered_func_residuals.nii.gz
>>>> srcreg = func_test/coreg/fs_ep2struct_fsl.dat
>>>> srcregold = 0
>>>> srcwarp unspecified
>>>> surf = white
>>>> hemi = lh
>>>> trgsubject = ico
>>>> surfreg = sphere.reg
>>>> ProjFrac = 0.5
>>>> thickness = thickness
>>>> reshape = 0
>>>> interp = trilinear
>>>> float2int = round
>>>> GetProjMax = 0
>>>> INFO: float2int code = 0
>>>> Done loading volume
>>>> Reading surface /subjdir_test//subID/surf/lh.white
>>>> Done reading source surface
>>>> Reading thickness /subjdir_test//subID/surf/lh.thickness
>>>> Done
>>>> Mapping Source Volume onto Source Subject Surface
>>>> 1 0.5 0.5 0.5
>>>> using old
>>>> Done mapping volume to surface
>>>> Number of source voxels hit = 11345
>>>> Reading source surface registration
>>>> subjdir_test//subID/surf/lh.sphere.reg
>>>> Done loading source registration surface
>>>> Reading icosahedron, order = 6, radius = 100
>>>>  Reading icosahedron /share/apps/freesurfer/5.3.0/lib/bem/ic6.tri
>>>> Done loading target registration surface
>>>> Mapping Surfaces (subID -> ico)
>>>> surf2surf_nnfr: building source hash (res=16).
>>>> Surf2Surf: Forward Loop (40962)
>>>> 
>>>> surf2surf_nnfr: building target hash (res=16).
>>>> Surf2Surf: Reverse Loop (112745)
>>>> Revers

[Freesurfer] error with mris_anatomical_stats OR mris_sample_parc

2017-04-20 Thread Jared P Zimmerman
Hi FS Experts,

I’m having trouble getting anatomical stats from a parcellation I made out of 
scanner-space volume ROIs.  I have taken the following steps to do this.

mri_vol2vol --mov myROI.nii.gz --targ orig.mgz --regheader --o 
myROI_orig.nii.gz --interp nearest
mris_sample_parc Subj111 lh myROI_orig.nii.gz myROIs.annot -ct 
ROI_test_table.txt 
On this step I ALWAYS get an error “could not open translation file 
/share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt” even though I specify 
a CT with -ct, or when I specify a table with -t, or with both
This seems to work though and I can view this annot on the surface with tksurfer
mris_anatomical_stats -a /path/to/myROIs.annot -b Subj111 lh


When I run mris_anatomical_stats I get the following error: 
CTABfindAnnotation: ct was NULL
Segmentation fault (core dumped)

I’m guessing this is from the color-table not being embedded in the annot file, 
but I’ve tried to get that embedded in many ways.  

My questions are:

What is causing the error with mris_anatomical_stats?
What is the difference between the -t and -ct flags for mris_sample_parc and 
which should I use?
Should I use a specific color-table for this?  I made my own which was just a 
space delimited file with “index name r g b a” for all my ROIs, but should I be 
adding this data to some existing color-table to make this work?

Thanks,
Jared___
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] error with mris_anatomical_stats OR mris_sample_parc

2017-04-26 Thread Jared P Zimmerman
Any chance I could get some help on this?  still having this problem

> On Apr 20, 2017, at 6:26 PM, Jared P Zimmerman  
> wrote:
> 
> Hi FS Experts,
> 
> I’m having trouble getting anatomical stats from a parcellation I made out of 
> scanner-space volume ROIs.  I have taken the following steps to do this.
> 
> mri_vol2vol --mov myROI.nii.gz --targ orig.mgz --regheader --o 
> myROI_orig.nii.gz --interp nearest
> mris_sample_parc Subj111 lh myROI_orig.nii.gz myROIs.annot -ct 
> ROI_test_table.txt 
> On this step I ALWAYS get an error “could not open translation file 
> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt” even though I 
> specify a CT with -ct, or when I specify a table with -t, or with both
> This seems to work though and I can view this annot on the surface with 
> tksurfer
> mris_anatomical_stats -a /path/to/myROIs.annot -b Subj111 lh
> 
> 
> When I run mris_anatomical_stats I get the following error: 
> CTABfindAnnotation: ct was NULL
> Segmentation fault (core dumped)
> 
> I’m guessing this is from the color-table not being embedded in the annot 
> file, but I’ve tried to get that embedded in many ways.  
> 
> My questions are:
> 
> What is causing the error with mris_anatomical_stats?
> What is the difference between the -t and -ct flags for mris_sample_parc and 
> which should I use?
> Should I use a specific color-table for this?  I made my own which was just a 
> space delimited file with “index name r g b a” for all my ROIs, but should I 
> be adding this data to some existing color-table to make this work?
> 
> Thanks,
> Jared
> ___
> 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] error with mris_anatomical_stats OR mris_sample_parc

2017-04-28 Thread Jared P Zimmerman
Here’s the script that I’m running and the merged stderr stdout.  I’ve also 
tried various permutations of mris_sample_parc using the -t flag and using 
different LUTs than the one I made.  Also copying the log here incase the text 
files get removed.

Thanks,
jared


./targetAnnotStats.sh: line 21:  4934 Segmentation fault  (core dumped) 
mris_anatomical_stats -a ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot -b 
${sub} lh >> log.txt 2>&1
reading parcellation volume from 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
reading input surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
could not open translation file 
/share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
pass 1: 7 segments changed
pass 2: 0 segments changed
writing annotation to s111_bla_8mm_orig2_annot.annot...
computing statistics for each annotation in 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/label/lh.s111_bla_8mm_orig2_annot.annot.
reading volume /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/wm.mgz...
reading input surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
reading input pial surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.pial...
reading input white surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
CTABfindAnnotation: ct was NULL
./targetAnnotStats.sh: line 21:  5086 Segmentation fault  (core dumped) 
mris_anatomical_stats -a ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot -b 
${sub} lh



./targetAnnotStats.sh: line 21:  4934 Segmentation fault  (core dumped) 
mris_anatomical_stats -a ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot -b 
${sub} lh >> log.txt 2>&1
reading parcellation volume from 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
reading input surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
could not open translation file 
/share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
pass 1: 7 segments changed
pass 2: 0 segments changed
writing annotation to s111_bla_8mm_orig2_annot.annot...
computing statistics for each annotation in 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/label/lh.s111_bla_8mm_orig2_annot.annot.
reading volume /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/wm.mgz...
reading input surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
reading input pial surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.pial...
reading input white surface 
/data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
CTABfindAnnotation: ct was NULL
./targetAnnotStats.sh: line 21:  5086 Segmentation fault  (core dumped) 
mris_anatomical_stats -a ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot -b 
${sub} lh


targetAnnotStats.sh
Description: Binary data



> On Apr 26, 2017, at 3:52 PM, Bruce Fischl  wrote:
> 
> Hi Jared
> 
> can you send us the full command line and screen output?
> 
> cheers
> Bruce
> On Wed, 26 Apr 2017, Jared P Zimmerman wrote:
> 
>> Any chance I could get some help on this?  still having this problem
>> 
>>  On Apr 20, 2017, at 6:26 PM, Jared P Zimmerman
>>   wrote:
>> Hi FS Experts,
>> I’m having trouble getting anatomical stats from a parcellation I made
>> out of scanner-space volume ROIs.  I have taken the following steps to
>> do this.
>> 
>> 1. mri_vol2vol --mov myROI.nii.gz --targ orig.mgz --regheader --o
>>myROI_orig.nii.gz --interp nearest
>> 2. mris_sample_parc Subj111 lh myROI_orig.nii.gz myROIs.annot -ct
>>ROI_test_table.txt 
>> 1. On this step I ALWAYS get an error “could not open translation
>>file /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt”
>>even though I specify a CT with -ct, or when I specify a table
>>with -t, or with both
>> 2. This seems to work though and I can view this annot on the
>>surface with tksurfer
>> 3. mris_anatomical_stats -a /path/to/myROIs.annot -b Subj111 lh
>> When I run mris_anatomical_stats I get the following error: 
>> CTABfindAnnotation: ct was NULL
>> Segmentation fault (core dumped)
>> I’m guessing this is from the color-table not being embedded in the
>> annot file, but I’ve tried to get that embedded in many ways.  
>> My questions are:
>> 
>> 1. What is causing the error with mris_anatomical_stats?
>> 2. What is the difference between the -t and -ct flags for
>>mris_sample_parc and which should I use?
>> 3. Should I use a specific color-table for this?  I made my own which
>>was just a space delimited file with “index name r g b a” for all
>>my ROIs, but should I be adding this data to some existing
>>

Re: [Freesurfer] error with mris_anatomical_stats OR mris_sample_parc

2017-05-04 Thread Jared P Zimmerman
Hey Bruce et al, any update on this?


Thanks,
Jared

> On Apr 28, 2017, at 2:48 PM, Jared P Zimmerman  
> wrote:
> 
> Here’s the script that I’m running and the merged stderr stdout.  I’ve also 
> tried various permutations of mris_sample_parc using the -t flag and using 
> different LUTs than the one I made.  Also copying the log here incase the 
> text files get removed.
> 
> Thanks,
> jared
> 
> 
> ./targetAnnotStats.sh: line 21:  4934 Segmentation fault  (core dumped) 
> mris_anatomical_stats -a ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot 
> -b ${sub} lh >> log.txt 2>&1
> reading parcellation volume from 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
> reading input surface 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
> could not open translation file 
> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
> pass 1: 7 segments changed
> pass 2: 0 segments changed
> writing annotation to s111_bla_8mm_orig2_annot.annot...
> computing statistics for each annotation in 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/label/lh.s111_bla_8mm_orig2_annot.annot.
> reading volume 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/wm.mgz...
> reading input surface 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
> reading input pial surface 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.pial...
> reading input white surface 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
> CTABfindAnnotation: ct was NULL
> ./targetAnnotStats.sh: line 21:  5086 Segmentation fault  (core dumped) 
> mris_anatomical_stats -a ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot 
> -b ${sub} lh
> 
> 
> 
> 
> 
> 
>> On Apr 26, 2017, at 3:52 PM, Bruce Fischl  wrote:
>> 
>> Hi Jared
>> 
>> can you send us the full command line and screen output?
>> 
>> cheers
>> Bruce
>> On Wed, 26 Apr 2017, Jared P Zimmerman wrote:
>> 
>>> Any chance I could get some help on this?  still having this problem
>>> 
>>> On Apr 20, 2017, at 6:26 PM, Jared P Zimmerman
>>>  wrote:
>>> Hi FS Experts,
>>> I’m having trouble getting anatomical stats from a parcellation I made
>>> out of scanner-space volume ROIs.  I have taken the following steps to
>>> do this.
>>> 
>>> 1. mri_vol2vol --mov myROI.nii.gz --targ orig.mgz --regheader --o
>>>   myROI_orig.nii.gz --interp nearest
>>> 2. mris_sample_parc Subj111 lh myROI_orig.nii.gz myROIs.annot -ct
>>>   ROI_test_table.txt 
>>>1. On this step I ALWAYS get an error “could not open translation
>>>   file /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt”
>>>   even though I specify a CT with -ct, or when I specify a table
>>>   with -t, or with both
>>>2. This seems to work though and I can view this annot on the
>>>   surface with tksurfer
>>> 3. mris_anatomical_stats -a /path/to/myROIs.annot -b Subj111 lh
>>> When I run mris_anatomical_stats I get the following error: 
>>> CTABfindAnnotation: ct was NULL
>>> Segmentation fault (core dumped)
>>> I’m guessing this is from the color-table not being embedded in the
>>> annot file, but I’ve tried to get that embedded in many ways.  
>>> My questions are:
>>> 
>>> 1. What is causing the error with mris_anatomical_stats?
>>> 2. What is the difference between the -t and -ct flags for
>>>   mris_sample_parc and which should I use?
>>> 3. Should I use a specific color-table for this?  I made my own which
>>>   was just a space delimited file with “index name r g b a” for all
>>>   my ROIs, but should I be adding this data to some existing
>>>   color-table to make this work?
>>> Thanks,
>>> Jared
>>> ___
>>> 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
>

Re: [Freesurfer] error with mris_anatomical_stats OR mris_sample_parc

2017-05-04 Thread Jared P Zimmerman
That’s what I did below, see the script and log.txt attached to a previous 
email.  This is the output from the mris_sample_parc step

>>>>> reading parcellation volume from 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>>>> reading input surface 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>> could not open translation file 
>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>> pass 1: 7 segments changed
>>>>> pass 2: 0 segments changed
>>>>> writing annotation to s111_bla_8mm_orig2_annot.annot…

Thanks,
Jared



> On May 4, 2017, at 11:36 AM, Bruce Fischl  wrote:
> 
> can you try it with -ct 
> 
> and send us the output if that doesn't work? That's what we use internally
> cheers
> Bruce
> On Thu, 4 May 2017, Jared P Zimmerman wrote:
> 
>> Yeah I see that, but the cma_parcellation_colors.txt isn’t distributed with 
>> FS 5.3, yet it is the default LUT called by mris_sample_parc.  Also, I tried 
>> to use my own color table using the -ct flag but it continues to try to 
>> embed the cma_parcellation_colors.txt regardless of the LUT I put there.
>> 
>> Also, mris_sample_parc seems to work.  I can visualize the parcellation that 
>> comes out of that fine, however it’s clear there’s no LUT embedded because 
>> the label names are wrong (see attached image).
>> 
>> I don’t care too much if the LUT is embedded properly, I just want to use 
>> the parcellation to get anatomical data about my regions, but 
>> mris_anatomical_stats seems to fail because the LUT isn’t embedded.  I’m 
>> still confused about why the -ct flag in mris_sample_parc doesn’t seem to 
>> work.
>> 
>> 
>> Thanks,
>> Jared
>> 
>> 
>> 
>> 
>>> On May 4, 2017, at 10:58 AM, Bruce Fischl  
>>> wrote:
>>> 
>>> Hi Jared
>>> 
>>> it looks like it couldn't find the lookup tbale:
>>> 
>>>> reading input surface
>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>> could not open translation file
>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>> 
>>> 
>>> cheers
>>> Bruce
>>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>>> 
>>>> Hey Bruce et al, any update on this?
>>>> 
>>>> 
>>>> Thanks,
>>>> Jared
>>>> 
>>>>> On Apr 28, 2017, at 2:48 PM, Jared P Zimmerman 
>>>>>  wrote:
>>>>> 
>>>>> Here’s the script that I’m running and the merged stderr stdout.  I’ve 
>>>>> also tried various permutations of mris_sample_parc using the -t flag and 
>>>>> using different LUTs than the one I made.  Also copying the log here 
>>>>> incase the text files get removed.
>>>>> 
>>>>> Thanks,
>>>>> jared
>>>>> 
>>>>> 
>>>>> ./targetAnnotStats.sh: line 21:  4934 Segmentation fault  (core 
>>>>> dumped) mris_anatomical_stats -a 
>>>>> ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot -b ${sub} lh >> 
>>>>> log.txt 2>&1
>>>>> reading parcellation volume from 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>>>> reading input surface 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>> could not open translation file 
>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>> pass 1: 7 segments changed
>>>>> pass 2: 0 segments changed
>>>>> writing annotation to s111_bla_8mm_orig2_annot.annot...
>>>>> computing statistics for each annotation in 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/label/lh.s111_bla_8mm_orig2_annot.annot.
>>>>> reading volume 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/wm.mgz...
>>>>> reading input surface 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>> reading input pial surface 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.pial...
>>>>> reading input white surface 
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>> CTABfindAnnotation: ct was NULL
&g

Re: [Freesurfer] error with mris_anatomical_stats OR mris_sample_parc

2017-05-04 Thread Jared P Zimmerman
fwiw, this problem persists in FS6.0

-jared


> On May 4, 2017, at 12:11 PM, Jared P Zimmerman  
> wrote:
> 
> That’s what I did below, see the script and log.txt attached to a previous 
> email.  This is the output from the mris_sample_parc step
> 
>>>>>> reading parcellation volume from 
>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>>>>> reading input surface 
>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>>> could not open translation file 
>>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>>> pass 1: 7 segments changed
>>>>>> pass 2: 0 segments changed
>>>>>> writing annotation to s111_bla_8mm_orig2_annot.annot…
> 
> Thanks,
> Jared
> 
> 
> 
>> On May 4, 2017, at 11:36 AM, Bruce Fischl  wrote:
>> 
>> can you try it with -ct 
>> 
>> and send us the output if that doesn't work? That's what we use internally
>> cheers
>> Bruce
>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>> 
>>> Yeah I see that, but the cma_parcellation_colors.txt isn’t distributed with 
>>> FS 5.3, yet it is the default LUT called by mris_sample_parc.  Also, I 
>>> tried to use my own color table using the -ct flag but it continues to try 
>>> to embed the cma_parcellation_colors.txt regardless of the LUT I put there.
>>> 
>>> Also, mris_sample_parc seems to work.  I can visualize the parcellation 
>>> that comes out of that fine, however it’s clear there’s no LUT embedded 
>>> because the label names are wrong (see attached image).
>>> 
>>> I don’t care too much if the LUT is embedded properly, I just want to use 
>>> the parcellation to get anatomical data about my regions, but 
>>> mris_anatomical_stats seems to fail because the LUT isn’t embedded.  I’m 
>>> still confused about why the -ct flag in mris_sample_parc doesn’t seem to 
>>> work.
>>> 
>>> 
>>> Thanks,
>>> Jared
>>> 
>>> 
>>> 
>>> 
>>>> On May 4, 2017, at 10:58 AM, Bruce Fischl  
>>>> wrote:
>>>> 
>>>> Hi Jared
>>>> 
>>>> it looks like it couldn't find the lookup tbale:
>>>> 
>>>>> reading input surface
>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>> could not open translation file
>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>> 
>>>> 
>>>> cheers
>>>> Bruce
>>>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>>>> 
>>>>> Hey Bruce et al, any update on this?
>>>>> 
>>>>> 
>>>>> Thanks,
>>>>> Jared
>>>>> 
>>>>>> On Apr 28, 2017, at 2:48 PM, Jared P Zimmerman 
>>>>>>  wrote:
>>>>>> 
>>>>>> Here’s the script that I’m running and the merged stderr stdout.  I’ve 
>>>>>> also tried various permutations of mris_sample_parc using the -t flag 
>>>>>> and using different LUTs than the one I made.  Also copying the log here 
>>>>>> incase the text files get removed.
>>>>>> 
>>>>>> Thanks,
>>>>>> jared
>>>>>> 
>>>>>> 
>>>>>> ./targetAnnotStats.sh: line 21:  4934 Segmentation fault  (core 
>>>>>> dumped) mris_anatomical_stats -a 
>>>>>> ${SUBJECTS_DIR}/${sub}/label/lh.${targ}_annot.annot -b ${sub} lh >> 
>>>>>> log.txt 2>&1
>>>>>> reading parcellation volume from 
>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>>>>> reading input surface 
>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>>> could not open translation file 
>>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>>> pass 1: 7 segments changed
>>>>>> pass 2: 0 segments changed
>>>>>> writing annotation to s111_bla_8mm_orig2_annot.annot...
>>>>>> computing statistics for each annotation in 
>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/label/lh.s111_bla_8mm_orig2_annot.annot.
>>>>>> reading volume 
>>>>>&g

Re: [Freesurfer] error with mris_anatomical_stats OR mris_sample_parc

2017-05-04 Thread Jared P Zimmerman
mris_sample_parc ${sub} \
lh ${targ}.nii.gz \
${targ}_fs6_annot.annot \
-ct ${SUBJECTS_DIR}/${sub}/bla_test_table.txt


This is the call from my script, which didn’t get written to stdout.  The 
bla_test_table.txt exists, and is just a space delimited file with “index name 
r g b a” for each label.  I’ve also tried pointing the -ct flag to a LUT that 
exists in $FREESURFER_HOME and is distributed with FS, e.g. ASegStatsLUT.txt or 
FreeSurferColorLUT.txt with no success, i.e. below.

> mris_sample_parc Subj111 lh s111_bla_8mm_orig2.nii.gz 
> s111_bla_8mm_orig2_v2_annot.annot -ct AsegStatsLUT.txt
> reading parcellation volume from 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
> reading input surface 
> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
> pass 1: 7 segments changed
> pass 2: 0 segments changed
> could not open translation file 
> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
> writing annotation to s111_bla_8mm_orig2_v2_annot.annot…

Thanks,
Jared


> On May 4, 2017, at 12:15 PM, Bruce Fischl  wrote:
> 
> sorry, I don't see the mris_sample_parc command line. Can you just send it 
> and the entire screen output?
> On Thu, 4 May 2017, Jared P Zimmerman wrote:
> 
>> That’s what I did below, see the script and log.txt attached to a previous 
>> email.  This is the output from the mris_sample_parc step
>> 
>>>>>>> reading parcellation volume from 
>>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>>>>>> reading input surface 
>>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>>>> could not open translation file 
>>>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>>>> pass 1: 7 segments changed
>>>>>>> pass 2: 0 segments changed
>>>>>>> writing annotation to s111_bla_8mm_orig2_annot.annot…
>> 
>> Thanks,
>> Jared
>> 
>> 
>> 
>>> On May 4, 2017, at 11:36 AM, Bruce Fischl  
>>> wrote:
>>> 
>>> can you try it with -ct 
>>> 
>>> and send us the output if that doesn't work? That's what we use internally
>>> cheers
>>> Bruce
>>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>>> 
>>>> Yeah I see that, but the cma_parcellation_colors.txt isn’t distributed 
>>>> with FS 5.3, yet it is the default LUT called by mris_sample_parc.  Also, 
>>>> I tried to use my own color table using the -ct flag but it continues to 
>>>> try to embed the cma_parcellation_colors.txt regardless of the LUT I put 
>>>> there.
>>>> 
>>>> Also, mris_sample_parc seems to work.  I can visualize the parcellation 
>>>> that comes out of that fine, however it’s clear there’s no LUT embedded 
>>>> because the label names are wrong (see attached image).
>>>> 
>>>> I don’t care too much if the LUT is embedded properly, I just want to use 
>>>> the parcellation to get anatomical data about my regions, but 
>>>> mris_anatomical_stats seems to fail because the LUT isn’t embedded.  I’m 
>>>> still confused about why the -ct flag in mris_sample_parc doesn’t seem to 
>>>> work.
>>>> 
>>>> 
>>>> Thanks,
>>>> Jared
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On May 4, 2017, at 10:58 AM, Bruce Fischl  
>>>>> wrote:
>>>>> 
>>>>> Hi Jared
>>>>> 
>>>>> it looks like it couldn't find the lookup tbale:
>>>>> 
>>>>>> reading input surface
>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>>> could not open translation file
>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>> 
>>>>> 
>>>>> cheers
>>>>> Bruce
>>>>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>>>>> 
>>>>>> Hey Bruce et al, any update on this?
>>>>>> 
>>>>>> 
>>>>>> Thanks,
>>>>>> Jared
>>>>>> 
>>>>>>> On Apr 28, 2017, at 2:48 PM, Jared P Zimmerman 
>>>>>>>  wrote:
>>>>>>> 
>>>>>>> Here’s the script that I’m running and the merged stderr stdout.  I’ve 
>>>>>

Re: [Freesurfer] error with mris_anatomical_stats OR mris_sample_parc

2017-05-04 Thread Jared P Zimmerman
Thanks Bruce, this did it.

-jared


> On May 4, 2017, at 12:33 PM, Bruce Fischl  wrote:
> 
> I see. This is the problem - mris_sample_parc is one of the binaries that 
> requires all options come before the mandatory arguments. Move the -ct  
> part to the beginning and it should work
> 
> cheers
> Bruce
> On Thu, 4 May 2017, Jared P Zimmerman wrote:
> 
>> mris_sample_parc ${sub} \
>>  lh ${targ}.nii.gz \
>>  ${targ}_fs6_annot.annot \
>>  -ct ${SUBJECTS_DIR}/${sub}/bla_test_table.txt
>> 
>> 
>> This is the call from my script, which didn’t get written to stdout.  The 
>> bla_test_table.txt exists, and is just a space delimited file with “index 
>> name r g b a” for each label.  I’ve also tried pointing the -ct flag to a 
>> LUT that exists in $FREESURFER_HOME and is distributed with FS, e.g. 
>> ASegStatsLUT.txt or FreeSurferColorLUT.txt with no success, i.e. below.
>> 
>>> mris_sample_parc Subj111 lh s111_bla_8mm_orig2.nii.gz 
>>> s111_bla_8mm_orig2_v2_annot.annot -ct AsegStatsLUT.txt
>>> reading parcellation volume from 
>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>> reading input surface 
>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>> pass 1: 7 segments changed
>>> pass 2: 0 segments changed
>>> could not open translation file 
>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>> writing annotation to s111_bla_8mm_orig2_v2_annot.annot…
>> 
>> Thanks,
>> Jared
>> 
>> 
>>> On May 4, 2017, at 12:15 PM, Bruce Fischl  
>>> wrote:
>>> 
>>> sorry, I don't see the mris_sample_parc command line. Can you just send it 
>>> and the entire screen output?
>>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>>> 
>>>> That’s what I did below, see the script and log.txt attached to a previous 
>>>> email.  This is the output from the mris_sample_parc step
>>>> 
>>>>>>>>> reading parcellation volume from 
>>>>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/mri/s111_bla_8mm_orig2.nii.gz...
>>>>>>>>> reading input surface 
>>>>>>>>> /data/jag/cnds/seda/TMSfMRI_T1s/freesurfer/Subj111/surf/lh.white...
>>>>>>>>> could not open translation file 
>>>>>>>>> /share/apps/freesurfer/5.3.0/cma_parcellation_colors.txt
>>>>>>>>> pass 1: 7 segments changed
>>>>>>>>> pass 2: 0 segments changed
>>>>>>>>> writing annotation to s111_bla_8mm_orig2_annot.annot…
>>>> 
>>>> Thanks,
>>>> Jared
>>>> 
>>>> 
>>>> 
>>>>> On May 4, 2017, at 11:36 AM, Bruce Fischl  
>>>>> wrote:
>>>>> 
>>>>> can you try it with -ct 
>>>>> 
>>>>> and send us the output if that doesn't work? That's what we use internally
>>>>> cheers
>>>>> Bruce
>>>>> On Thu, 4 May 2017, Jared P Zimmerman wrote:
>>>>> 
>>>>>> Yeah I see that, but the cma_parcellation_colors.txt isn’t distributed 
>>>>>> with FS 5.3, yet it is the default LUT called by mris_sample_parc.  
>>>>>> Also, I tried to use my own color table using the -ct flag but it 
>>>>>> continues to try to embed the cma_parcellation_colors.txt regardless of 
>>>>>> the LUT I put there.
>>>>>> 
>>>>>> Also, mris_sample_parc seems to work.  I can visualize the parcellation 
>>>>>> that comes out of that fine, however it’s clear there’s no LUT embedded 
>>>>>> because the label names are wrong (see attached image).
>>>>>> 
>>>>>> I don’t care too much if the LUT is embedded properly, I just want to 
>>>>>> use the parcellation to get anatomical data about my regions, but 
>>>>>> mris_anatomical_stats seems to fail because the LUT isn’t embedded.  I’m 
>>>>>> still confused about why the -ct flag in mris_sample_parc doesn’t seem 
>>>>>> to work.
>>>>>> 
>>>>>> 
>>>>>> Thanks,
>>>>>> Jared
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On May 4, 2017, at 10:58 AM, Bruce Fischl  
>>>&g