Re: [Freesurfer] Warping an ROI from one subject to another

2016-10-13 Thread Joel Bruss
Doug-

Any further thoughts on this?


On 10/05/2016 04:47 PM, Joel Bruss wrote:
> Doug-
>
> I'm sooo close but something isn't right.  I've run:
>
> 1)mri_vol2sur to sampel the ROI in subA surface space
>
> 2) mri_cor2label to convert it to a label
>
> 3) mri_label2lable to push it to subB
>
> 4) mri_label2vol to get back to a a volume
>
> Steps 1-3 look great.  The output of step 4, loaded on subB inflated
> surface looks cut off.  I suspect this is because it's actually down in
> volume space now?  If I load the ROI over the wmparc file for subB, it
> fits, it's just that I only have a strip of voxels on the WM surface
> only.  I chose  the wmparc.mgz file for subB for both "--temp" and
> ''--regheader."  The result is the same if specify "--surf pial" or
> choose nothing, it's also the same if I chose orig.mgz or brainmask.mgz
> for the temp/header options.  How do I get the ROI to "fill in" like it
> is in subA, originally?
>
> I've attached a composite of the steps I've run.  I really hate to keep
> pestering the listserv with this.  My apologies.
>
> -Joel
>
> On 10/04/2016 03:03 PM, Douglas N Greve wrote:
>> mri_label2vol will transfer it into the volume, no need for surf2vol
>>
>> On 10/04/2016 03:54 PM, Joel Bruss wrote:
>>> Doug (Bruce and Trisanna)-
>>>
>>> Thank you all for your help.  I do, indeed, have a volume, then label,
>>> and see now how to load and view this properly.  I've gotten through
>>> the
>>> "label2label" step and now have a label (from subA)  in subB space.  If
>>> I now want to back-project this label to subB's input MRI volume, would
>>> I run the following?
>>>
>>> (Assuming I invert the steps I did to get the original binary mask to
>>> subA's surface, as a label)
>>>
>>> mri_label2vol --label $SUBJECTS_DIR/subA/tmpdir/rh.roi_to_subB.label \
>>> --subject subB \
>>> --temp brainmask.mgz \
>>> --regheader brainmask.mgz \
>>> --o $SUBJECTS_DIR/subA/tmpdir/roi_to_subB.mgz \
>>> --surf pial
>>>
>>> mri_surf2vol --surfval $SUBJECTS_DIR/subA/tmpdir/roi_to_subB.mgz \
>>> --volregidentity subB --template $SUBJECTS_DIR/subB/mri/orig.mgz
>>> --hemi rh \
>>> --o $SUBJECTS_DIR/subA/tmpdir/roi_to_subB_orig.mgz
>>>
>>>
>>> "label2vol" works but I'm now stuck on the "surf2vol" command.  I
>>> end up
>>> with the following error:
>>>
>>> ERROR: dimension inconsistency in source data
>>>   Number of surface vertices = 128997
>>>  Number of value vertices = 16777216
>>>
>>> -Joel
>>>
>>>
>>>
>>>
>>>
>>> On 10/04/2016 02:45 PM, Douglas N Greve wrote:
>>>> The rh.roiS.mgh file is a surface overlay (ie, one value per vertex),
>>>> not a surface itself (which would have a list of vertices, the XYZ for
>>>> each, and neighborhood relations). When you loaded rh.roiS.mgh as a
>>>> surface overlay, did you change the threshold to be 0.5? The
>>>> default is
>>>> 2, and if your ROI is binary (0,1), then no voxels would ever appear
>>>> above threshold
>>>>
>>>>
>>>> On 10/03/2016 03:20 PM, Joel Bruss wrote:
>>>>> Sorry, it sent before I finished. I'll try this again.
>>>>>
>>>>> On 09/30/2016 02:00 PM, Douglas N Greve wrote:
>>>>>> First, bring up the ROI on the volume along with the surface in the
>>>>>> volume. You can do this with FreeView. Make sure that the ROI
>>>>>> intersects
>>>>>> the surface.
>>>>> Yes, this looks fine
>>>>>> Then run mri_vol2surf so sample the binary ROI volume onto
>>>>>> the surface.
>>>>> This is what I ran:
>>>>>
>>>>> mri_vol2surf  --src $SUBJECTS_DIR/subA/tmpdir/roi.mgz \
>>>>> --out $SUBJECTS_DIR/subA/tmpdir/rh.roiS.mgh \
>>>>>
>>>>>> You can view the ROI on the surface by loading it as an
>>>>>> overlay.
>>>>> This is a volume or a surface now? Is it just a volume resampled
>>>>> to the
>>>>>
>>>>> surface space?  I can't get it to load in freeview as a surface
>>>>> (it just
>>>>> crashes), and it doesn't look like anything as an overlay.
>>>>>
>>>>>
>>>

Re: [Freesurfer] Warping an ROI from one subject to another

2016-10-04 Thread Joel Bruss
Doug (Bruce and Trisanna)-

Thank you all for your help.  I do, indeed, have a volume, then label,
and see now how to load and view this properly.  I've gotten through the
"label2label" step and now have a label (from subA)  in subB space.  If
I now want to back-project this label to subB's input MRI volume, would
I run the following?

(Assuming I invert the steps I did to get the original binary mask to
subA's surface, as a label)

mri_label2vol --label $SUBJECTS_DIR/subA/tmpdir/rh.roi_to_subB.label \
--subject subB \
--temp brainmask.mgz \
--regheader brainmask.mgz \
--o $SUBJECTS_DIR/subA/tmpdir/roi_to_subB.mgz \
--surf pial

mri_surf2vol --surfval $SUBJECTS_DIR/subA/tmpdir/roi_to_subB.mgz \
--volregidentity subB --template $SUBJECTS_DIR/subB/mri/orig.mgz --hemi rh \
--o $SUBJECTS_DIR/subA/tmpdir/roi_to_subB_orig.mgz


"label2vol" works but I'm now stuck on the "surf2vol" command.  I end up
with the following error:

ERROR: dimension inconsistency in source data
Number of surface vertices = 128997
   Number of value vertices = 16777216

-Joel





On 10/04/2016 02:45 PM, Douglas N Greve wrote:
> The rh.roiS.mgh file is a surface overlay (ie, one value per vertex),
> not a surface itself (which would have a list of vertices, the XYZ for
> each, and neighborhood relations). When you loaded rh.roiS.mgh as a
> surface overlay, did you change the threshold to be 0.5? The default is
> 2, and if your ROI is binary (0,1), then no voxels would ever appear
> above threshold
>
>
> On 10/03/2016 03:20 PM, Joel Bruss wrote:
>> Sorry, it sent before I finished.  I'll try this again.
>>
>> On 09/30/2016 02:00 PM, Douglas N Greve wrote:
>>> First, bring up the ROI on the volume along with the surface in the
>>> volume. You can do this with FreeView. Make sure that the ROI intersects
>>> the surface.
>> Yes, this looks fine
>>> Then run mri_vol2surf so sample the binary ROI volume onto
>>> the surface.
>> This is what I ran:
>>
>> mri_vol2surf  --src $SUBJECTS_DIR/subA/tmpdir/roi.mgz \
>> --out $SUBJECTS_DIR/subA/tmpdir/rh.roiS.mgh \
>>
>>> You can view the ROI on the surface by loading it as an
>>> overlay.
>> This is a volume or a surface now? Is it just a volume resampled to the
>>
>> surface space?  I can't get it to load in freeview as a surface (it just
>> crashes), and it doesn't look like anything as an overlay.
>>
>>
>>> Then run mri_cor2label using the surface-sampled ROI as input
>>> and specifying --surf (see the --help) to make this a surface-based
>>> label.
>> I next ran this:
>> mri_cor2label --id 1 --c $SUBJECTS_DIR \
>> --i $SUBJECTS_DIR/subA/tmpdir/rh.roiS.mgh \
>> --l $SUBJECTS_DIR/subA/tmpdir/rh.roi.label \
>> --surf subA rh
>>> You can also view this label in the surface in freeview.
>> At this point, it just kept loading and loading and loading and I'd
>> finally have to kill the process.  I never could visualize this output.
>>> Finally,
>>> run mri_label2label using the --regmethod surface
>> At this point, I must just be feeding bad data into good commands:
>> mri_label2vol --label $SUBJECTS_DIR/subA/tmpdir/rh.roi_to_subB.label \
>> --subject subB \
>> --temp brainmask.mgz \
>> --regheader brainmask.mgz \
>> --o $SUBJECTS_DIR/subA/tmpdir/roi_to_subB.mgz \
>> --surf pial
>>
>> I don't know where things went wrong or how to view the output to diagnose.
>>
>>
>>
>> 
>> Notice: This UI Health Care e-mail (including attachments) is covered by the 
>> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended 
>> only for the use of the individual or entity to which it is addressed, and 
>> may contain information that is privileged, confidential, and exempt from 
>> disclosure under applicable law. If you are not the intended recipient, any 
>> dissemination, distribution or copying of this communication is strictly 
>> prohibited. If you have received this communication in error, please notify 
>> the sender immediately and delete or destroy all copies of the original 
>> message and attachments thereto. Email sent to or from UI Health Care may be 
>> retained as required by law or regulation. Thank you.
>> 
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communi

Re: [Freesurfer] Warping an ROI from one subject to another

2016-10-04 Thread Joel Bruss
.mgz format made no difference.  I see no option for "overlay" in
freeview., I only get that option with tksurfer.  The image is blank
when loaded as a volume in freeview.  It loads forever when I try to
load it as a surface (I just get the 0-100% progress bar conintually
loading with no end).  If I try to load the rh.pial as a surface, then
load the file as a volume overlay, it crashes freeview.


A few days back, Anna Crawford had a thread entitled "Volume to Surface"
where she provided a pic of the inflated surface and the output of
wmparc on the surface.  If I try to run the exact same commands she did,
I can't get any pics in freeview and it just crashes on me.  FWIW, I'm
running freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.


On 10/03/2016 04:08 PM, Trisanna Sprung-Much wrote:
> I think it might have to do with the format of your output file -
> perhaps try .mgz? This is what I used.
>
> Then open the surface and use the "overlay" option to overlay your ROI
> as a surface overlay.




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.


___
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] Warping an ROI from one subject to another

