The -*-label-import commands do not convert from separate ROIs to
single-map label format, because ROIs could overlap while labels are not
allowed to.  You need to first create a file with a single map of different
integers for each ROI, before using these commands.

First, you need to ensure that you actually have reasonable ROIs, as even
with what you did, you should still get one ROI per label map if the inputs
were what they should have been.  Open the tmp.func.gii file and make sure
they actually have reasonable ROIs.  The -border-to-rois command is
intended only for use on closed borders (draw the entire boundary of the
desired ROI), so if the borders were simply lines across the motor strip,
it will likely not behave well.

If you don't care about how any overlapping vertices from the ROIs get
resolved, you can make ROIs into the needed one-integer-per-area format
like this:

wb_command -metric-reduce rois.func.gii INDEXMAX indexmax.func.gii
wb_command -metric-reduce rois.func.gii MAX max.func.gii
wb_command -metric-mask indexmax.func.gii max.func.gii integers.func.gii

Then -metric-label-import will do what is expected.  Note, however, that
freesurfer annot files have the additional restriction that all colors must
be unique, as they use the color as the label key.

Tim


On Fri, Oct 27, 2017 at 8:50 AM, Sebastian Bitzer <
sebastian.bit...@tu-dresden.de> wrote:

> Hi,
>
> I've been trying to export borders from subregions of the sensorimotor
> strip (suppl. Figure 8 of Glasser et al. 2016) to freesurfer annotation
> files (for visualisation in pySurfer).
>
> Following the instructions in the FAQ (https://wiki.humanconnectome.
> org/display/PublicData/HCP+Users+FAQ#HCPUsersFAQ-9.
> HowdoImapdatabetweenFreeSurferandHCP?) I successfully translated the area
> labels (Figure 3, Glasser et al.) into corresponding freesurfer
> .annot-files (using mris-convert in the last step, as suggested here:
> https://figshare.com/articles/HCP-MMP1_0_projected_on_fsaverage/3498446/2
> ).
>
> My idea was to simply follow the same steps with the motor subregion
> borders by first transforming the borders to labels. I tried the following
> process:
>
> wb_command -border-to-rois $oldsphere $border $outdir/tmp.func.gii
>
> wb_command -border-export-color-table $border $outdir/label_list.txt
>
> wb_command -metric-label-import $outdir/tmp.func.gii
> $outdir/label_list.txt $outdir/tmp.label.gii -discard-others
>
> I then transformed the label file to freesurfer164 as I did with the other
> labels and converted the result to .annot with mris-convert. Unfortunately,
> the resulting annotation, after loading into tksurfer, shows nothing.
> Loading the annotation file with PySurfer returns the appropriate number of
> named labels, but these all contain the full set of vertices (with value=1).
>
> Roaming through the gifty-files a bit I noticed that the generated
> tmp.label.gii has each label as individual data column which is different
> from the set of full cortex labels which are defined as a single integer
> column. I guess that mris_convert does not process this structure properly.
> Is there a way to convert the multi-column label-gifty to the standard
> single-column label-gifty? Or is there a different way of exporting the
> borders to an appropriate freesurfer .annot-file?
>
>
> Thanks for your help!
>
> Sebastian Bitzer
> Chair of Neuroimaging
> TU Dresden
> http://sbitzer.eu/
> _______________________________________________
> HCP-Users mailing list
> HCP-Users@humanconnectome.org
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>

_______________________________________________
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to