Differences between revisions 4 and 5
Deletions are marked like this. Additions are marked like this.
Line 43: Line 43:
Annotation value is actually just an alternate representation of the color:
Annot = (R) + (G * 256) + (B * 256^2).
 * Annotation value is actually just an alternate representation of the color: Annot = (R) + (G * 256) + (B * 256^2).
Line 46: Line 45:
In turn, one would expect color and annotation value to follow from the structure number, via a color look-up table. As it turns out, however, none of this is true in tksurfer:  * One would expect color and annotation value to follow from the structure number, via a color look-up table. As it turns out, however, none of this is true in tksurfer:
Line 48: Line 47:
 * A vertex can have more than one structure number attached to it (ie: be a "member of more than one label"). Is this a useful state? Not if saving data to an annotation file, as that kind of file prevents multi labels per vertex. For many purposes one is interested in counting each vertex once, so a single label value per vertex is a fine restriction. But the multi-labels-per-vertex can arise during editing, so we have to handle it.
 * A vertex can have only one annotation value, which usually follows from the structure number but not necessarily.
 * The vertex's color can actually diverge from the annotation value.
  * A vertex can have more than one structure number attached to it (ie: be a "member of more than one label"). Is this a useful state? Not if saving data to an annotation file, as that kind of file prevents multi labels per vertex. For many purposes one is interested in counting each vertex once, so a single label value per vertex is a fine restriction. But the multi-labels-per-vertex can arise during editing, so we have to handle it.
  * A vertex can have only one annotation value, which usually follows from the structure number but not necessarily.
  * The vertex's color can actually diverge from the annotation value.

Editing labels/annotations in tksurfer

Index TableOfContents

Overview

This page describes the process of editing labels using tksurfer. Surface label data can be stored in individual label files, or the data of many labels can be stored in an annotation file. This page focuses on the annotation file way of doing things, though much of the following is relevant to the separate-label-files approach too.

Editing might be desired for a couple of reasons:

  • You have an individual subject where you don't like the region boundaries that FreeSurfer produced.

  • You are editing many cases on the way to producing a new atlas.

At any rate, you will want to know how to perform the following editing moves:

  • Perhaps starting with an existing annotation, such as rh.aparc.annot...
  • Expand the boundary of a region into a neighboring region (or vice versa).
  • Create an entirely new label (ie: new structure Id number and caption), draw a region and label it with the new structure number.
  • Merge two regions (and presumably apply a new structure number etc).
  • ... and finally save your work in a new annotation file, eg: rh.myparc.annot.

Editing labels turns out to be reasonably straightforward, but there are a number of idiosyncratic features to work around in tksurfer.

Background

As a starting point, let us review what you are looking at in the following picture:

xxxxxx surface with annot xxxxxxxxx

One can arrive at this picture by:

tksurfer -annot aparc subjectid rh inflated

In addition:

  • View > Information > Annotation to turn on display of the Annotation value in the Tool window.

  • View > Auto-redraw

Now, as you float the mouse over the surface, you will see the Label and Annotation fields update. These are the values attached to the individual vertex that the mouse is hovering over.

Editing a region consists of changing the Label and/or Annotation values for the vertices of interest. Of course, editing vertices one at a time would be tedious, so instead tksurfer offers various tools to draw an outline "path" and then "fill" that shape with the desired Label value, or perform other editing operations on the outlined region.

  • Annotation value is actually just an alternate representation of the color: Annot = (R) + (G * 256) + (B * 256^2).
  • One would expect color and annotation value to follow from the structure number, via a color look-up table. As it turns out, however, none of this is true in tksurfer:
    • A vertex can have more than one structure number attached to it (ie: be a "member of more than one label"). Is this a useful state? Not if saving data to an annotation file, as that kind of file prevents multi labels per vertex. For many purposes one is interested in counting each vertex once, so a single label value per vertex is a fine restriction. But the multi-labels-per-vertex can arise during editing, so we have to handle it.
    • A vertex can have only one annotation value, which usually follows from the structure number but not necessarily.
    • The vertex's color can actually diverge from the annotation value.

All that said, there is a way to proceed and get the desired results.

xxxxx display of "1 other"

Author(s)

GrahamWideman, Ari Dubin

tksurfer_labeledit (last edited 2010-03-24 19:53:31 by AllisonStevens)