2016-10-03 Thread Joel Bruss

Sorry, it sent before I finished.  I'll try this again.

On 09/30/2016 02:00 PM, Douglas N Greve wrote:
> First, bring up the ROI on the volume along with the surface in the
> volume. You can do this with FreeView. Make sure that the ROI intersects
> the surface.
Yes, this looks fine
> Then run mri_vol2surf so sample the binary ROI volume onto
> the surface.
This is what I ran:

mri_vol2surf  --src $SUBJECTS_DIR/subA/tmpdir/roi.mgz \
--out $SUBJECTS_DIR/subA/tmpdir/rh.roiS.mgh \

> You can view the ROI on the surface by loading it as an
> overlay.
This is a volume or a surface now? Is it just a volume resampled to the

surface space?  I can't get it to load in freeview as a surface (it just
crashes), and it doesn't look like anything as an overlay.


> Then run mri_cor2label using the surface-sampled ROI as input
> and specifying --surf (see the --help) to make this a surface-based
> label.
I next ran this:
mri_cor2label --id 1 --c $SUBJECTS_DIR \
--i $SUBJECTS_DIR/subA/tmpdir/rh.roiS.mgh \
--l $SUBJECTS_DIR/subA/tmpdir/rh.roi.label \
--surf subA rh
> You can also view this label in the surface in freeview.
At this point, it just kept loading and loading and loading and I'd
finally have to kill the process.  I never could visualize this output.
>   Finally,
> run mri_label2label using the --regmethod surface
At this point, I must just be feeding bad data into good commands:
mri_label2vol --label $SUBJECTS_DIR/subA/tmpdir/rh.roi_to_subB.label \
--subject subB \
--temp brainmask.mgz \
--regheader brainmask.mgz \
--o $SUBJECTS_DIR/subA/tmpdir/roi_to_subB.mgz \
--surf pial

I don't know where things went wrong or how to view the output to diagnose.




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.


___
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] Warping an ROI from one subject to another

2016-10-03 Thread Joel Bruss
Doug-

I'm really sorry to keep pestering you about this but I just can't seem
to get this to work.  See my replies below:


On 09/30/2016 02:00 PM, Douglas N Greve wrote:
> First, bring up the ROI on the volume along with the surface in the
> volume. You can do this with FreeView. Make sure that the ROI intersects
> the surface.
Yes, this looks fine
>   Then run mri_vol2surf so sample the binary ROI volume onto
> the surface.
This is what I ran:
mri_vol2surf  --src $SUBJECTS_DIR/subA/tmpdir/roi.mgz \
--out $SUBJECTS_DIR/subA/tmpdir/rh.roiS.mgh \
--regheader subA --hemi rh --surf pial
>   You can view the ROI on the surface by loading it as an
> overlay.
This is a volume or a surface now?  Is it just a volume resampled to the
surface space?  I can't get it to load in freeview as a surface (it just
crashes), and it doesn't look like anything as an overlay.
> Then run mri_cor2label using the surface-sampled ROI as input
> and specifying --surf (see the --help) to make this a surface-based
> label. You can also view this label in the surface in freeview. Finally,
> run mri_label2label using the --regmethod surface




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.


