Hi Tim,

Thanks for your email. To clarify, when I said voxels on the medial wall, I
was referring to voxels near the sagittal midline of the brain (i.e., I
wasn't referring to voxels that have been labelled as medial wall). As
such, these voxels have been labelled as part of a structure in the left
hemisphere and also labelled as part of a structure in the right
hemisphere. In which case, how do you suggest we deal with the overlap
issue?

Thanks again,

Simon


On 4 October 2016 at 13:02, Timothy Coalson <[email protected]> wrote:

> Note that this command just makes the left hemisphere take precedence -
> you said the overlap was in medial wall, which is more of an artifact of
> processing than a structure of importance, so this should be fine.  The
> surfaces shouldn't have any overlap on real structures, so ribbon
> constrained surface to volume mapping should prevent any other serious
> overlaps.
>
> Tim
>
>
> On Mon, Oct 3, 2016 at 8:56 PM, Timothy Coalson <[email protected]> wrote:
>
>> Assuming that your label values don't have any overlap (each integer
>> uniquely identifies not only the area but also the hemisphere), you can do
>> the math part with wb_command -volume-math:
>>
>> wb_command -volume-math 'L + (L == 0) * R'  ${Subject}.custom_raw.nii.gz
>> -var L ${Subject}.L.custom.nii -var R ${Subject}.R.custom.nii
>>
>> You can then make the combined label names text file and use it to
>> reimport the label file:
>>
>> wb_command -volume-label-export-table ${Subject}.L.custom.nii 1
>> ${Subject}.L.custom.txt
>> wb_command -volume-label-export-table ${Subject}.R.custom.nii 1
>> ${Subject}.R.custom.txt
>> cat ${Subject}.L.custom.txt ${Subject}.R.custom.txt >
>> ${Subject}.custom.txt
>> wb_command -volume-label-import ${Subject}.custom_raw.nii.gz ${Subject}
>> .custom.txt ${Subject}.custom.nii.gz
>>
>> I also suggest using .nii.gz, label files compress very well.  Unlike
>> FSL, workbench doesn't have an environment variable controlling the output
>> format, you must specify full filenames.
>>
>> Tim
>>
>>
>> On Mon, Oct 3, 2016 at 8:29 PM, Simon Baker <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> We want to use our own custom parcellation with the connectome project
>>> data. Ultimately the parcellation needs to be a NIFTI volume.
>>>
>>> We mapped our own custom parcellation from fsaverage (.annot file in
>>> FreeSurfer space) onto an HCP subject (GIFTI surface .label.gii file in
>>> ${Subject}/MNINonLinear space) separately for each hemisphere, and we would
>>> like to convert the GIFTI surface files into a NIFTI volume file. Although
>>> this can be done with the following commands . . .
>>>
>>> [MNINonLinear]$ wb_command -label-to-volume-mapping
>>> ${Subject}.L.custom.164k_fs_LR.label.gii 
>>> ${Subject}.L.sphere.164k_fs_LR.surf.gii
>>> T1w.nii.gz ${Subject}.L.custom.nii -ribbon-constrained
>>> ${Subject}.L.white.164k_fs_LR.surf.gii ${Subject}.L.pial.164k_fs_LR.s
>>> urf.gii
>>>
>>> [MNINonLinear]$ wb_command -label-to-volume-mapping
>>> ${Subject}.R.custom.164k_fs_LR.label.gii 
>>> ${Subject}.R.sphere.164k_fs_LR.surf.gii
>>> T1w.nii.gz ${Subject}.R.custom.nii -ribbon-constrained
>>> ${Subject}.R.white.164k_fs_LR.surf.gii ${Subject}.R.pial.164k_fs_LR.s
>>> urf.gii
>>>
>>> [MNINonLinear]$ fslmaths ${Subject}.L.custom.nii -add
>>> ${Subject}.R.custom.nii ${Subject}.custom.nii
>>>
>>> . . . we have found that some voxels on the medial wall are labelled as
>>> both a left hemisphere region and a right hemisphere region.
>>>
>>> Using wb_command, how can we generate a NIFTI volume file containing
>>> both the left hemisphere parcellation and the right hemisphere parcellation
>>> and ensure that each voxel is labelled as only one region?
>>>
>>> Kind regards,
>>>
>>> Simon Baker
>>> Brain & Mental Health Laboratory
>>> Monash Institute of Cognitive & Clinical Neurosciences
>>> Monash University
>>>
>>> _______________________________________________
>>> HCP-Users mailing list
>>> [email protected]
>>> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>>>
>>
>>
>

_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to