MCPcopy
hub / github.com/mne-tools/mne-python / Label

Class Label

mne/label.py:174–971  ·  view source on GitHub ↗

A FreeSurfer/MNE label with vertices restricted to one hemisphere. Labels can be combined with the ``+`` operator: * Duplicate vertices are removed. * If duplicate vertices have conflicting position values, an error is raised. * Values of duplicate vertices ar

Source from the content-addressed store, hash-verified

172
173@fill_doc
174class Label:
175 """A FreeSurfer/MNE label with vertices restricted to one hemisphere.
176
177 Labels can be combined with the ``+`` operator:
178
179 * Duplicate vertices are removed.
180 * If duplicate vertices have conflicting position values, an error
181 is raised.
182 * Values of duplicate vertices are summed.
183
184 Parameters
185 ----------
186 vertices : array, shape (N,)
187 Vertex indices (0 based).
188 pos : array, shape (N, 3) | None
189 Locations in meters. If None, then zeros are used.
190 values : array, shape (N,) | None
191 Values at the vertices. If None, then ones are used.
192 hemi : 'lh' | 'rh'
193 Hemisphere to which the label applies.
194 comment : str
195 Kept as information but not used by the object itself.
196 name : str
197 Kept as information but not used by the object itself.
198 filename : str
199 Kept as information but not used by the object itself.
200 %(subject_label)s
201 color : None | matplotlib color
202 Default label color and alpha (e.g., ``(1., 0., 0., 1.)`` for red).
203 %(verbose)s
204
205 Attributes
206 ----------
207 color : None | tuple
208 Default label color, represented as RGBA tuple with values between 0
209 and 1.
210 comment : str
211 Comment from the first line of the label file.
212 hemi : 'lh' | 'rh'
213 Hemisphere.
214 name : None | str
215 A name for the label. It is OK to change that attribute manually.
216 pos : array, shape (N, 3)
217 Locations in meters.
218 subject : str | None
219 The label subject.
220 It is best practice to set this to the proper
221 value on initialization, but it can also be set manually.
222 values : array, shape (N,)
223 Values at the vertices.
224 vertices : array, shape (N,)
225 Vertex indices (0 based)
226 """
227
228 @verbose
229 def __init__(
230 self,
231 vertices=(),

Callers 15

_stc_to_labelFunction · 0.90
test_label_additionFunction · 0.90
test_label_fill_restrictFunction · 0.90
test_annot_ioFunction · 0.90
test_label_sign_flipFunction · 0.90
test_simulate_raw_bemFunction · 0.90
test_simulate_stcFunction · 0.90
test_source_simulatorFunction · 0.90

Calls

no outgoing calls

Tested by 12

_stc_to_labelFunction · 0.72
test_label_additionFunction · 0.72
test_label_fill_restrictFunction · 0.72
test_annot_ioFunction · 0.72
test_label_sign_flipFunction · 0.72
test_simulate_raw_bemFunction · 0.72
test_simulate_stcFunction · 0.72
test_source_simulatorFunction · 0.72