___
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] Warping an ROI from one subject to another

2016-09-30 Thread Joel Bruss
Thanks a lot.  I'll try this out.


On 09/30/2016 02:00 PM, Douglas N Greve wrote:
> First, bring up the ROI on the volume along with the surface in the
> volume. You can do this with FreeView. Make sure that the ROI intersects
> the surface. Then run mri_vol2surf so sample the binary ROI volume onto
> the surface. You can view the ROI on the surface by loading it as an
> overlay. Then run mri_cor2label using the surface-sampled ROI as input
> and specifying --surf (see the --help) to make this a surface-based
> label. You can also view this label in the surface in freeview. Finally,
> run mri_label2label using the --regmethod surface
>
>
> On 09/29/2016 01:58 PM, Joel Bruss wrote:
>> Ah, I see.  The ROI will be subject-dependent (I want to do this for
>> multiple subjects) but the majority, if not all, should be cortical.
>> Any help you'd be willing to provide would be much appreciated.
>>
>>
>> On 09/29/2016 11:31 AM, Douglas N Greve wrote:
>>> The way you have it configured now, this is a volume-based ROI, so you
>>> need to use the volume-based reg method. This will map between the two
>>> subjects using the affine (12 dof) talairach registration which will not
>>> be as accurate as the surface-based registration. If this is a cortical
>>> ROI, I can show you how to redo this using a surface-based label.
>>>
>>>
>>> On 09/29/2016 11:37 AM, Joel Bruss wrote:
>>>> Another bump.
>>>>
>>>> On 09/21/2016 04:18 PM, Joel Bruss wrote:
>>>>
>>>>> I have two subjects, subA and subB.  subA has a binary ROI mask, native
>>>>> space, that I'd like to place in subB's native space. Both subjects have
>>>>> been run through all stages of recon, edited, etc. Is there a better or
>>>>> easier way to achieve this than what I've run?:
>>>>>
>>>>>
>>>>> #Resample the native space binary ROI file into "brainmask" space
>>>>> mri_convert -rl /subA/mri/brainmask.mgz -rt nearest --no_scale 1
>>>>> ROI.nii.gz /subA/mri/ROI.mgz
>>>>>
>>>>> #Convert ROI file into a label
>>>>> mri_cor2label --id 1 --c /subA/mri --i ROI.mgz --l ROI.label
>>>>>
>>>>> #Move label from subA to subB
>>>>> mri_label2label --srcsubject subA --srclabel /subA/mri/ROI.label
>>>>> --trgsubject subB --trglabel /subB/mri/ROI_to_subB.label --regmethod 
>>>>> volume
>>>>>
>>>>> #Convert warped ROI label to a volume
>>>>> mri_label2vol --label /subB/mri/ROI_to_subB.label \
>>>>> --subject subB \
>>>>> --temp brainmask.mgz \
>>>>> --regheader brainmask.mgz \
>>>>> --o /subB/mri/ROI_to_subB.mgz
>>>>>
>>>>> #Convert the volume back to native subB space
>>>>> mri_convert -rl subB_native.nii.gz -rt nearest --no_scale 1
>>>>> /subB/mri/ROI_to_subB.mgz ROI_to_subB_native.nii.gz
>>>>>
>>>>> A few follow-up questions:
>>>>>
>>>>> 1) When running mri_label2label, is better to use surface or volume for
>>>>> the "regmethod"?  Which method will give me a better fit for my output?
>>>>> 2) The output I'm getting looks striped (there are holes in the binary
>>>>> mask) and doesn't quite fit the anatomy (the final file is shifted up
>>>>> and away from where I would expect it to be although in the general
>>>>> vicinity of what I would expect).  It's almost as if I've chosen a wrong
>>>>> target or file along the way.  I don't expect the fit to be perfect, but
>>>>> did I do something wrong?
>>>>>
>>>>> Thanks in advance to any and all replies.
>>>>>
>>>>>
>>>>>
>>>>> 
>>>>> Notice: This UI Health Care e-mail (including attachments) is covered by 
>>>>> the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is 
>>>>> intended only for the use of the individual or entity to which it is 
>>>>> addressed, and may contain information that is privileged, confidential, 
>>>>> and exempt from disclosure under applicable law. If you are not the 
>>>>> intended recipient, any dissemination, distribution or copying of this 
>>>>> communication is strictly prohibited. If you have received this 
>>>>> communication in error, please notify the sender immediate

Re: [Freesurfer] Warping an ROI from one subject to another

2016-09-29 Thread Joel Bruss
Ah, I see.  The ROI will be subject-dependent (I want to do this for
multiple subjects) but the majority, if not all, should be cortical.
Any help you'd be willing to provide would be much appreciated.


On 09/29/2016 11:31 AM, Douglas N Greve wrote:
> The way you have it configured now, this is a volume-based ROI, so you
> need to use the volume-based reg method. This will map between the two
> subjects using the affine (12 dof) talairach registration which will not
> be as accurate as the surface-based registration. If this is a cortical
> ROI, I can show you how to redo this using a surface-based label.
>
>
> On 09/29/2016 11:37 AM, Joel Bruss wrote:
>> Another bump.
>>
>> On 09/21/2016 04:18 PM, Joel Bruss wrote:
>>
>>> I have two subjects, subA and subB.  subA has a binary ROI mask, native
>>> space, that I'd like to place in subB's native space. Both subjects have
>>> been run through all stages of recon, edited, etc. Is there a better or
>>> easier way to achieve this than what I've run?:
>>>
>>>
>>> #Resample the native space binary ROI file into "brainmask" space
>>> mri_convert -rl /subA/mri/brainmask.mgz -rt nearest --no_scale 1
>>> ROI.nii.gz /subA/mri/ROI.mgz
>>>
>>> #Convert ROI file into a label
>>> mri_cor2label --id 1 --c /subA/mri --i ROI.mgz --l ROI.label
>>>
>>> #Move label from subA to subB
>>> mri_label2label --srcsubject subA --srclabel /subA/mri/ROI.label
>>> --trgsubject subB --trglabel /subB/mri/ROI_to_subB.label --regmethod volume
>>>
>>> #Convert warped ROI label to a volume
>>> mri_label2vol --label /subB/mri/ROI_to_subB.label \
>>> --subject subB \
>>> --temp brainmask.mgz \
>>> --regheader brainmask.mgz \
>>> --o /subB/mri/ROI_to_subB.mgz
>>>
>>> #Convert the volume back to native subB space
>>> mri_convert -rl subB_native.nii.gz -rt nearest --no_scale 1
>>> /subB/mri/ROI_to_subB.mgz ROI_to_subB_native.nii.gz
>>>
>>> A few follow-up questions:
>>>
>>> 1) When running mri_label2label, is better to use surface or volume for
>>> the "regmethod"?  Which method will give me a better fit for my output?
>>> 2) The output I'm getting looks striped (there are holes in the binary
>>> mask) and doesn't quite fit the anatomy (the final file is shifted up
>>> and away from where I would expect it to be although in the general
>>> vicinity of what I would expect).  It's almost as if I've chosen a wrong
>>> target or file along the way.  I don't expect the fit to be perfect, but
>>> did I do something wrong?
>>>
>>> Thanks in advance to any and all replies.
>>>
>>>
>>>
>>> 
>>> Notice: This UI Health Care e-mail (including attachments) is covered by 
>>> the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is 
>>> intended only for the use of the individual or entity to which it is 
>>> addressed, and may contain information that is privileged, confidential, 
>>> and exempt from disclosure under applicable law. If you are not the 
>>> intended recipient, any dissemination, distribution or copying of this 
>>> communication is strictly prohibited. If you have received this 
>>> communication in error, please notify the sender immediately and delete or 
>>> destroy all copies of the original message and attachments thereto. Email 
>>> sent to or from UI Health Care may be retained as required by law or 
>>> regulation. Thank you.
>>> 
>>>
>>> ___
>>> 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.
>>>
>>
>> 
>> Notice: This UI Health Care e-mail (including attachments) is covered by the 
>> Electronic Communications Privacy Act, 18 U.S.C. 2510-25

Re: [Freesurfer] Warping an ROI from one subject to another

2016-09-29 Thread Joel Bruss
Another bump.

On 09/21/2016 04:18 PM, Joel Bruss wrote:

> I have two subjects, subA and subB.  subA has a binary ROI mask, native
> space, that I'd like to place in subB's native space. Both subjects have
> been run through all stages of recon, edited, etc. Is there a better or
> easier way to achieve this than what I've run?:
>
>
> #Resample the native space binary ROI file into "brainmask" space
> mri_convert -rl /subA/mri/brainmask.mgz -rt nearest --no_scale 1
> ROI.nii.gz /subA/mri/ROI.mgz
>
> #Convert ROI file into a label
> mri_cor2label --id 1 --c /subA/mri --i ROI.mgz --l ROI.label
>
> #Move label from subA to subB
> mri_label2label --srcsubject subA --srclabel /subA/mri/ROI.label
> --trgsubject subB --trglabel /subB/mri/ROI_to_subB.label --regmethod volume
>
> #Convert warped ROI label to a volume
> mri_label2vol --label /subB/mri/ROI_to_subB.label \
> --subject subB \
> --temp brainmask.mgz \
> --regheader brainmask.mgz \
> --o /subB/mri/ROI_to_subB.mgz
>
> #Convert the volume back to native subB space
> mri_convert -rl subB_native.nii.gz -rt nearest --no_scale 1
> /subB/mri/ROI_to_subB.mgz ROI_to_subB_native.nii.gz
>
> A few follow-up questions:
>
> 1) When running mri_label2label, is better to use surface or volume for
> the "regmethod"?  Which method will give me a better fit for my output?
> 2) The output I'm getting looks striped (there are holes in the binary
> mask) and doesn't quite fit the anatomy (the final file is shifted up
> and away from where I would expect it to be although in the general
> vicinity of what I would expect).  It's almost as if I've chosen a wrong
> target or file along the way.  I don't expect the fit to be perfect, but
> did I do something wrong?
>
> Thanks in advance to any and all replies.
>
>
>
> 
> Notice: This UI Health Care e-mail (including attachments) is covered by the 
> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended 
> only for the use of the individual or entity to which it is addressed, and 
> may contain information that is privileged, confidential, and exempt from 
> disclosure under applicable law. If you are not the intended recipient, any 
> dissemination, distribution or copying of this communication is strictly 
> prohibited. If you have received this communication in error, please notify 
> the sender immediately and delete or destroy all copies of the original 
> message and attachments thereto. Email sent to or from UI Health Care may be 
> retained as required by law or regulation. Thank you.
> 
>
> ___
> 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.
>




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.


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


Re: [Freesurfer] Warping an ROI from one subject to another

2016-09-26 Thread Joel Bruss
Anyone have any thoughts on this?


On 09/21/2016 04:18 PM, Joel Bruss wrote:
> I have two subjects, subA and subB.  subA has a binary ROI mask, native
> space, that I'd like to place in subB's native space. Both subjects have
> been run through all stages of recon, edited, etc. Is there a better or
> easier way to achieve this than what I've run?:
>
>
> #Resample the native space binary ROI file into "brainmask" space
> mri_convert -rl /subA/mri/brainmask.mgz -rt nearest --no_scale 1
> ROI.nii.gz /subA/mri/ROI.mgz
>
> #Convert ROI file into a label
> mri_cor2label --id 1 --c /subA/mri --i ROI.mgz --l ROI.label
>
> #Move label from subA to subB
> mri_label2label --srcsubject subA --srclabel /subA/mri/ROI.label
> --trgsubject subB --trglabel /subB/mri/ROI_to_subB.label --regmethod volume
>
> #Convert warped ROI label to a volume
> mri_label2vol --label /subB/mri/ROI_to_subB.label \
> --subject subB \
> --temp brainmask.mgz \
> --regheader brainmask.mgz \
> --o /subB/mri/ROI_to_subB.mgz
>
> #Convert the volume back to native subB space
> mri_convert -rl subB_native.nii.gz -rt nearest --no_scale 1
> /subB/mri/ROI_to_subB.mgz ROI_to_subB_native.nii.gz
>
> A few follow-up questions:
>
> 1) When running mri_label2label, is better to use surface or volume for
> the "regmethod"?  Which method will give me a better fit for my output?
> 2) The output I'm getting looks striped (there are holes in the binary
> mask) and doesn't quite fit the anatomy (the final file is shifted up
> and away from where I would expect it to be although in the general
> vicinity of what I would expect).  It's almost as if I've chosen a wrong
> target or file along the way.  I don't expect the fit to be perfect, but
> did I do something wrong?
>
> Thanks in advance to any and all replies.
>
>
>
> 
> Notice: This UI Health Care e-mail (including attachments) is covered by the 
> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended 
> only for the use of the individual or entity to which it is addressed, and 
> may contain information that is privileged, confidential, and exempt from 
> disclosure under applicable law. If you are not the intended recipient, any 
> dissemination, distribution or copying of this communication is strictly 
> prohibited. If you have received this communication in error, please notify 
> the sender immediately and delete or destroy all copies of the original 
> message and attachments thereto. Email sent to or from UI Health Care may be 
> retained as required by law or regulation. Thank you.
> 
>
> ___
> 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.
>




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.


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


[Freesurfer] Warping an ROI from one subject to another

2016-09-21 Thread Joel Bruss
I have two subjects, subA and subB.  subA has a binary ROI mask, native
space, that I'd like to place in subB's native space. Both subjects have
been run through all stages of recon, edited, etc. Is there a better or
easier way to achieve this than what I've run?:


#Resample the native space binary ROI file into "brainmask" space
mri_convert -rl /subA/mri/brainmask.mgz -rt nearest --no_scale 1
ROI.nii.gz /subA/mri/ROI.mgz

#Convert ROI file into a label
mri_cor2label --id 1 --c /subA/mri --i ROI.mgz --l ROI.label

#Move label from subA to subB
mri_label2label --srcsubject subA --srclabel /subA/mri/ROI.label
--trgsubject subB --trglabel /subB/mri/ROI_to_subB.label --regmethod volume

#Convert warped ROI label to a volume
mri_label2vol --label /subB/mri/ROI_to_subB.label \
--subject subB \
--temp brainmask.mgz \
--regheader brainmask.mgz \
--o /subB/mri/ROI_to_subB.mgz

#Convert the volume back to native subB space
mri_convert -rl subB_native.nii.gz -rt nearest --no_scale 1
/subB/mri/ROI_to_subB.mgz ROI_to_subB_native.nii.gz

A few follow-up questions:

1) When running mri_label2label, is better to use surface or volume for
the "regmethod"?  Which method will give me a better fit for my output?
2) The output I'm getting looks striped (there are holes in the binary
mask) and doesn't quite fit the anatomy (the final file is shifted up
and away from where I would expect it to be although in the general
vicinity of what I would expect).  It's almost as if I've chosen a wrong
target or file along the way.  I don't expect the fit to be perfect, but
did I do something wrong?

Thanks in advance to any and all replies.




Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.


___
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] WM edits with tkmedit make no difference

2011-06-03 Thread Joel Bruss
I have a subject run through recon-all that has gross errors in GM/WM 
surfaces. I did my best to follow the ControlPoints tutorial on:


http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/ControlPoints

My first try had 300 control points with no difference in the WM.mgz 
file. I stumbled upon the freesrufer.failure_modes.ppt and it states:


Don’t edit too much! This will reduce reliability and is almost never 
needed. Usually this means you need to start over as you’ve done 
something wrong (e.g. put control points in the wrong place).


I deleted my control points .dat file and tried again with only 12 
control points, somewhat logically spaced throughout the whole brain. 
Still no improvement. Attached is a coronal image, typical of the error. 
So, what to do? Much of the normalized volume has values of 110 and it's 
my understanding that adding control points to values 110, that are 
known WM, will bring down the average value/tissue intensities. Here's a 
part of the stdout as I ran recon-all -autorecon2-cp -autorecon3 -subjid 
subject:



preserving editing changes in output volume...
doing initial intensity segmentation...
using local statistics to label ambiguous voxels...
computing class statistics for intensity windows...
WM (104.0): 104.1 +- 6.4 [80.0 -- 125.0]
GM (74.0) : 72.4 +- 9.9 [30.0 -- 96.0]
setting bottom of white matter range to 82.3
setting top of gray matter range to 92.2
doing initial intensity segmentation...
using local statistics to label ambiguous voxels...
using local geometry to label remaining ambiguous voxels...


My control points fall withing the WM range, as does much of the 110 
labeled voxels, but the surface/WM.mgz file isn't improving. What am I 
doing wrong and what can I try next?


Thank you in advance for any/all responses.

-Joel

attachment: freesurfer_WM_edit_problems.jpg___
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] CUDA support in 5.0

2010-08-17 Thread joel bruss
Not to hijack your question, but I have similar questions.  I have CUDA
toolkit 3.1 installed, cudadetect  returns: Detecting CUDA... 32767 CUDA
enabled device(s) detected. but, when I run recon-all, e.g.:

recon-all -subjid PC -all -use-gpu


I get the following errors at the mri_em_register_cuda step:

/lcn2/lesion_warp.dir/MAP3_Nifti/freesurfer_subs.dir/PC/mri

  mri_em_register_cuda -skull nu.mgz
 /usr/freesurfer/average/RB_all_withskull_2008-03-26.gca
 transforms/talairach_with_skull.lta

 mri_em_register_cuda: Command not found.
 Linux linux-lvmb 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200
 x86_64 x86_64 x86_64 GNU/Linux


A quick peak in /usr/freesurfer/bin shows that there is no
mri_em_register_cuda binary.

Are cuda binaries supposed to be bundled with the new 5.0 release, or are
they created on the fly by FreeSurfer, or are they just plain missing?
FWIW, I have CentOS 5 x86_64 version of FreeSurfer installed, running on
OpenSuse 11.3


recon-all -s PC exited with ERRORS at Tue Aug 17 11:14:35 CDT 2010


On Tue, Aug 17, 2010 at 11:07 AM, Gennan Chen gennan.c...@synarc.comwrote:

  Hi!

 I will like to try the beta CUDA support in 5.0. And I have some questions
 here


1. Are all needed libraries bundled in the release? Or I need to go to
CUDA’s site to get those dependency?  And if I need to, what are those
dependency I need to grab and install?
2. I have RH 5 64 bit linux box with single NVIDIA FX card and macpro
snow leopard box with dual NVIIDA GT 120. Does CUDA support work for both
OS? If they do, any idea what the speed up will be??


 Gen
 --
 This email message is for the sole use of the intended recipient(s) and may
 contain confidential and privileged information. Any unauthorized review,
 use, disclosure or distribution is prohibited. If you are not the intended
 recipient, please contact the sender by reply email and destroy all copies
 of the original message. If you are the intended recipient, please be
 advised that the content of this message is subject to access, review and
 disclosure by the sender's Email System Administrator

 ___
 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] CUDA support in 5.0

2010-08-17 Thread joel bruss
Nick-

I Dl'ed the tarball, unpacked, and re-ran.  I received the following error
message:

/lcn2/lesion_warp.dir/MAP3_Nifti/freesurfer_subs.dir/PC/mri

  mri_em_register_cuda -skull nu.mgz
 /usr/freesurfer/average/RB_all_withskull_2008-03-26.gca
 transforms/talairach_with_skull.lta

 mri_em_register_cuda: error while loading shared libraries: libcudart.so.3:
 wrong ELF class: ELFCLASS32
 Linux linux-lvmb 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200
 x86_64 x86_64 x86_64 GNU/Linux

 recon-all -s PC exited with ERRORS at Tue Aug 17 12:13:42 CDT 2010


Thoughts?

On Tue, Aug 17, 2010 at 12:03 PM, Nick Schmansky
ni...@nmr.mgh.harvard.eduwrote:

 i forgot to add: make sure you have the latest nvidia driver, which has
 support for cuda 3.

 n.

 On Tue, 2010-08-17 at 13:00 -0400, Nick Schmansky wrote:
  currently the _cuda binaries are distributed only in the centos4 and
  centos4_x86_64 distributions.  however, those should work in centos5,
  and i've made a tarball of the _cuda binaries downloadable from here:
 
  ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/misc
 
  look for the file 'fscudabins-linux-centos4_x86_64.tgz' and untar in
  your freesurfer/bin dir.
 
  ! note !  this is a beta release of these binaries!  they havent been
  fully tested across a wide subject set, so don't use the -use-gpu flag
  in any kind of important group analysis yet.
 
  please let of us know though of any problems you encounter.  we need to
  learn what kind of gpu cards people have out there in order to gauge how
  far we can optimize our routines.
 
  n.
 
  On Tue, 2010-08-17 at 11:35 -0500, joel bruss wrote:
   Not to hijack your question, but I have similar questions.  I have
   CUDA toolkit 3.1 installed, cudadetect  returns: Detecting CUDA...
   32767 CUDA enabled device(s) detected. but, when I run recon-all,
   e.g.:
  
   recon-all -subjid PC -all -use-gpu
  
  
   I get the following errors at the mri_em_register_cuda step:
  
   /lcn2/lesion_warp.dir/MAP3_Nifti/freesurfer_subs.dir/PC/mri
  
mri_em_register_cuda -skull
   nu.mgz /usr/freesurfer/average/RB_all_withskull_2008-03-26.gca
   transforms/talairach_with_skull.lta
  
   mri_em_register_cuda: Command not found.
   Linux linux-lvmb 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29
   02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
  
   A quick peak in /usr/freesurfer/bin shows that there is no
   mri_em_register_cuda binary.
  
   Are cuda binaries supposed to be bundled with the new 5.0 release, or
   are they created on the fly by FreeSurfer, or are they just plain
   missing?  FWIW, I have CentOS 5 x86_64 version of FreeSurfer
   installed, running on OpenSuse 11.3
  
  
   recon-all -s PC exited with ERRORS at Tue Aug 17 11:14:35 CDT 2010
  
  
   On Tue, Aug 17, 2010 at 11:07 AM, Gennan Chen gennan.c...@synarc.com
   wrote:
   Hi!
  
   I will like to try the beta CUDA support in 5.0. And I have
   some questions here
  
1. Are all needed libraries bundled in the release? Or I
   need to go to CUDA’s site to get those dependency?
And if I need to, what are those dependency I need to
   grab and install?
2. I have RH 5 64 bit linux box with single NVIDIA FX
   card and macpro snow leopard box with dual NVIIDA GT
   120. Does CUDA support work for both OS? If they do,
   any idea what the speed up will be??
  
   Gen
  
   __
   This email message is for the sole use of the intended
   recipient(s) and may contain confidential and privileged
   information. Any unauthorized review, use, disclosure or
   distribution is prohibited. If you are not the intended
   recipient, please contact the sender by reply email and
   destroy all copies of the original message. If you are the
   intended recipient, please be advised that the content of this
   message is subject to access, review and disclosure by the
   sender's Email System Administrator
  
  
   ___
   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

Re: [Freesurfer] CUDA support in 5.0

2010-08-17 Thread joel bruss
Sorry to be a PITA but I'm still having issues.  I pointed at cuda-64 and
now I get:

mri_em_register_cuda -skull nu.mgz
 /usr/freesurfer/average/RB_all_withskull_2008-03-26.gca
 transforms/talairach_with_skull.lta

 Acquiring CUDA device
 Using default device
 CUDA Error in file 'devicemanagement.cu' on line 46 : CUDA driver version
 is insufficient for CUDA runtime version.
 Linux linux-lvmb 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200
 x86_64 x86_64 x86_64 GNU/Linux

 recon-all -s PC exited with ERRORS at Tue Aug 17 13:51:07 CDT 2010


I have the latest CUDA toolkit, 3.1, as well as the latest Nvidia driver,
nvidia-gfxG02-kmp-desktop.  Any further thoughts?

On Tue, Aug 17, 2010 at 12:51 PM, Nick Schmansky
ni...@nmr.mgh.harvard.eduwrote:

 make sure your LD_LIBRARY_PATH is pointing at:

 /usr/local/cuda/lib64

 which has the 64b libcudart, and not:

 /usr/local/cuda/lib

 which has the 32b.

 n.


 On Tue, 2010-08-17 at 12:17 -0500, joel bruss wrote:
  Nick-
 
  I Dl'ed the tarball, unpacked, and re-ran.  I received the following
  error message:
 
  /lcn2/lesion_warp.dir/MAP3_Nifti/freesurfer_subs.dir/PC/mri
 
   mri_em_register_cuda -skull
  nu.mgz /usr/freesurfer/average/RB_all_withskull_2008-03-26.gca
  transforms/talairach_with_skull.lta
 
  mri_em_register_cuda: error while loading shared libraries:
  libcudart.so.3: wrong ELF class: ELFCLASS32
  Linux linux-lvmb 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29
  02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
 
  recon-all -s PC exited with ERRORS at Tue Aug 17 12:13:42 CDT
  2010
 
  Thoughts?
 
 
  On Tue, Aug 17, 2010 at 12:03 PM, Nick Schmansky
  ni...@nmr.mgh.harvard.edu wrote:
  i forgot to add: make sure you have the latest nvidia driver,
  which has
  support for cuda 3.
 
  n.
 
 
  On Tue, 2010-08-17 at 13:00 -0400, Nick Schmansky wrote:
   currently the _cuda binaries are distributed only in the
  centos4 and
   centos4_x86_64 distributions.  however, those should work in
  centos5,
   and i've made a tarball of the _cuda binaries downloadable
  from here:
  
   ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/misc
  
   look for the file 'fscudabins-linux-centos4_x86_64.tgz' and
  untar in
   your freesurfer/bin dir.
  
   ! note !  this is a beta release of these binaries!  they
  havent been
   fully tested across a wide subject set, so don't use the
  -use-gpu flag
   in any kind of important group analysis yet.
  
   please let of us know though of any problems you encounter.
   we need to
   learn what kind of gpu cards people have out there in order
  to gauge how
   far we can optimize our routines.
  
   n.
  
   On Tue, 2010-08-17 at 11:35 -0500, joel bruss wrote:
Not to hijack your question, but I have similar
  questions.  I have
CUDA toolkit 3.1 installed, cudadetect  returns:
  Detecting CUDA...
32767 CUDA enabled device(s) detected. but, when I run
  recon-all,
e.g.:
   
recon-all -subjid PC -all -use-gpu
   
   
I get the following errors at the mri_em_register_cuda
  step:
   
   
/lcn2/lesion_warp.dir/MAP3_Nifti/freesurfer_subs.dir/PC/mri
   
 mri_em_register_cuda -skull
   
  nu.mgz /usr/freesurfer/average/RB_all_withskull_2008-03-26.gca
transforms/talairach_with_skull.lta
   
mri_em_register_cuda: Command not found.
Linux linux-lvmb 2.6.34-12-desktop #1 SMP PREEMPT
  2010-06-29
02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
   
A quick peak in /usr/freesurfer/bin shows that there is no
mri_em_register_cuda binary.
   
Are cuda binaries supposed to be bundled with the new 5.0
  release, or
are they created on the fly by FreeSurfer, or are they
  just plain
missing?  FWIW, I have CentOS 5 x86_64 version of
  FreeSurfer
installed, running on OpenSuse 11.3
   
   
recon-all -s PC exited with ERRORS at Tue Aug 17 11:14:35
  CDT 2010
   
   
On Tue, Aug 17, 2010 at 11:07 AM, Gennan Chen
  gennan.c...@synarc.com
wrote:
Hi!
   
I will like to try the beta CUDA support in 5.0.
  And I have
some questions here
   
 1. Are all needed libraries bundled in the
  release? Or I

[Freesurfer] Issues with FreeSurfer and Slicer3

2008-11-19 Thread joel bruss
I must have posted this to an incorrect address before so I'll try this
again:

Hello-

I'm running freesurfer-Linux-centos4-stable-pub-v4.0.5 on Suse 11.

I've used the output of FreeSurfer, specifically wmparc.mgz to create a
32-bit volume to which I've applied edits.  The two commands I used were:

mri_vol2vol --mov mri/wmparc.mgz --targ mri/rawavg.mgz --o
wmparc-in-native.mgz --regheader --interp nearest

mri_convert --in_type mgz --out_type analyze wmparc-in-native.mgz
wmparc_in_native_analyze

(The new Analzye set was renamed FSParcel.hdr/img)


After making the appropriate edits, I wanted to put this file back into mgz
format/freesurfer space so I ran:

mri_convert --in_type analyze --out_type mgz FSParcel 3065_FSParcel.mgz

mri_vol2vol --mov FSParcel.mgz --targ mri/wmparc.mgz --o
FSParcel_FSorient.mgz --regheader --interp nearest

(I assumed that a target of wmparc would be most appropriate sinc that's
what I started with but I've tried aseg as well)


I've been playing around with Slicer and trying load the file as a label
file to which I create (I believe) vtk models.  If I convert wmparc to an
Analyze set and then back to FreeSurfer mgz without any edits, I get an
exact copy, as would be expected.  If I make any alterations to the file and
follow my steps, Slicer gripes that it can't parse the header.  No matter
what dims I use, I get pixels scattered across the screen and it appears
that the volume is scrunched to 1 slice.  If I run tkregister (as
mri_vol2vol suggests)

tkregister2 --mov FSParcel_FSorient.mgz --targ
$SUBJECTS_DIR/sub1/mri/aseg.mgz --reg FSParcel_FSorient.mgz.reg

everything looks fine.  I find the Slicer documentation a bit lacking and
don't know who to turn to.  Is there something inherently wrong with my
commands or is there a way to write header params to the mgz file so that
Slicer will just work?

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

[Freesurfer] Creating a FreeSurfer label/volume

2008-11-14 Thread joel bruss
Hello-

I'm running freesurfer-Linux-centos4-stable-pub-v4.0.5 on Suse 11.

I've used the output of FreeSurfer, specifically wmparc.mgz to create a
32-bit volume to which I've applied edits.  The two commands I used were:

mri_vol2vol --mov mri/wmparc.mgz --targ mri/rawavg.mgz --o
wmparc-in-native.mgz --regheader --interp nearest

mri_convert --in_type mgz --out_type analyze wmparc-in-native.mgz
wmparc_in_native_analyze

(The new Analzye set was renamed FSParcel.hdr/img)


After making the appropriate edits, I wanted to put this file back into mgz
format/freesurfer space so I ran:

mri_convert --in_type analyze --out_type mgz FSParcel 3065_FSParcel.mgz

mri_vol2vol --mov FSParcel.mgz --targ mri/wmparc.mgz --o
FSParcel_FSorient.mgz --regheader --interp nearest

(I assumed that a target of wmparc would be most appropriate sinc that's
what I started with but I've tried aseg as well)


I've been playing around with Slicer and trying load the file as a label
file to which I create (I believe) vtk models.  If I convert wmparc to an
Analyze set and then back to FreeSurfer mgz without any edits, I get an
exact copy, as would be expected.  If I make any alterations to the file and
follow my steps, Slicer gripes that it can't parse the header.  No matter
what dims I use, I get pixels scattered across the screen and it appears
that the volume is scrunched to 1 slice.  If I run tkregister (as
mri_vol2vol suggests)

tkregister2 --mov FSParcel_FSorient.mgz --targ
$SUBJECTS_DIR/sub1/mri/aseg.mgz --reg FSParcel_FSorient.mgz.reg

everything looks fine.  I find the Slicer documentation a bit lacking and
don't know who to turn to.  Is there something inherently wrong with my
commands or is there a way to write header params to the mgz file so that
Slicer will just work?

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

[Freesurfer] wmparc creation

2008-04-10 Thread joel bruss
Hello-

I ran recon-all and it reported that everything ran with no errors but, when
I go into mri, there is no wmparc.mgz file.  I tried running:

mri_aparc2aseg --s sub1_ani --labelwm --hypo-as-wm --rip-unknown --ribbon
--o mri/wmparc.mgz --ctxseg aparc+aseg.mgz

and all was running well until it exited with the following error:

Used brute-force search on 2690 voxels
Writing output aseg to mri/wmparc.mgz
sh: mri/wmparc.mgz: No such file or directory


I thought that the point of running this command was to create the
wmparc.mgz file.  Did I do something wrong with my command?  Also, shouldn't
recon-all create this file as well?

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

[Freesurfer] wmparc

2008-04-10 Thread joel bruss
I'll try this again as I'm stuck and in need of help.



I ran recon-all and it reported that everything ran with no errors but, when
I go into mri, there is no wmparc.mgz file.  I tried running:

mri_aparc2aseg --s sub1_ani --labelwm --hypo-as-wm --rip-unknown --ribbon
--o mri/wmparc.mgz --ctxseg aparc+aseg.mgz

and all was running well until it exited with the following error (after
labeling all 256 slices):

Used brute-force search on 2690 voxels
Writing output aseg to mri/wmparc.mgz
sh: mri/wmparc.mgz: No such file or directory


I thought that the point of running this command was to create the
wmparc.mgz file.  Did I do something wrong with my command?  Also, shouldn't
recon-all create this file as well?

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

[Freesurfer] Restart FreeSurfer

2008-04-08 Thread joel bruss
Hello-

I was running recon-all when my machine croaked.  I was on the latter-half
of day two and I think (hope) that the process was nearing completion.  Is
there a command to give to FreeSurfer to start back in the pipeline where
the process left off or do I have to do each command separately?
Specifically, this was the command I used:

recon-all -subjid sub1 -all

Is there a flag or comment to check/pick up where I left off or am I out of
luck?

Thanks for your help.

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

[Freesurfer] rawavg

2008-03-06 Thread joel bruss
When FreeSurfer performs the average of 2 or more scans to create rawavg.mgz,
is the 001.mgz used as the target to which all other scans are moved
/averaged to or is there some between-space alignment amongst the scans?

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

[Freesurfer] Desikan atlas brains

2008-03-04 Thread joel bruss
Hello-

Is there anywhere to download the 40 subjects used to create the Desikan
atlas?  If so, do these datasets contain all the transform/FreeSurfer files
from start to finish?

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

[Freesurfer] Desikan training sets

2008-03-03 Thread joel bruss
Is there a place to download the 40 brains used in the creation of the
Desikan atlas?  If so, would the training data have all of the FreeSurfer
data (directories and transform files) so that one could easily create ones
own parcellation scheme and create a new brain?
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] help with freesurfer error

2008-02-28 Thread joel bruss
I was trying to run a single sujbect through recon-all and got the following
error:




Thu Feb 28 16:34:57 CST 2008
talairach_avi done

 cp transforms/talairach.auto.xfm transforms/talairach.xfm

#
[EMAIL PROTECTED] Talairach Failure Detection Thu Feb 28 16:34:58 CST 2008
/fmri/studies/retinotopic/new_retinotopic/3362/3362_resampled.dir/freesurfer_pipeline.dir/sub1/mri

 talairach_afd -T 0.005 -xfm transforms/talairach.xfm

ERROR: talairach_afd: Talairach Transform: transforms/talairach.xfm
***FAILED*** (p=0., pval=0.  threshold=0.0050)
Linux dendrite 2.6.22.16-0.1-default #1 SMP 2008/01/23 14:28:52 UTC i686
i686 i386 GNU/Linux

recon-all exited with ERRORS at Thu Feb 28 16:34:58 CST 2008



I don't speak FreeSurfer and don't understand this error.  Please help.

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

[Freesurfer] sub-cortical parcels

2007-11-13 Thread joel bruss
Hello-

I'm running FreeSurfer v4.01on SUSE Linux

I'm interested in viewing the sub-cortical parcels, /mri/aseg.mgz, but
in the native MRI space.  I see that the output of CA Label produces
a file that is fit to the CA Normalize step but I can't figure out
the transform that was used.  Specifically, for CA Normalize, if I
look under /mri/transforms, and sort by time, I have both the
talairach.lta and talairach.m3z files, but neither will get me from
native to norm space (or vice-versa).  Is there a transform file that
I'm missing or is this a process of intermediate steps to get from
native to norm space?  Please help!

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


Re: [Freesurfer] sub-cortical parcels

2007-11-13 Thread joel bruss
Nick-

Doug wrote:

Try this:

mri_vol2vol --mov aseg.mgz --targ rawavg.mgz --o aseg-in-native.mgz
--regheader --interp nearest

doug

Sure enough, this worked.  What I mean by norm is the file
/mri/norm.mgz which gets created in the CA Normalize section of
recon-all.  Mike was kind enough to point out that this is the same as
orig.mgz but, this was not what I was going after.  What I meant by
native was the T1 volume I input into freesurfer (before conversion
from Analzye to mgz via mri_convert).  After running Doug's command,
and converting back to Analyze format, I now have a working copy of
aseg (sub-cortical) that can be overlaid onto my, original, native
space T1 MRI.

Thanks everyone for your help.

-Joel

On Nov 13, 2007 12:43 PM, Nick Schmansky [EMAIL PROTECTED] wrote:
 Joel,

 All freesurfer volume files, including aseg.mgz, are in native MRI
 space.  The various talairach transforms are used to align to the
 atlases used in freesurfer.  I'm not sure what you mean by 'norm' space.
 The --apply_transform flag of mri_convert can be used to convert a
 volume to talairach space (see mri_convert --help for details).

 Nick

 On Tue, 2007-11-13 at 12:01 -0600, joel bruss wrote:

  Hello-
 
  I'm running FreeSurfer v4.01on SUSE Linux
 
  I'm interested in viewing the sub-cortical parcels, /mri/aseg.mgz, but
  in the native MRI space.  I see that the output of CA Label produces
  a file that is fit to the CA Normalize step but I can't figure out
  the transform that was used.  Specifically, for CA Normalize, if I
  look under /mri/transforms, and sort by time, I have both the
  talairach.lta and talairach.m3z files, but neither will get me from
  native to norm space (or vice-versa).  Is there a transform file that
  I'm missing or is this a process of intermediate steps to get from
  native to norm space?  Please help!
 
  Thanks,
  Joel

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


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


Re: [Freesurfer] sub-cortical parcels

2007-11-13 Thread joel bruss
This is the last question that I have...sorry to keep bothering you
all.  Is there a page on the FS wiki or is there a man page that
details the value of each sub-cortical parcel?  I see that each masked
are has a value (1, 2, 3, etc.) but before I make assumptions about
which values correspond with which region, I though I'd ask for help.

-Joel

On Nov 13, 2007 1:09 PM, Bruce Fischl [EMAIL PROTECTED] wrote:
 Hi Joel,

 both the .m3z (nonlinear) and the .lta (linear) are transforms from the
 subject to the atlas coordinate system, but all the labeling is done in
 the subject space, so you should be set.

 cheers,
 Bruce
 On Tue, 13 Nov 2007, joel bruss
 wrote:


  Hello-
 
  I'm running FreeSurfer v4.01on SUSE Linux
 
  I'm interested in viewing the sub-cortical parcels, /mri/aseg.mgz, but
  in the native MRI space.  I see that the output of CA Label produces
  a file that is fit to the CA Normalize step but I can't figure out
  the transform that was used.  Specifically, for CA Normalize, if I
  look under /mri/transforms, and sort by time, I have both the
  talairach.lta and talairach.m3z files, but neither will get me from
  native to norm space (or vice-versa).  Is there a transform file that
  I'm missing or is this a process of intermediate steps to get from
  native to norm space?  Please help!
 
  Thanks,
  Joel

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

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


[Freesurfer] buckner data set

2007-01-18 Thread joel-bruss


Just a quick question.  Is the vitamin E capsule (or whatever the  
bright artifact outside
the skull/skin is) denoting the right or left hemisphere for the  
Buckner 40-brain data

(look at subject buckner_data/group_study/004/mri/rawavg.mgz)?

Thanks,
Joel






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